/*
 * OnTag · tryontag.app
 *
 * Colours, radii and surfaces come from the app's `src/constants/theme.ts`,
 * not from the eye: a marketing site that invents its own greys is a second
 * design system, and it drifts the first time either one moves.
 *
 * No webfonts, no third-party anything. The page loads only what it ships
 * with, which is why it needs no cookie banner. `_headers` makes that a rule
 * the browser enforces rather than a promise.
 */

/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #0B0B0F;
  --elev: #1F1F29;
  --elev-2: #2D2D38;
  --line: #2A2B35;
  --line-2: #44454F;

  --text: #FFFFFF;
  --text-2: #A4A4B2;
  --text-3: #878A9C;

  --silver: #C9CDD6;
  --gold: #E8C15C;
  --diamond: #8AD8FF;

  --rim: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --r-card: 24px;
  --r-pill: 999px;

  --shell: 1160px;
  --gutter: clamp(20px, 5vw, 48px);

  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

/* ------------------------------------------------------------------ type
 * Sentence case everywhere, never capitals (the app's own rule, CLAUDE.md
 * §8). The small label above each section does its job with tracking and a
 * quieter colour instead. */

.kicker {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 18px;
}

.display {
  font-size: clamp(44px, 7.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
  text-wrap: balance;
}

.title {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  text-wrap: balance;
  max-width: 15ch;
}

.title--center { margin-inline: auto; text-align: center; max-width: none; }

.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 34em;
  text-wrap: pretty;
}

.body { color: var(--text-2); max-width: 32em; text-wrap: pretty; }
.body a { color: var(--text); text-underline-offset: 3px; }

/* ------------------------------------------------------------------- nav */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
}

.nav__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__mark img { width: 52px; }

.nav__end { display: flex; align-items: center; gap: 10px; }

.nav__get {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  transition: opacity 0.2s var(--ease);
}
.nav__get:hover { opacity: 0.88; }

.burger {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: grid;
  place-content: center;
  gap: 6px;
  margin-right: -10px;
}
.burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--text); }

/* The bar has no surface until something scrolls under it. */
@supports (animation-timeline: scroll()) {
  .nav {
    animation: frost linear both;
    animation-timeline: scroll(root);
    animation-range: 0 140px;
  }
}
@keyframes frost {
  from { background: rgba(11, 11, 15, 0); border-bottom-color: transparent; }
  to {
    background: rgba(14, 14, 19, 0.72);
    border-bottom-color: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
  }
}

/* ------------------------------------------------------------------ menu */

.menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 14px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border: 0;
  color: var(--text);
  background: rgba(11, 11, 15, 0.9);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
}
.menu:popover-open { display: flex; flex-direction: column; }
.menu::backdrop { background: transparent; }

.menu__top {
  width: 100%;
  max-width: calc(var(--shell) - 2 * var(--gutter));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu__mark { width: 52px; }
.menu__close {
  appearance: none; border: 0; background: none; cursor: pointer;
  width: 44px; height: 44px; margin-right: -10px; display: grid; place-content: center;
}
.menu__close svg { width: 26px; height: 26px; }

.menu__list {
  width: 100%;
  max-width: calc(var(--shell) - 2 * var(--gutter));
  margin: clamp(32px, 8vh, 80px) auto 0;
}
.menu__list a {
  display: block;
  padding: 10px 0;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.menu__list a:hover { color: var(--text); }

.menu__foot {
  width: 100%;
  max-width: calc(var(--shell) - 2 * var(--gutter));
  margin: auto auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.menu__support { color: var(--text-3); font-size: 15px; text-decoration: none; }

@media (prefers-reduced-motion: no-preference) {
  .menu:popover-open { animation: menu-in 0.28s var(--ease); }
  .menu:popover-open .menu__list li { animation: menu-item 0.42s var(--ease) both; }
  .menu:popover-open .menu__list li:nth-child(2) { animation-delay: 30ms; }
  .menu:popover-open .menu__list li:nth-child(3) { animation-delay: 60ms; }
  .menu:popover-open .menu__list li:nth-child(4) { animation-delay: 90ms; }
  .menu:popover-open .menu__list li:nth-child(5) { animation-delay: 120ms; }
  .menu:popover-open .menu__list li:nth-child(6) { animation-delay: 150ms; }
}
@keyframes menu-in { from { opacity: 0; } }
@keyframes menu-item { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------- coming soon */

.soon {
  margin: auto;
  width: min(380px, calc(100% - 40px));
  padding: 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  background: var(--elev);
  box-shadow: var(--rim), 0 30px 90px rgba(0, 0, 0, 0.6);
  color: var(--text);
  text-align: center;
}
.soon::backdrop {
  background: rgba(11, 11, 15, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.soon__title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.soon__body { margin: 10px 0 22px; color: var(--text-2); font-size: 16px; }

.pill {
  appearance: none; border: 0; cursor: pointer;
  background: var(--text); color: var(--bg);
  font-size: 16px; font-weight: 600;
  padding: 12px 28px; border-radius: var(--r-pill);
}

/* ---------------------------------------------------------------- badge
 * Apple's own artwork, untouched. Their guidelines allow no recolouring and
 * no redrawing, only size and clear space. */

.badge {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 9px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.badge img { width: 120px; height: auto; }
.badge--lg img { width: 156px; }
.badge:hover { transform: translateY(-1px); }
.badge:active { transform: none; opacity: 0.85; }
/* The black badge carries a hairline that disappears on our black, so it is
   given the app's own edge from outside rather than changed. */
.badge img { border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16); }

/* ---------------------------------------------------------------- phone
 * A frame built in CSS rather than a picture of one: it stays sharp at any
 * size, and the screenshot inside is the only image. Titanium edge, a
 * hairline of light on top, the side buttons as two short bars. */

.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  aspect-ratio: 1206 / 2622;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.17);
  background:
    linear-gradient(150deg, #5B5D68 0%, #23242B 18%, #121318 55%, #2B2C34 85%, #4C4E58 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 0 0 calc(var(--w) * 0.011) #07070A,
    0 50px 100px -20px rgba(0, 0, 0, 0.75),
    0 20px 40px -10px rgba(0, 0, 0, 0.5);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--w) * 0.14);
}
.phone::before,
.phone::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2A2B33, #4A4C56);
}
.phone::before { left: -2px; top: 19%; height: 7%; }
.phone::after { right: -2px; top: 25%; height: 11%; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding-top: clamp(120px, 18vh, 170px);
  text-align: center;
  isolation: isolate;
  /* The glow is wider than a phone. Clipped here rather than on the body,
     because a phone's browser widens its whole layout to fit anything that
     pokes out, and body clipping does not stop that. */
  overflow-x: clip;
}

.hero__glow {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: -10%;
  width: min(1100px, 140vw);
  aspect-ratio: 1;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgba(201, 205, 214, 0.13), rgba(201, 205, 214, 0.04) 55%, transparent);
  pointer-events: none;
}

.hero__copy { display: flex; flex-direction: column; align-items: center; }
.hero .display { max-width: 12ch; }
.hero .lede { margin-top: 24px; }

.cta { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta__note { font-size: 14px; color: var(--text-3); }

.fan {
  position: relative;
  margin: clamp(56px, 8vw, 88px) auto 0;
  height: clamp(520px, 62vw, 700px);
  display: flex;
  justify-content: center;
  /* Full width on purpose. A mask clips to its own box, so a narrower box
     cut the outer phones off at a hard edge in the middle of the page. As
     wide as the window, the only edge left is the window's own. */
  /* The phones run off the bottom and the page closes over them. */
  -webkit-mask-image: linear-gradient(#000 62%, transparent);
  mask-image: linear-gradient(#000 62%, transparent);
}
.fan .phone { position: absolute; top: 0; }
.phone--front { --w: clamp(250px, 27vw, 320px); z-index: 2; }
.phone--side { --w: clamp(210px, 23vw, 280px); opacity: 0.9; }
.phone--left { translate: calc(-1 * clamp(170px, 24vw, 300px)) 64px; rotate: -7deg; }
.phone--right { translate: clamp(170px, 24vw, 300px) 64px; rotate: 7deg; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .phone--left { animation: fan-left linear both; animation-timeline: scroll(root); animation-range: 0 520px; }
    .phone--right { animation: fan-right linear both; animation-timeline: scroll(root); animation-range: 0 520px; }
  }
}
@keyframes fan-left { to { translate: calc(-1 * clamp(190px, 27vw, 330px)) 40px; rotate: -10deg; } }
@keyframes fan-right { to { translate: clamp(190px, 27vw, 330px) 40px; rotate: 10deg; } }

/* ----------------------------------------------------------------- facts */

.facts { border-block: 1px solid var(--line); }
.facts__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.facts__list li {
  padding: 28px 24px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.facts__list li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.facts__list strong { font-size: 16px; font-weight: 600; }
.facts__list span { font-size: 15px; color: var(--text-3); }

/* --------------------------------------------------------------- problem */

.problem { padding: clamp(100px, 14vw, 180px) 0; }
.manifesto {
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 22ch;
  color: var(--text);
}
.manifesto__turn { color: var(--silver); }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .manifesto span {
      animation: light linear both;
      animation-timeline: view();
      animation-range: cover calc(10% + var(--i) * 1.3%) cover calc(24% + var(--i) * 1.3%);
    }
  }
}
@keyframes light { from { color: #2C2D37; } }

/* -------------------------------------------------------------- features */

.feature { padding: clamp(72px, 10vw, 130px) 0; }

.feature__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
}
.feature--flip .feature__copy { order: 2; }

.feature .body { margin-top: 20px; }

.points { margin-top: 34px; border-top: 1px solid var(--line); max-width: 32em; }
.points li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 16px;
}
.points strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

.feature__media {
  position: relative;
  display: flex;
  justify-content: center;
  isolation: isolate;
}
.feature__media::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10% -20%;
  background: radial-gradient(closest-side, rgba(201, 205, 214, 0.10), transparent);
}
.feature--coach .feature__media::before {
  background: radial-gradient(closest-side, rgba(138, 216, 255, 0.10), transparent);
}
.feature__media .phone { --w: clamp(250px, 26vw, 310px); }
.feature__media .phone--peek {
  --w: clamp(200px, 20vw, 240px);
  position: absolute;
  right: 0;
  bottom: -40px;
  rotate: 6deg;
}
.feature__media:has(.phone--peek) { justify-content: flex-start; padding-left: 6%; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .feature__media .phone {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(60px); } }

/* ----------------------------------------------------------------- steps */

.steps { padding: clamp(80px, 11vw, 140px) 0; border-top: 1px solid var(--line); }
.steps .kicker { text-align: center; }
.steps__list {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.steps__list li {
  padding: 32px 28px 34px;
  border-radius: var(--r-card);
  background: var(--elev);
  border: 1px solid var(--line);
  box-shadow: var(--rim);
}
.steps__n {
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--silver);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 28px;
}
.steps__list h3 { font-size: 21px; letter-spacing: -0.02em; margin-bottom: 8px; }
.steps__list p { color: var(--text-2); font-size: 16px; }

/* ------------------------------------------------------------------- who */

.who { padding: clamp(80px, 11vw, 140px) 0; }
.who__grid {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  padding: 30px 28px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 60%), var(--elev);
  box-shadow: var(--rim);
}
.card h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 16px; }

/* --------------------------------------------------------------- privacy */

.privacy { padding: clamp(80px, 11vw, 140px) 0; border-top: 1px solid var(--line); }
.privacy__grid {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.vow { padding: 30px 32px 34px 0; border-bottom: 1px solid var(--line); }
.vow:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--line); }
.vow h3 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 8px; }
.vow p { color: var(--text-2); font-size: 16px; max-width: 30em; }

/* ------------------------------------------------------------------- faq */

.faq { padding: clamp(80px, 11vw, 140px) 0; border-top: 1px solid var(--line); }
.faq__inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); }
.faq .body { margin-top: 18px; }
.faq__list { border-top: 1px solid var(--line); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  position: relative;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  translate: 0 -70%;
  rotate: 45deg;
  transition: rotate 0.25s var(--ease), translate 0.25s var(--ease);
}
.faq__list details[open] summary::after { rotate: 225deg; translate: 0 -20%; }
.faq__list details p { padding: 0 44px 24px 0; color: var(--text-2); font-size: 16px; }

/* ----------------------------------------------------------------- close */

.close {
  position: relative;
  padding: clamp(110px, 15vw, 190px) 0;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.close__glow {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(900px, 130vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(201, 205, 214, 0.11), transparent);
}
.close__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.close__mark { width: 112px; }
.display--close { max-width: 11ch; font-size: clamp(40px, 6.4vw, 80px); }
.close .cta__note { margin-top: -12px; }

/* ------------------------------------------------------------------ foot */

.foot { border-top: 1px solid var(--line); padding: 36px 0 max(36px, env(safe-area-inset-bottom)); }
.foot__inner { display: flex; align-items: center; gap: 32px; }
.foot__mark { width: 40px; }
.foot__links { display: flex; gap: 24px; flex-wrap: wrap; margin-left: auto; }
.foot__links a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.foot__links a:hover { color: var(--text); }
.foot__copy { color: var(--text-3); font-size: 14px; }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 900px) {
  .feature__grid { grid-template-columns: 1fr; }
  .feature--flip .feature__copy { order: 0; }
  .feature__media:has(.phone--peek) { justify-content: center; padding-left: 0; }
  .feature__media .phone--peek { right: 4%; }
  .facts__list { grid-template-columns: repeat(2, 1fr); }
  .facts__list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts__list li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .steps__list, .who__grid { grid-template-columns: 1fr; }
  .faq__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .nav__get { display: none; }
  .nav__mark img, .menu__mark { width: 46px; }
  .hero .lede { font-size: 17.5px; }
  .fan { height: 560px; }
  .phone--front { --w: 248px; }
  .phone--side { --w: 210px; }
  .phone--left { translate: -132px 70px; }
  .phone--right { translate: 132px 70px; }
  @keyframes fan-left { to { translate: -144px 54px; rotate: -10deg; } }
  @keyframes fan-right { to { translate: 144px 54px; rotate: 10deg; } }
  .feature__media .phone { --w: 240px; }
  .feature__media::before { inset: -10% 0; }
  .feature__media .phone--peek { display: none; }
  .facts__list { grid-template-columns: 1fr; }
  .facts__list li, .facts__list li + li { padding: 18px 0; border-left: 0; }
  .facts__list li + li { border-top: 1px solid var(--line); }
  .privacy__grid { grid-template-columns: 1fr; }
  .vow, .vow:nth-child(even) { padding: 26px 0 28px; border-left: 0; }
  .foot__inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .foot__links { margin-left: 0; }
}
