/* ==========================================================================
   Trendo — trendo.fashion
   Design: "The Verdict" (approved 2026-07-28)
   Tokens taken from the app's color_variables.dart via trendo-brand-kit.
   Deliberately light-only: the approved direction is warm-light editorial.
   ========================================================================== */

/* --- Playfair Display: the display face. Self-hosted, OFL, 52K. ---------- */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand — one violet, used only on actions */
  --violet:        #5A4FE0;
  --violet-press:  #4A3FC7;
  --violet-soft:   #EEECFB;

  /* Grounds */
  --ground:        #FBFAF8;  /* warm white — the page */
  --surface:       #F6F5F8;  /* section fills */
  --card:          #FFFFFF;

  /* Ink — neutrals carry a slight violet bias by design */
  --ink:           #17161B;  /* headlines */
  --body:          #3B3944;  /* body copy */
  --muted:         #63606B;  /* AA on all three grounds */
  --faint:         #6A6773;  /* was 2.9:1 — failed AA */
  --rule:          #E9E7EF;

  /* Semantic */
  --good:          #1B7A4C;  /* was 2.76:1 on --surface */

  --serif: "Playfair Display", Georgia, "Times New Roman", ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --read: 62ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
/* The UA sheet gives <figure> `margin: 1em 40px` and <dl>/<dd> their own margins.
   Unreset, figure.verdict indented 40px, blew the stacked grid track past the column
   and made the homepage scroll sideways. */
figure, dl, dd { margin: 0; }

a { color: var(--violet); text-underline-offset: 2px; }
a:hover { color: var(--violet-press); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 760px; margin-inline: auto; }

/* --- Type ---------------------------------------------------------------- */
h1, h2, h3 { color: var(--ink); text-wrap: balance; margin: 0; }

h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.3rem, 6.2vw, 4rem);
  line-height: 1.06; letter-spacing: -.02em;
}
h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.14; letter-spacing: -.015em;
}
h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 1.09rem; line-height: 1.35; letter-spacing: -.005em;
}
p { margin: 0; }

.eyebrow {
  font-family: var(--sans); font-size: .74rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--violet);
}
.lede { font-size: 1.19rem; line-height: 1.55; color: var(--body); max-width: 34ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; line-height: 1.55; color: var(--muted); }

/* --- Header -------------------------------------------------------------- */
/* Safe area: if the site is added to an iPhone home screen (standalone), or viewed
   in landscape on a notched device, the top/side insets are non-zero and the sticky
   bar would otherwise sit under the Dynamic Island. env() is 0 in normal Safari, so
   this costs nothing there. */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-head .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 72px;
}
.brand { display: flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
/* The logo is a WORDMARK (aspect ~4.4), not an icon. Height-constrained with
   width:auto so it can never be squashed — the brand kit forbids stretching it.
   ⚠️ Must be the BLACK wordmark: the "color" file letters TRENDO in WHITE and
   vanishes on this warm-white ground. Only the blue mark would show. */
.brand img { height: 30px; width: auto; max-width: none; }
@media (max-width: 520px) { .brand img { height: 24px; } }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a {
  font-size: .92rem; color: var(--body); text-decoration: none; font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--violet); }
@media (max-width: 860px) {
  /* Seven items don't fit a phone. It scrolls sideways — so it has to LOOK like it
     scrolls, or items 4-7 are simply invisible. The mask fades the right edge while
     there is more to reach, and the row keeps its own scrollbar hidden. */
  .site-nav {
    gap: 18px; font-size: .85rem;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    padding-right: 20px;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; font-size: .85rem; scroll-snap-align: start;
                display: flex; align-items: center; min-height: 44px; }
  .site-head .bar { gap: 14px; height: 64px; }
}

/* --- Sections ------------------------------------------------------------ */
section { padding: clamp(56px, 8vw, 104px) 0; }
section.tint { background: var(--surface); }
section.tint + section.tint { padding-top: 0; }
.sec-head { max-width: 46ch; margin-bottom: 40px; display: grid; gap: 14px; }

/* --- Hero ---------------------------------------------------------------- */
.hero { padding-top: clamp(44px, 6vw, 76px); padding-bottom: clamp(48px, 7vw, 88px); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
/* Four heroes use a bare .wrap.narrow (not the .hero-copy grid), so the eyebrow had
   no gap at all under `p { margin: 0 }`. */
.hero .narrow > .eyebrow { margin-bottom: 18px; }
.hero-copy .lede { max-width: 38ch; }

/* --- Buttons / store badge ----------------------------------------------- */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--violet); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .97rem;
  padding: 14px 24px; border-radius: 12px; border: 0;
  transition: background .15s ease;
}
.btn:hover { background: var(--violet-press); color: #fff; }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule); padding: 13px 23px;
}
.btn.ghost:hover { background: var(--card); color: var(--ink); border-color: var(--faint); }

/* While every badge inside it is hidden, the row would still consume a grid gap.
   Collapse it, and un-collapse itself the moment the badge goes live. */
.cta-row:not(:has(a:not([hidden]))) { display: none; }

/* The App Store badge ships BUILT but HIDDEN.
   To launch: delete the `hidden` attribute in the HTML. Nothing else. */
[data-store-badge][hidden] { display: none !important; }

.launch-note {
  font-size: .92rem; color: var(--muted); line-height: 1.55; max-width: 42ch;
}
.launch-note b { color: var(--ink); font-weight: 600; }

/* --- The verdict card (hero) --------------------------------------------- */
.verdict {
  background: var(--card); border: 1px solid var(--rule); border-radius: 20px;
  padding: 22px; box-shadow: 0 1px 2px rgba(23,22,27,.04), 0 12px 32px rgba(23,22,27,.05);
  display: grid; gap: 18px;

  min-width: 0;
}
.verdict-top { display: flex; align-items: center; gap: 12px; }
.verdict-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
}
/* Whole screen, uncropped — same rule as every other screenshot on the site.
   The phone is held to 290px inside the card so the verdict and scores below it
   still land on screen; the card, not the image, does the sizing. */
.verdict-media {
  border-radius: 14px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--rule);
  max-width: 290px; width: 100%; margin-inline: auto;
}
.verdict-media img { width: 100%; height: auto; }
.verdict blockquote {
  margin: 0; font-family: var(--serif); font-weight: 700;
  font-size: 1.3rem; line-height: 1.3; color: var(--ink); letter-spacing: -.01em;
}
.verdict .fix { font-size: .95rem; color: var(--body); }
/* `1fr` means `minmax(auto, 1fr)`, and that `auto` floor is min-content — so the widest
   label ("SILHOUETTE", uppercase with .1em tracking) pinned each track open and held
   figure.verdict at 338px however narrow the viewport got. Measured: 2px of sideways
   scroll at 360px, 42px at 320px. `minmax(0, …)` removes the floor; the figure needs
   min-width:0 for the same reason, being itself a grid item. Same failure the note at
   the top of this file describes — it came back by a different route. */
.scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.score {
  background: var(--surface); border-radius: 12px; padding: 11px 12px;
  display: grid; gap: 2px;
}
.score dt {
  font-size: .7rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.score dd { margin: 0; font-size: .95rem; font-weight: 600; color: var(--ink); }
.score dd.good { color: var(--good); }
.caption { font-size: .84rem; color: var(--muted); line-height: 1.5; }

/* --- Feature grid -------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 26px; } }

.feature { display: grid; gap: 9px; align-content: start; }
.feature h3 { color: var(--ink); }
.feature p { font-size: .97rem; color: var(--body); }
.feature .cant { font-size: .9rem; color: var(--muted); }
.feature .cant b { color: var(--body); font-weight: 600; }

/* --- Steps --------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: st; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: st; display: grid; gap: 8px; align-content: start; }
.step::before {
  content: counter(st);
  font-family: var(--serif); font-weight: 700; font-size: 1.6rem;
  color: var(--violet); line-height: 1;
}

/* --- Answer block (the quotable one) ------------------------------------- */
.answer {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 20px; padding: clamp(26px, 4vw, 44px);
  display: grid; gap: 16px;
}
.answer h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
.answer p { font-size: 1.05rem; max-width: var(--read); }

/* --- Split (copy + screenshot) ------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
/* Sections alternate down the page: figure right, figure left, figure right…
   A .flip section carries its figure FIRST in the DOM so it lands left on desktop.
   Three element types can be that figure — .shot, .feed-shot and .verdict — and all
   three must be listed here, or a .verdict flips on desktop but not on a phone. */
.split.flip > .shot,
.split.flip > .feed-shot,
.split.flip > .verdict { order: -1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  /* Stacked on a phone, DOM order would put an unlabelled screenshot above its own
     heading. order:1 pushes it back below the copy. (order:0 — what was here before —
     changes nothing, because DOM order already placed it first.) */
  .split.flip > .shot,
  .split.flip > .feed-shot,
  .split.flip > .verdict { order: 1; }
}

.split-copy { display: grid; gap: 16px; align-content: center; }
.shot {
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--rule); background: var(--card);
  max-width: 330px; margin-inline: auto; width: 100%;
  box-shadow: 0 1px 2px rgba(23,22,27,.04), 0 18px 44px rgba(23,22,27,.07);
}
.shot img { width: 100%; height: auto; }

/* Inspiration feed: the WHOLE screen, uncropped. A feed only reads as a feed
   when you can see the grid continue past the fold — so no windowing here. */
.feed-shot {
  border-radius: 22px; overflow: hidden; border: 1px solid var(--rule);
  background: var(--card); width: 100%;
  max-width: 330px; margin-inline: auto;
  box-shadow: 0 1px 2px rgba(23,22,27,.04), 0 18px 44px rgba(23,22,27,.07);
}
.feed-shot img { width: 100%; height: auto; }
.ai-note {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; color: var(--muted);
  background: var(--violet-soft); border-radius: 999px; padding: 6px 13px;
  justify-self: start;
}
.ai-note b { color: var(--violet); font-weight: 700; }

.suggest {
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px;
  padding: 18px; display: grid; gap: 9px;
}
.suggest .when {
  font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.suggest q { font-size: 1.02rem; color: var(--ink); font-style: normal; }

/* --- Tiers --------------------------------------------------------------- */
.tier {
  background: var(--card); border: 1px solid var(--rule); border-radius: 20px;
  padding: 28px; display: grid; gap: 10px; align-content: start;
}
.tier.pro { border-color: var(--violet); }
.tier h3 { font-size: 1.15rem; }
.tier .tag {
  justify-self: start; font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--violet);
  background: var(--violet-soft); padding: 4px 9px; border-radius: 999px;
}

/* --- FAQ ----------------------------------------------------------------- */
.faq { display: grid; gap: 32px; max-width: var(--read); }
.faq-item { display: grid; gap: 9px; }
.faq-item h3 { font-size: 1.06rem; }
.faq-item p { font-size: 1rem; }

/* --- Standalone emphasis line --------------------------------------------- */
/* A single short sentence used as its own beat, not a heading and not body
   copy — e.g. "Relevance is." Reserve it for the one or two moments per page
   that should land harder than a paragraph; overuse flattens the effect. */
.standout { font-family: var(--sans); font-weight: 700; font-size: 1.18rem; color: var(--ink); margin: 0; }

/* --- Partner-type list (stacked, not gridded — these blocks run long) ----- */
.partner-types { display: grid; max-width: var(--read); }
.partner-type { padding: 30px 0; border-top: 1px solid var(--rule); }
.partner-type:first-child { padding-top: 0; border-top: 0; }
.partner-type h3 { font-size: 1.14rem; margin-bottom: 10px; }
.partner-type > p { font-size: 1.02rem; color: var(--body); margin: 0 0 16px; }

/* --- Honesty list -------------------------------------------------------- */
.honest { display: grid; gap: 18px; max-width: var(--read); list-style: none; padding: 0; margin: 0; }
.honest li {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  font-size: 1.02rem; color: var(--body);
}
.honest li::before { content: "—"; color: var(--violet); font-weight: 700; }
.honest b { color: var(--ink); font-weight: 600; }

/* --- Closing ------------------------------------------------------------- */
.closing { text-align: center; display: grid; gap: 20px; justify-items: center; }
.closing h2 { max-width: 18ch; }
.closing .launch-note { text-align: center; margin-inline: auto; }

/* --- Footer -------------------------------------------------------------- */
.site-foot {
  border-top: 1px solid var(--rule);
  padding: 44px 0 calc(60px + env(safe-area-inset-bottom, 0px));
  background: var(--ground);
}
.foot-grid { display: grid; gap: 34px; }
/* Four labelled columns instead of one long link row: the flat list gave a reader no
   way to tell a product page from a legal one. auto-fit keeps it a single column on a
   phone without a second breakpoint. */
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px 32px; }
.foot-col { display: grid; gap: 9px; align-content: start; }
.foot-col h2 {
  font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 2px;
}
/* Same colour as body text with no underline meant these read as prose on touch,
   where :hover never fires. */
.foot-col a { font-size: .92rem; color: var(--body); text-decoration: none; }
.foot-col a:hover { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.foot-legal { font-size: .84rem; color: var(--faint); line-height: 1.7; }

/* --- Screenshot gallery --------------------------------------------------- */
/* Several screens from one flow, side by side. Scroll-snap rather than a JS carousel:
   it swipes natively on a phone, scrolls on a trackpad, is reachable by keyboard, and
   degrades to a plain row if scroll-snap is unsupported. No script, no state. */
.shot-gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 246px);
  gap: 18px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 4px 4px 10px;
  /* full-bleed edges so a swiped card can sit against the gutter */
  margin-inline: calc(-1 * max(24px, env(safe-area-inset-left, 0px)));
  padding-inline: max(24px, env(safe-area-inset-left, 0px));
}
.shot-gallery::-webkit-scrollbar { display: none; }
.gshot { scroll-snap-align: start; display: grid; gap: 11px; margin: 0; }
.gshot picture {
  display: block; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--rule); background: var(--card);
  box-shadow: 0 1px 2px rgba(23,22,27,.04), 0 14px 34px rgba(23,22,27,.07);
}
.gshot img { width: 100%; height: auto; }
.gshot figcaption { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.gallery-note { font-size: .84rem; color: var(--faint); margin-top: 12px; }
@media (hover: hover) { .gallery-note { display: none; } }

/* --- Availability component ---------------------------------------------- */
/* Launch state is rendered by tools/set-availability.py — never hand-typed. */
.availability { display: grid; gap: 10px; justify-items: start; }
.closing .availability { justify-items: center; }
.avail-line { font-size: 1rem; color: var(--body); }
.avail-secondary a { font-weight: 600; }
.avail-android, .trust-line { font-size: .88rem; color: var(--muted); line-height: 1.6; }
.trust-line { max-width: 44ch; }
.closing .trust-line { margin-inline: auto; }
.tier-tag {
  display: inline-block; vertical-align: 4px; margin-left: 10px;
  font-family: var(--sans); font-size: .62rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  background: var(--surface); border: 1px solid var(--rule);
  padding: 4px 9px; border-radius: 99px;
}
.tier-tag.pro { color: var(--violet); background: var(--violet-soft); border-color: transparent; }

/* ==========================================================================
   PHONE OVERRIDES — must stay LAST in this file.
   These are single-class selectors, and a media query adds no specificity, so if
   they sit above the base rules the base rules win. That is exactly what happened:
   a 250px cap declared earlier was silently beaten by `.shot { max-width: 330px }`
   and every screenshot rendered 639px tall on a 390px phone.
   ========================================================================== */
@media (max-width: 620px) {
  /* A whole phone screen is ~1:1.94. At 330px that is 640px — 79% of the viewport,
     five times over on the homepage. */
  .shot, .feed-shot { max-width: 250px; }
  .verdict-media    { max-width: 215px; }
  .verdict          { padding: 18px; }

  /* 1.06 is a 64px-poster leading; on a 36.8px three-line heading the half-leading
     goes negative and descenders clip. */
  h1 { line-height: 1.14; }
  h2 { line-height: 1.20; }

  /* A stadium pill that wraps to two lines curves into its own text. */
  .ai-note { align-items: flex-start; border-radius: 14px; padding: 9px 14px; }

  /* Centring a 3-4 line paragraph in a 342px column ragged-edges both sides. */
  .closing .lede { text-align: left; }
  /* Three uppercase score labels will not sit side by side on a phone without pinning
     the card open again — two columns keeps each label inside its own box. */
  .scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   ALTERNATING FIGURE — the site claims Trendo is unisex three times. One model
   contradicts that no matter what the copy says, so the screens that contain a
   person cross-fade between a female and a male render.
   Pure CSS: no JS, no layout shift (both frames are absolutely stacked in a
   ratio-locked box), and it stops dead for anyone who asks for reduced motion.
   ========================================================================== */
.alt-slide { position: relative; }
.alt-slide > img,
.alt-slide > picture { position: absolute; inset: 0; }
.alt-slide > picture > img { width: 100%; height: 100%; object-fit: cover; }
.alt-slide > :first-child { animation: alt-a 9s infinite; }
.alt-slide > :last-child  { animation: alt-b 9s infinite; }

@keyframes alt-a {
  0%, 42% { opacity: 1; }
  50%, 92% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes alt-b {
  0%, 42% { opacity: 0; }
  50%, 92% { opacity: 1; }
  100% { opacity: 0; }
}

/* Reduced motion: hold the first frame, no cross-fade at all. */
@media (prefers-reduced-motion: reduce) {
  .alt-slide > :first-child,
  .alt-slide > :last-child { animation: none; }
  .alt-slide > :last-child { opacity: 0; }
}

/* The wrappers need an explicit ratio because both frames are absolute. */
/* Every app screenshot is cropped to the same frame (source y180–y2521 → 750x1456),
   so one ratio covers all of them. The absolutely-positioned children inside
   .alt-slide have no intrinsic height, so this box is what reserves the space. */
.shot.alt-slide, .feed-shot.alt-slide { aspect-ratio: 750 / 1456; }
