/* ==========================================================================
   MyWalk — website styles
   Values mirrored from the app's design tokens (MyWalk/Theme/AppTheme.swift)
   so the site and the app read as the same product.
   ========================================================================== */

/* Typeface: the site ships the same rounded face the app and the logo use, so
   headings match the logo on every platform - not just on Macs, where the
   system happens to have SF Rounded installed. */
@font-face {
  font-family: "SF Rounded Web";
  src: url("assets/fonts/SFRounded-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Rounded Web";
  src: url("assets/fonts/SFRounded-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Rounded Web";
  src: url("assets/fonts/SFRounded-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "SF Rounded Web";
  src: url("assets/fonts/SFRounded-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Surfaces */
  --background: #F2F2F0;         /* app: background (light) */
  --surface: #FFFFFF;            /* app: surface (light) */
  --surface-raised: #F9F9F8;     /* app: surfaceRaised (light) */

  /* Ink */
  --ink: #121214;                /* app: ink (light) */
  --secondary: #6F6F73;          /* app: secondary (light) */
  --tertiary: #A3A3A7;           /* app: tertiary (light) */

  /* Accent — the app's golden yellow */
  --accent: #F5B800;             /* app: accentFixed */
  --on-accent: #1A1400;          /* app: onAccent */

  /* Inversion */
  --inverted: #19191B;           /* app: invertedSurface (light) */
  --on-inverted: #F9F9F8;        /* app: onInverted (light) */

  /* Lines */
  --hairline: rgba(0, 0, 0, 0.06);
  --divider: rgba(0, 0, 0, 0.08);

  /* Icon blue, for accents that reference the mark */
  --brand-blue: #297AFF;

  /* Geometry — matched to the app */
  --radius-card: 16px;
  --radius-pill: 12px;
  --pad-card: 18px;
  --screen-pad: 18px;

  /* Type — the app uses SF Rounded. This is the closest web stack; on Apple
     platforms it resolves to the same rounded face the app renders with. */
  /* Self-hosted rounded face first so it wins everywhere; the system rounded
     font and platform fallbacks follow for older browsers that reject woff2. */
  --font: "SF Rounded Web", ui-rounded, "SF Pro Rounded", -apple-system,
          BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111113;
    --surface: #1E1E20;
    --surface-raised: #28282A;
    --ink: #F1F1F2;
    --secondary: #A1A1A5;
    --tertiary: #737377;
    --inverted: #F2F2F0;
    --on-inverted: #121214;
    --hairline: rgba(255, 255, 255, 0.08);
    --divider: rgba(255, 255, 255, 0.10);
  }
}

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

*, *::before, *::after { 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: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--screen-pad);
}

/* ------------------------------------------------------------ typography -- */

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }

h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.06rem; letter-spacing: -0.01em; font-weight: 600; }

p { margin: 0; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: 12px;
}

.lede { font-size: 1.08rem; color: var(--secondary); max-width: 34em; }

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

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

.brand-mark { width: 34px; height: 34px; border-radius: 8px; }

.brand-name { font-weight: 700; font-size: 1.06rem; letter-spacing: -0.01em; }

.site-nav { display: flex; gap: 26px; }

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--secondary);
  transition: color 0.16s ease;
}

.site-nav a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 0.86rem; }
}

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

.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; }
}

.hero h1 { margin-bottom: 20px; }

.hero .lede { margin-bottom: 30px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.14s ease, background 0.16s ease, opacity 0.16s ease;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary { background: var(--inverted); color: var(--on-inverted); }

.btn-primary:hover { opacity: 0.88; }

/* A small nod to the app's icon: the blue tile with the white mark. */
.btn-glyph {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--brand-blue);
  position: relative;
  flex: none;
}

.btn-glyph::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#fff, #fff) center / 2px 9px no-repeat,
    linear-gradient(#fff, #fff) center / 9px 2px no-repeat;
  opacity: 0.92;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--divider);
}

.btn-ghost:hover { background: var(--surface); }

.hero-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--tertiary);
}

/* Phone mockup ------------------------------------------------------------- */

.hero-art { display: flex; justify-content: center; }

.phone {
  width: min(310px, 78vw);
  aspect-ratio: 9 / 19.2;
  background: var(--inverted);
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 30px 60px -22px rgba(0, 0, 0, 0.38);
}

@media (prefers-color-scheme: dark) {
  .phone { background: #2A2A2D; box-shadow: 0 30px 60px -22px rgba(0, 0, 0, 0.7); }
}

.phone-screen {
  height: 100%;
  background: var(--surface);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Real screenshot inside the device frame. `object-fit: cover` keeps the phone
   proportions honest while filling the frame at any size. */
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}


/* ----------------------------------------------------------------- strip -- */

.strip { border-block: 1px solid var(--hairline); background: var(--surface); }

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-block: 26px;
}

@media (max-width: 800px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
}

.strip-item strong { display: block; font-size: 0.95rem; font-weight: 600; }

.strip-item span { display: block; font-size: 0.84rem; color: var(--secondary); margin-top: 2px; }

/* --------------------------------------------------------------- section -- */

.section { padding: clamp(56px, 8vw, 100px) 0; }

.section-head { max-width: 46em; margin-bottom: clamp(32px, 4vw, 52px); }

.section-head h2 { margin-bottom: 16px; }

.section-lede { font-size: 1.06rem; color: var(--secondary); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: var(--pad-card);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover { transform: translateY(-2px); border-color: var(--divider); }

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--inverted);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.card-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 { margin-bottom: 7px; }

.card p { font-size: 0.93rem; color: var(--secondary); }

/* ------------------------------------------------------------------- pro -- */

.section-invert { background: var(--inverted); color: var(--on-inverted); }

.section-invert .eyebrow { color: var(--accent); }

.section-invert .section-lede { color: color-mix(in srgb, var(--on-inverted) 72%, transparent); }

.pro-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 820px) {
  .pro-inner { grid-template-columns: 1fr; }
}

.pro-copy h2 { margin-bottom: 16px; }

.price {
  margin-top: 26px;
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.price span {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--on-inverted) 62%, transparent);
  margin-left: 6px;
}

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

.pro-list li {
  position: relative;
  padding: 11px 0 11px 30px;
  font-size: 0.95rem;
  border-bottom: 1px solid color-mix(in srgb, var(--on-inverted) 12%, transparent);
}

.pro-list li:last-child { border-bottom: 0; }

.pro-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

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

.privacy-inner { max-width: 46em; margin-inline: auto; text-align: center; }

.privacy-badge {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
}

.privacy-badge svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-inner h2 { margin-bottom: 18px; }

.privacy-links { margin-top: 26px; }

.privacy-links a {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding: 40px 0 48px;
}

.footer-inner { display: grid; gap: 18px; }

.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }

.footer-brand img { border-radius: 7px; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }

.footer-nav a { font-size: 0.9rem; color: var(--secondary); transition: color 0.16s ease; }

.footer-nav a:hover { color: var(--ink); }

.footer-legal {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--tertiary);
  max-width: 62em;
}

/* ---------------------------------------------------- document pages ----- */

.doc {
  max-width: 44em;
  margin-inline: auto;
  padding: clamp(40px, 7vw, 76px) 0 clamp(56px, 8vw, 96px);
}

.doc h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-bottom: 10px; }

.doc .updated { font-size: 0.86rem; color: var(--tertiary); margin-bottom: 34px; }

.doc h2 {
  font-size: 1.16rem;
  margin: 34px 0 12px;
  letter-spacing: -0.01em;
}

.doc h3 { font-size: 1rem; margin: 24px 0 9px; }

.doc p, .doc li { font-size: 0.96rem; color: var(--secondary); }

.doc p { margin-bottom: 13px; }

.doc ul { margin: 0 0 14px; padding-left: 20px; }

.doc li { margin-bottom: 7px; }

.doc strong { color: var(--ink); font-weight: 600; }

.doc a { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }

.doc .back { display: inline-block; margin-bottom: 26px; font-size: 0.9rem; color: var(--secondary); }

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

/* The logo is the brand, so the hero opens with it at scale rather than
   burying it in the nav bar. */
@media (max-width: 560px) {
  }

/* ------------------------------------------------------- card screenshots --- */

/* Real product captures. Phone-shaped shots are tall, so they are capped in
   height and cropped from the top - that keeps the informative part of each
   screen visible without the card becoming absurdly long. */
.card-shot {
  margin: 14px 0 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--surface-raised);
}

.card-shot img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* --------------------------------------------------------- showcase band --- */

.showcase { background: var(--surface); border-block: 1px solid var(--hairline); }

.showcase-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

@media (max-width: 880px) {
  .showcase-inner { grid-template-columns: 1fr; }
  .showcase-art { order: -1; }
}

.showcase-copy h2 { margin-bottom: 16px; }

.showcase-art { display: flex; justify-content: center; }

.phone-small { width: min(268px, 68vw); }

/* ------------------------------------------------------------ pro badge --- */

/* Marks features that are gated behind the one-off Pro purchase. Apple's
   guidelines require in-app purchase content to be clearly disclosed, and a
   marketing site that implies Pro features are included is misleading. */
.pro-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

/* Fully Pro-only: stronger treatment so nobody mistakes it for free. */
.pro-badge-only {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

/* ---------------------------------------------------------------- lightbox --- */

/* Card shots are cropped to a fixed window (see .card-shot img). Clicking one
   opens the FULL image, since the crop hides most of the screenshot. */
.shot-open {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.shot-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 12, 14, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox[open],
.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(460px, 100%);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Never let the lightbox or its image be clipped by a card's overflow. */
body.lightbox-active {
  overflow: hidden;
}
