/* ==========================================================================
   style.css
   Brand colors come from config.js (main + secondary). Every other tint,
   shadow and gradient is derived from those two in the tokens below.
   ========================================================================== */

/* ---- Font: Inter, self-hosted (license: fonts/OFL.txt) ----------------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff") format("woff"); }


/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  /* Brand. Template default = soft rose red; config.js overrides these. */
  --main: #B5485C;
  --secondary: #3E1F2B;
  --on-main: #ffffff;        /* text on --main      (set by script.js) */
  --on-secondary: #ffffff;   /* text on --secondary (set by script.js) */

  /* Derived from the brand colors */
  --main-ink: var(--main);      /* main used as text (darkened by script.js if too light) */
  --heading: var(--secondary);  /* headings (darkened by script.js if too light) */
  --main-deep: color-mix(in oklab, var(--main), var(--secondary) 34%);
  --backdrop: color-mix(in oklab, var(--main) 6%, #E3E4E8);

  /* Neutrals (the app's greys) */
  --panel: #ffffff;
  --fill: #F2F2F6;
  --line: #E2E2E7;
  --ink: #1C1C1E;
  --ink-2: #3A3A3C;
  --ink-3: #6E6E73;

  /* Shape & spacing */
  --maxw: 1200px;
  --gutter: 14px;      /* gap around the floating panels */
  --r-panel: 28px;
  --r-media: 20px;
  --r-card: 16px;
  --overlap: 28px;     /* how far the content slides over the big banner */
}


/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--backdrop);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-width: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--backdrop);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: color-mix(in srgb, var(--main) 24%, transparent); }

:focus-visible {
  outline: 2px solid var(--main-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ==========================================================================
   Banner — shared parts
   ========================================================================== */
.banner {
  position: relative;
  overflow: hidden;
  color: var(--on-main);
  background-color: var(--main);
  background-image:
    radial-gradient(80% 130% at 100% 0%, color-mix(in srgb, var(--on-main) 13%, transparent), transparent 62%),
    linear-gradient(150deg, var(--main) 30%, var(--main-deep));
}

/* decorative rings */
.banner::before {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--on-main) 20%, transparent);
  outline: 1px solid color-mix(in srgb, var(--on-main) 10%, transparent);
  outline-offset: 56px;
  pointer-events: none;
}

.banner__inner {
  position: relative;            /* above the rings */
  max-width: var(--maxw);
  margin: 0 auto;
}

.banner :focus-visible { outline-color: var(--on-main); }

/* Brand: logo (or letter badge) + name + tagline. Used in banner and footer. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  background: color-mix(in srgb, currentColor 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 24%, transparent);
}

.brand__logo {
  flex: none;
  width: auto;
  height: 44px;
  max-width: 200px;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand__tagline {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: color-mix(in srgb, currentColor 74%, transparent);
}

.brand--logo-only .brand__text { display: none; }
.brand--logo-only .brand__logo { height: 50px; }

/* Contact pills */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 13px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  background: color-mix(in srgb, currentColor 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent);
}

.pill:hover { background: color-mix(in srgb, currentColor 22%, transparent); }
.pill .icon { width: 17px; height: 17px; }

/* very long phone numbers / e-mail addresses get cut off with "…" */
.pills li { min-width: 0; max-width: 100%; }
.pill { max-width: 100%; }
.pill__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }


/* ==========================================================================
   Portrait & square-ish screens (6:5 or narrower)
   → the banner IS the top of the page; content slides over it like a sheet.
   ========================================================================== */
@media not all and (min-aspect-ratio: 6/5) {

  .banner {
    padding:
      max(18px, env(safe-area-inset-top))
      max(22px, env(safe-area-inset-right))
      calc(var(--overlap) + 22px)
      max(22px, env(safe-area-inset-left));
  }

  .banner::before {
    width: clamp(320px, 88vw, 620px);
    top: clamp(-330px, -40vw, -150px);
    right: clamp(-300px, -34vw, -130px);
  }

  .banner__inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .banner .brand { gap: 16px; }

  .banner .brand__mark {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 28px;
  }

  .banner .brand__logo {
    height: 64px;
    max-width: min(320px, 70vw);
  }

  .banner .brand__text { gap: 4px; }

  .banner .brand__name {
    font-size: clamp(28px, 8vw, 44px);
    line-height: 1.02;
    letter-spacing: -0.035em;
  }

  .banner .brand__tagline { font-size: clamp(15px, 3.8vw, 18px); }

  .banner .brand--logo-only .brand__logo { height: clamp(64px, 18vw, 96px); }

  /* Wider portrait screens (tablets): contact pills sit bottom-right */
  @media (min-width: 720px) {
    .banner__inner {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 0 32px;
    }

    .banner .pills { justify-content: flex-end; }
  }

  .sheet {
    position: relative;
    z-index: 1;
    margin-top: calc(-1 * var(--overlap));
    border-radius: var(--r-panel) var(--r-panel) 0 0;
    padding:
      18px
      max(14px, calc((100% - var(--maxw)) / 2))
      calc(var(--overlap) + 40px);
  }

  .footer {
    position: relative;
    z-index: 2;
    margin-top: calc(-1 * var(--overlap));
    border-radius: var(--r-panel) var(--r-panel) 0 0;
    padding:
      34px
      max(22px, env(safe-area-inset-right))
      max(24px, env(safe-area-inset-bottom))
      max(22px, env(safe-area-inset-left));
  }
}


/* ==========================================================================
   Wider than 6:5 (landscape, desktop)
   → the banner sizes down to a bar that floats along the top.
   ========================================================================== */
@media (min-aspect-ratio: 6/5) {

  html { scroll-padding-top: 110px; }

  body {
    padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  }

  .banner {
    position: sticky;
    top: var(--gutter);
    z-index: 10;
    max-width: var(--maxw);
    margin: var(--gutter) auto 0;
    border-radius: 22px;
    box-shadow:
      0 1px 2px rgb(0 0 0 / 0.06),
      0 16px 36px -18px color-mix(in srgb, var(--secondary) 75%, transparent);
  }

  .banner::before { display: none; }

  .banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 12px 12px 14px;
  }

  .banner .pills { flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; }

  .banner .brand__name,
  .banner .brand__tagline {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .sheet {
    max-width: var(--maxw);
    margin: var(--gutter) auto 0;
    border-radius: var(--r-panel);
    padding: clamp(16px, 2.4vw, 32px);
  }

  .footer {
    max-width: var(--maxw);
    margin: var(--gutter) auto;
    border-radius: var(--r-panel);
    padding: clamp(22px, 3vw, 36px);
  }
}

/* Not enough room for full pills → round icon buttons, like the app */
@media (min-aspect-ratio: 6/5) and (max-width: 820px) {
  .banner .pill {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .banner .pill__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}


/* ==========================================================================
   Content sheet
   ========================================================================== */
.sheet { background: var(--panel); }

/* Photo with a card that overlaps its bottom edge (like the video) */
.feature {
  display: flex;
  flex-direction: column;
}

.feature__media {
  aspect-ratio: 5 / 2;
  overflow: hidden;
  border-radius: var(--r-media);
  background: var(--fill);
}

.feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Landscape screens: wider photos, so one photo never fills the whole screen */
@media (min-aspect-ratio: 6/5) {
  .feature__media { aspect-ratio: 16 / 5; }
}

.feature__card {
  position: relative;
  flex: 1;
  margin: -44px 12px 0;
  padding: 18px 20px 20px;
  border-radius: var(--r-card);
  background: rgb(242 242 246 / 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow:
    0 1px 1px rgb(0 0 0 / 0.03),
    0 12px 28px -18px rgb(0 0 0 / 0.38);
}

.feature--intro .feature__card { padding-left: 30px; }

/* accent bar (intro card only), like the cards in the app */
.feature--intro .feature__card::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 12px;
  width: 4px;
  border-radius: 4px;
  background: var(--main);
}

.feature__title {
  color: var(--heading);
  font-size: clamp(22px, 5.6vw, 26px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.feature__subtitle {
  margin-top: 6px;
  color: var(--main-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.feature__body { margin-top: 12px; }
.feature__body p { text-wrap: pretty; }

.feature__body a {
  color: var(--main-ink);
  font-weight: 600;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

/* Tag chips (the bullet list from the video) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.07);
}

.chips li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--main);
}

/* Section label with hairline (like "WEEK 41 ———" in the app) */
.services { margin-top: 36px; }

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 4px 14px;
  color: var(--main-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.services__grid {
  display: grid;
  gap: 22px;
}

@media (min-width: 760px) {
  .services__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .services .feature__media { aspect-ratio: 2 / 1; }
  .services .feature__card { margin: -48px 16px 0; }
}

/* Intro: wide photo, card split into heading + text columns */
@media (min-width: 900px) {
  .feature--intro .feature__media { aspect-ratio: 16 / 5; }

  .feature--intro .feature__card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 12px 44px;
    align-items: start;
    margin: -84px 32px 0;
    padding: 30px 36px 32px 48px;
  }

  .feature--intro .feature__card::before {
    top: 28px;
    bottom: 28px;
    left: 20px;
  }

  .feature--intro .feature__title { font-size: 36px; }
  .feature--intro .feature__subtitle { margin-top: 10px; font-size: 18px; }
  .feature--intro .feature__body { margin-top: 2px; font-size: 16.5px; line-height: 1.65; }
}


/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  color: var(--on-secondary);
  background: var(--secondary);
}

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 26px;
}

.footer :focus-visible { outline-color: var(--on-secondary); }

.footer__label {
  margin: 0 0 8px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, currentColor 58%, transparent);
}

.contact-list {
  display: grid;
  gap: 2px;
  padding: 0;
  list-style: none;
}

.contact-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px 7px 7px;
  border-radius: 14px;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

a.contact-list__item:hover { background: color-mix(in srgb, currentColor 9%, transparent); }

.icon-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: color-mix(in srgb, currentColor 10%, transparent);
}

.icon-tile .icon { width: 17px; height: 17px; }

.footer__bottom {
  max-width: var(--maxw);
  margin: 26px auto 0;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  font-size: 13.5px;
  color: color-mix(in srgb, currentColor 62%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--on-secondary) 13%, transparent);
}

@media (min-width: 760px) {
  .footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}
