/* Lona website: shared tokens, type, layout, and the iPhone frame every demo is built in.
   The app is light-only, and so is the site. */

:root {
  color-scheme: light;

  /* Page */
  --paper: #f8f4ee;
  --paper-2: #f2ede6;      /* the app's photo backdrop (Theme.photoBackdrop) */
  --sand: #ece9e4;         /* onboarding and body picker beige */
  --studio: #e6e5e3;       /* the grey studio wall of renders */
  --stage: #eceae8;        /* Theme.stage: the warm grey that looks stand on in Outfits, outfit pages and Me */
  --ink: #1b1815;
  --ink-2: #5d574f;
  --ink-3: #6f685f;        /* 4.5:1 on --paper, --sand and --outfits-bg */
  --line: rgba(27, 24, 21, 0.1);
  --line-2: rgba(27, 24, 21, 0.16);
  --white: #ffffff;

  /* Brand */
  --accent: #5a5bd8;       /* AccentColor (Lona purple) */
  --accent-ink: #4a4bc4;   /* accent for small text on light backgrounds (AA: 5.7:1 or more on every background here) */
  --accent-soft: #eeedfb;  /* "Shop a screenshot" card */
  --good: #3d8554;         /* price drops, "Great on you" */
  --tricky: #b8661a;       /* "Tricky near your face" */

  /* iOS */
  --ios-fill: #efeff0;     /* chips, segmented control */
  --ios-fill-2: #e4e4e6;
  --ios-label-2: #8a8a8e;
  --ios-blue: #0a84ff;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Newsreader", "New York", ui-serif, Georgia, "Times New Roman", serif;

  /* Layout */
  --demo-phone: min(340px, 84vw);   /* one phone size for the feature demos */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius: 22px;
  --radius-lg: 32px;
  --shadow-1: 0 1px 2px rgba(27, 24, 21, 0.06), 0 8px 24px rgba(27, 24, 21, 0.06);
  --shadow-2: 0 2px 6px rgba(27, 24, 21, 0.08), 0 24px 60px rgba(27, 24, 21, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Type ---------- */
.display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(48px, 8.4vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}
.h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-serif);
  font-weight: 450;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h4 { font-size: 18px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
.display em, .h2 em, .h3 em { font-style: italic; color: var(--accent); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 38em; text-wrap: pretty; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 9vw, 128px); position: relative; }
.section-head { display: grid; gap: 20px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.split { display: grid; gap: clamp(40px, 6vw, 96px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.reverse > :first-child { order: 2; }
}

/* Feature list: short points under a section's copy. */
.points { display: grid; gap: 18px; padding: 0; list-style: none; margin-top: 28px; }
.points li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.points li > svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.points strong { font-weight: 650; }
.points p { color: var(--ink-2); }

/* ---------- Buttons and badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-ghost { background: rgba(27, 24, 21, 0.06); color: var(--ink); }
.btn-ghost:hover { background: rgba(27, 24, 21, 0.1); }

/* "Coming soon to iPhone": the site's only call to action. */
.soon {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 14px; border-radius: 16px;
  background: var(--ink); color: var(--paper); text-decoration: none;
}
.soon svg { width: 26px; height: 26px; flex: none; }
.soon span { display: grid; line-height: 1.15; }
.soon small { font-size: 11.5px; letter-spacing: 0.04em; opacity: 0.72; }
.soon b { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.soon.light { background: var(--paper); color: var(--ink); }
.pill-soon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.pill-soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(90, 91, 216, 0.3); }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--paper-2); font-size: 13px; font-weight: 550; color: var(--ink-2);
}

/* Demo controls outside the phone (e.g. "Replay", choices to try). */
.demo-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line-2); font-size: 14.5px; font-weight: 550;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.chip-btn:hover { border-color: var(--ink-3); }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-btn:active { transform: scale(0.97); }

/* A note under a demo saying what's simulated. */
.demo-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: center; text-wrap: balance; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =====================================================================================================
   iPhone frame. Markup:
     <div class="phone" data-tab="studio" style="--phone-w: 320px">
       <div class="phone__screen"> …the app screen… </div>
     </div>
   base.js adds the status bar, Dynamic Island and floating tab bar (data-tab = closet | outfits | studio |
   shop | me, or "none" for no tab bar).

   Inside .phone__screen, size everything in iOS points with var(--pt): the screen is 402 pt wide (iPhone 17),
   so `font-size: calc(var(--pt) * 17)` is body text at any phone size.
   ===================================================================================================== */
.phone {
  --phone-w: 320px;
  --pt: calc(100cqw / 402);
  position: relative;
  width: var(--phone-w);
  max-width: 100%;
  flex: none;
  border-radius: calc(var(--phone-w) * 0.155);
  padding: calc(var(--phone-w) * 0.032);
  background: linear-gradient(145deg, #3a3633, #121110 40%, #2a2724);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 30px 70px -10px rgba(40, 25, 15, 0.35),
    0 60px 120px -40px rgba(40, 25, 15, 0.3);
}
.phone__screen {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 874;  /* the iPhone 17 screen; the frame grows around it */
  overflow: hidden;
  border-radius: calc(var(--phone-w) * 0.125);
  background: var(--white);
  color: #000;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}

/* Body text inside the phone: 17 pt. Set on the screen's children, because the screen can't measure itself in its own
   container units; :where() keeps it weaker than any class, so anything with its own size keeps it. */
:where(.phone__screen) > * { font-size: calc(var(--pt) * 17); line-height: 1.25; }

/* Status bar and Dynamic Island (added by base.js) */
.ios-status {
  position: absolute; inset: 0 0 auto 0; z-index: 30; pointer-events: none;
  height: calc(var(--pt) * 54);
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--pt) * 6) calc(var(--pt) * 30) 0 calc(var(--pt) * 46);
  font-size: calc(var(--pt) * 17); font-weight: 600; letter-spacing: -0.02em;
}
.ios-status__right { display: flex; align-items: center; gap: calc(var(--pt) * 6); }
.ios-status__right svg { height: calc(var(--pt) * 12.5); width: auto; }
.ios-island {
  position: absolute; z-index: 31; pointer-events: none;
  top: calc(var(--pt) * 11); left: 50%; transform: translateX(-50%);
  width: calc(var(--pt) * 124); height: calc(var(--pt) * 36); border-radius: 999px; background: #000;
}
.ios-home {
  position: absolute; z-index: 31; pointer-events: none;
  bottom: calc(var(--pt) * 8); left: 50%; transform: translateX(-50%);
  width: calc(var(--pt) * 140); height: calc(var(--pt) * 5); border-radius: 999px; background: rgba(0, 0, 0, 0.82);
}

/* Floating tab bar (iOS 26) */
.ios-tabbar {
  position: absolute; z-index: 25;
  left: calc(var(--pt) * 21); right: calc(var(--pt) * 21); bottom: calc(var(--pt) * 21);
  height: calc(var(--pt) * 62);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 0 calc(var(--pt) * 4);
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 calc(var(--pt) * 6) calc(var(--pt) * 24) rgba(0, 0, 0, 0.1);
}
.ios-tab {
  display: grid; justify-items: center; gap: calc(var(--pt) * 2);
  padding: calc(var(--pt) * 7) 0 calc(var(--pt) * 6);
  border-radius: 999px;
  font-size: calc(var(--pt) * 10.5); font-weight: 500; color: #1c1c1e;
}
.ios-tab svg { width: calc(var(--pt) * 25); height: calc(var(--pt) * 25); }
.ios-tab.is-active { color: var(--accent); background: rgba(0, 0, 0, 0.055); }

/* Common app UI */
.ios-content { position: absolute; inset: 0; padding-top: calc(var(--pt) * 54); overflow: hidden; }
.ios-largetitle {
  font-size: calc(var(--pt) * 34); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  padding: calc(var(--pt) * 8) calc(var(--pt) * 16) calc(var(--pt) * 6);
}
.ios-navtitle { font-size: calc(var(--pt) * 17); font-weight: 600; text-align: center; }
.ios-glassbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--pt) * 6);
  min-width: calc(var(--pt) * 44); height: calc(var(--pt) * 44); padding: 0 calc(var(--pt) * 14);
  border-radius: 999px; background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.05), 0 calc(var(--pt) * 4) calc(var(--pt) * 16) rgba(0, 0, 0, 0.08);
  font-size: calc(var(--pt) * 17); font-weight: 500;
}
.ios-glassbtn svg { width: calc(var(--pt) * 20); height: calc(var(--pt) * 20); }
.ios-chips { display: flex; gap: calc(var(--pt) * 8); padding: 0 calc(var(--pt) * 16); overflow: hidden; white-space: nowrap; }
.ios-chip {
  flex: none; display: inline-flex; align-items: center; gap: calc(var(--pt) * 5);
  height: calc(var(--pt) * 32); padding: 0 calc(var(--pt) * 14); border-radius: 999px;
  background: var(--ios-fill); font-size: calc(var(--pt) * 15); font-weight: 500; color: #000;
}
.ios-chip small { font-size: inherit; color: var(--ios-label-2); font-weight: 400; }
.ios-chip.is-on { background: #000; color: #fff; }
.ios-seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  margin: 0 calc(var(--pt) * 16); padding: calc(var(--pt) * 2); border-radius: 999px; background: var(--ios-fill);
}
.ios-seg span {
  text-align: center; padding: calc(var(--pt) * 6) 0; border-radius: 999px;
  font-size: calc(var(--pt) * 15); font-weight: 500;
}
.ios-seg span.is-on { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.ios-pillnote {
  display: inline-flex; align-items: center; gap: calc(var(--pt) * 6);
  padding: calc(var(--pt) * 7) calc(var(--pt) * 14); border-radius: 999px;
  background: rgba(255, 255, 255, 0.9); font-size: calc(var(--pt) * 14); font-weight: 500;
  box-shadow: 0 calc(var(--pt) * 2) calc(var(--pt) * 10) rgba(0, 0, 0, 0.06);
}
.ios-serif { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.01em; }

/* A closet card: the piece on the beige photo backdrop, name, brand. */
.item-card { display: grid; gap: calc(var(--pt) * 2); min-width: 0; }
.item-card__photo {
  aspect-ratio: 3 / 4; border-radius: calc(var(--pt) * 14); background: var(--paper-2);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.item-card__photo img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; }
.item-card__name { font-size: calc(var(--pt) * 13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: calc(var(--pt) * 4); }
.item-card__brand { font-size: calc(var(--pt) * 10.5); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ios-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Shimmer while a render is "made". */
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.is-rendering::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%) 0 0 / 250% 100%;
  animation: shimmer 1.3s linear infinite;
}
