/* Evenstep website. Tokens follow the app's DesignSystem.swift. */
@font-face { font-family: "Instrument Sans"; src: url("/assets/fonts/InstrumentSans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/assets/fonts/IBMPlexSans.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --ink: #16181D;
  --lime: #C5EE4F;
  --accent: #3F5C00;
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --muted: #EFEDE7;
  --text-2: #5D616A;
  --border: #E4E2DB;
  --on-lime: #16181D;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --display: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --max: 1120px;
  /* Light only: the app and every screenshot on the site are light. */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
.fine { color: var(--text-2); font-size: .85rem; line-height: 1.5; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Header and footer */
header.site, .wrap, footer.site { max-width: var(--max); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { header.site, .wrap, footer.site { padding-left: 32px; padding-right: 32px; } }
header.site { display: flex; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 650 1.2rem var(--display); letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
header.site nav { display: none; gap: 22px; margin-left: auto; }
header.site nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
header.site nav a:hover { color: var(--accent); }
@media (min-width: 760px) { header.site nav { display: flex; } }
.langs { position: relative; margin-left: auto; }
@media (min-width: 760px) { .langs { margin-left: 0; } }
.langs summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: .9rem; background: var(--surface); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { width: 18px; height: 18px; }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; list-style: none; margin: 0; padding: 6px; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: 0 10px 30px rgb(0 0 0 / .12); }
.langs li a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.langs li a:hover, .langs li a[aria-current] { background: var(--muted); }

footer.site { border-top: 1px solid var(--border); margin-top: 72px; padding-top: 40px; padding-bottom: 48px; }
main.home + footer.site { margin-top: 0; border-top: 0; padding-top: 56px; }
footer.site .cols { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; margin-bottom: 28px; }
@media (min-width: 900px) { footer.site .cols { grid-template-columns: 1.4fr repeat(4, 1fr); } }
footer.site .about { grid-column: 1 / -1; }
@media (min-width: 900px) { footer.site .about { grid-column: auto; } }
footer.site .about p { color: var(--text-2); margin-top: 10px; font-size: .95rem; }
footer.site h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); font-family: var(--body); font-weight: 600; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 6px 0; font-size: .93rem; }
footer.site li a { color: var(--ink); text-decoration: none; }
footer.site li a:hover { color: var(--accent); text-decoration: underline; }

/* Hero */
.hero { display: grid; gap: 40px; align-items: center; padding: 32px 0 48px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 56px 0 72px; } .hero.no-shot { grid-template-columns: 1fr; } }
.hero.no-shot { padding-bottom: 8px; }
.hero.no-shot + .tool { margin-top: 16px; }
.hero.no-shot .hero-text { max-width: 760px; }
.lead { font-size: 1.2rem; color: var(--text-2); max-width: 36em; }
.hero-cta { margin-top: 28px; }
.crumbs { font-size: .88rem; color: var(--text-2); margin-bottom: 16px; display: flex; gap: 8px; }
.crumbs a { color: var(--text-2); }

.store { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: var(--r-md); background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 1rem; }
.store:hover { opacity: .9; }
.store .apple { width: 18px; height: 22px; }
.store.soon { opacity: .9; cursor: default; }
.cta-note { margin: 10px 0 0; color: var(--text-2); font-size: .9rem; }

.phones { position: relative; display: flex; justify-content: center; gap: 16px; }
.phone { margin: 0; flex: 0 1 260px; border-radius: 36px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--border), 0 24px 60px -20px rgb(22 24 29 / .35); }
.phone img { width: 100%; }
/* A page's own screenshot stands on one lime step. */
.hero .phones.single { flex-direction: column; align-items: center; gap: 0; }
.hero .phones.single .phone { flex: none; width: min(300px, 78%); }
.hero .phones.single::after { content: ""; width: min(380px, 100%); height: 44px; margin-top: 14px; background: var(--lime); border-radius: 10px 10px 0 0; }
.phones.single .phone { flex-basis: 300px; }
.phones.aside { align-self: start; position: sticky; top: 24px; }
.phones.aside .phone { flex-basis: 260px; }

/* Sections */
.page > section, .page > .body-grid { margin: 56px 0; }
.page > .hero { margin: 0; }

/* Home: full-width bands, each with its own ground colour. */
.band { padding: 64px 0; }
@media (min-width: 900px) { .band { padding: 96px 0; } }
.band h2 { margin-bottom: 28px; max-width: 22em; text-wrap: balance; }
.band h2 + .lead { margin-top: -12px; margin-bottom: 32px; }
.tinted { background: var(--muted); }
.inked { background: #16181D; color: #F7F6F2; }
.inked h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.inked p { color: #C9CBD1; max-width: 40em; font-size: 1.1rem; }
.inked a { color: var(--lime); font-weight: 600; }
.limed { background: var(--lime); color: var(--on-lime); padding: 56px 0; }
.limed .try { background: none; padding: 0; border-radius: 0; }
.limed .try h2 { margin-bottom: 10px; }

/* Home hero: three screens standing on the app's dose staircase. */
.hero-band { padding: 16px 0 0; overflow: hidden; }
.home-hero { display: grid; gap: 44px; }
.home-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.3rem); letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
.home-hero .hero-text { padding-top: 24px; }
@media (min-width: 940px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 48px; align-items: end; }
  .home-hero .hero-text { align-self: center; padding: 40px 0 72px; }
}
.assure { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .95rem; font-weight: 500; }
.assure li, .plan li { display: flex; align-items: baseline; gap: 10px; }
.assure li::before, .plan li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--lime); box-shadow: 0 0 0 1px rgb(22 24 29 / .22); }
.stairs { display: flex; align-items: flex-end; justify-content: center; }
.stair { flex: 1 1 0; max-width: 176px; display: flex; flex-direction: column; }
.stair .phone { flex: none; margin: 0 8px 12px; border-radius: 22px; }
.stair:nth-child(3) { display: none; }
.tread { display: block; border-radius: 8px 8px 0 0; }
.stair:nth-child(1) .tread { height: 28px; background: var(--ink); }
.stair:nth-child(2) .tread { height: 68px; background: var(--lime); }
.stair:nth-child(3) .tread { height: 108px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); }
@media (min-width: 560px) {
  .stair { max-width: 214px; }
  .stair:nth-child(3) { display: flex; }
  .stair .phone { margin: 0 10px 14px; border-radius: 28px; }
  .stair:nth-child(1) .tread { height: 40px; }
  .stair:nth-child(2) .tread { height: 96px; }
  .stair:nth-child(3) .tread { height: 152px; }
}

/* Feature tiles: the screen itself is the picture. */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
.tile a { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--surface); border-radius: var(--r-xl); color: var(--ink); text-decoration: none; }
.tile-text { padding: 26px 26px 26px; }
.tile h3 { font-size: 1.3rem; margin-bottom: 8px; }
.tile p { margin: 0; color: var(--text-2); font-size: .98rem; line-height: 1.5; }
.tile a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tile .phone { flex: none; width: min(240px, 74%); height: 290px; margin: auto auto 0; border-radius: 28px 28px 0 0; box-shadow: 0 0 0 1px var(--border), 0 -10px 40px -18px rgb(22 24 29 / .3); }
.tile:first-child a { background: var(--lime); color: var(--on-lime); }
.tile:first-child p { color: var(--on-lime); opacity: .8; }
.tile:first-child .phone { box-shadow: 0 0 0 1px rgb(22 24 29 / .18); }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile.wide { grid-column: span 2; }
  .tile.wide a { flex-direction: row; align-items: flex-end; }
  .tile.wide .tile-text { flex: 1; align-self: flex-start; padding: 32px 0 32px 32px; }
  .tile.wide h3 { font-size: 1.6rem; }
  .tile.wide .phone { width: 228px; height: 350px; margin: 32px 28px 0 20px; }
}

/* Free and Premium, side by side. */
.plan-cols { display: grid; gap: 16px; }
@media (min-width: 860px) { .plan-cols { grid-template-columns: 1.25fr 1fr; } }
.plan { padding: 30px; border-radius: var(--r-xl); background: var(--surface); }
.plan h3 { font-size: 1.3rem; margin-bottom: 18px; }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { margin: 10px 0; break-inside: avoid; }
@media (min-width: 560px) { .plan.free ul { columns: 2; column-gap: 28px; } .plan.free li:first-child { margin-top: 0; } }
.plan.premium { background: #16181D; color: #F7F6F2; }

.sub { margin-top: 64px; }
@media (min-width: 640px) { .cards.two { grid-template-columns: 1fr 1fr; } }

.lang-hint { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 24px); padding: 6px 6px 6px 18px; border-radius: 999px; background: #16181D; box-shadow: 0 12px 34px -10px rgb(0 0 0 / .45); font-size: .95rem; }
.lang-hint a { color: #F7F6F2; font-weight: 600; white-space: nowrap; }
.lang-hint button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #C9CBD1; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.lang-hint button:hover { background: rgb(255 255 255 / .12); }
.grid, .cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid, .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid, .cards { grid-template-columns: repeat(3, 1fr); } .cards.meds { grid-template-columns: repeat(4, 1fr); } }
.grid a, .cards a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.grid a:hover, .cards a:hover { border-color: var(--ink); transform: translateY(-2px); }
.grid strong, .cards strong { font: 650 1.12rem var(--display); }
.grid span, .cards span { color: var(--text-2); font-size: .95rem; line-height: 1.5; }

/* How it works climbs like the dose steps: done, current, ahead. */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: var(--r-lg); }
.steps li::before { content: counter(step); font: 700 2.2rem/1 var(--display); letter-spacing: -0.03em; margin-bottom: 14px; }
.steps strong { font: 650 1.25rem var(--display); }
.steps span { opacity: .78; }
.steps li:nth-child(1) { background: var(--ink); color: var(--bg); }
.steps li:nth-child(2) { background: var(--lime); color: var(--on-lime); }
.steps li:nth-child(3) { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 0; align-items: end; border-bottom: 1.5px solid var(--border); }
  .steps li { border-radius: 14px 14px 0 0; padding: 30px; }
  .steps li:nth-child(1) { min-height: 230px; }
  .steps li:nth-child(2) { min-height: 290px; }
  .steps li:nth-child(3) { min-height: 350px; }
}


.body-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .body-grid:has(.aside) { grid-template-columns: 1fr 300px; } }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.body-grid .prose:first-child h2 { margin-top: 0; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 88%, var(--bg)); }
.legal h2 { font-size: 1.45rem; }
.legal h3 { margin-top: 1.4em; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin: .4em 0; }
.mail { font-weight: 600; }

.facts { display: flex; flex-wrap: wrap; gap: 1px; margin: 0 0 8px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.facts div { flex: 1 1 260px; background: var(--surface); padding: 16px 20px; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); font-weight: 600; }
.facts dd { margin: 4px 0 0; font-weight: 500; }

.try { display: grid; gap: 20px; align-items: center; padding: 32px; border-radius: var(--r-xl); background: var(--lime); color: var(--on-lime); }
.try p { color: var(--on-lime); opacity: .85; margin: 0; }
.try .store { background: var(--on-lime); color: #F7F6F2; }
.try .cta-note { color: var(--on-lime); opacity: .75; }
@media (min-width: 860px) { .try { grid-template-columns: 1fr auto; padding: 40px 44px; } }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 600 1.08rem var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.5rem; font-weight: 400; color: var(--text-2); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding-bottom: 8px; }

/* Tools */
.tool { display: grid; gap: 18px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); max-width: 760px; margin: 0 0 40px; }
.tool fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.tool legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.tool .row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.tool label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--text-2); font-weight: 500; }
.tool input, .tool select { font: 500 1.05rem var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; min-height: 48px; width: 100%; }
.tool input:focus, .tool select:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 70%, transparent); }
.tool .result { padding-top: 18px; border-top: 1px solid var(--border); }
.tool .result h3 { font-size: 1rem; color: var(--text-2); font-family: var(--body); font-weight: 600; }
#next-out { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#next-out li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--muted); }
#next-out li:first-child { background: var(--lime); color: var(--on-lime); font-weight: 600; }
#next-out li span:last-child { color: inherit; opacity: .75; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.stats div { padding: 14px 16px; border-radius: var(--r-md); background: var(--muted); }
.stats dt { font-size: .82rem; color: var(--text-2); }
.stats dd { margin: 2px 0 0; font: 700 1.6rem var(--display); letter-spacing: -0.02em; }
.stats div:first-child { background: var(--lime); color: var(--on-lime); }
.stats div:first-child dt { color: var(--on-lime); opacity: .75; }
.error { color: #B3261E; font-weight: 500; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
