@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/InterVariable.woff2") format("woff2");
}

/* ==========================================================================
   Specular — shared stylesheet
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg-light: #f4f4f3;
  --bg-dark: #1c1c1e;
  --surface-light: #ffffff;
  --surface-dark: #2c2c2e;

  --text-light: #1c1c1e;
  --text-dark: #f4f4f3;
  --muted-light: #6f7074;
  --muted-dark: #a6a6ab;
  --border-light: rgba(28, 28, 30, 0.12);
  --border-dark: rgba(244, 244, 243, 0.13);

  --bg: var(--bg-dark);
  --surface: var(--surface-dark);
  --text: var(--text-dark);
  --text-muted: var(--muted-dark);
  --border: var(--border-dark);
  --accent: var(--text);

  --radius: 28px;
  --maxw: 1120px;
  --font-display: "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "Inter", sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--bg-light);
    --surface: var(--surface-light);
    --text: var(--text-light);
    --text-muted: var(--muted-light);
    --border: var(--border-light);
    --accent: var(--text);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

.wrap {
  width: min(100% - 3rem, var(--maxw));
  margin: 0 auto;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
  margin: 0 0 1rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 46px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.btn-small {
  min-height: 32px;
  padding: 0.45rem 0.78rem;
  font-size: 0.62rem;
}

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

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.wordmark-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.wordmark-icon img {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.apple-symbol {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 1.25rem;
  line-height: 0.9;
  display: inline-block;
  transform: translateY(-1px);
}

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

.hero {
  min-height: calc(var(--vh, 1svh) * 100);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(4rem, 8vw, 6rem) 0 0;
}

.hero-text {
  position: sticky;
  top: 52px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  transform-origin: center top;
  will-change: transform, opacity;
}

.hero h1 {
  font-size: clamp(2.025rem, 5.25vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;
}

.hero .subhead {
  max-width: 58ch;
  color: var(--text-muted);
  margin: 0;
  font-size: 0.97rem;
}

.hero-media {
  position: relative;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 1.5rem;
}

/* ---- phone ---- */

.phone-frame {
  position: relative;
  width: min(320px, 76vw);
  aspect-ratio: 2818 / 5760;
  overflow: visible;
  will-change: auto;
}

.phone-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 11%;
}

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

.story {
  position: relative;
  z-index: 3;
  padding: clamp(4rem, 8vw, 6rem) 0 0;
}


.story-heading {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.story-heading h2 {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
}

.story-stage {
  position: relative;
  min-height: calc((var(--vh, 1svh) * 100) + 760px);
  margin-top: 0;
}

.story-sticky {
  position: sticky;
  top: 52px;
  z-index: 2;
  /* .story-visual sits at top:133px and is 614px tall (747px total) with
     overflow visible; below ~799px of viewport height, calc() alone makes
     this box shorter than that, so the phone mockup bleeds out the bottom
     and overlaps the .attention section that follows. The 747px floor
     keeps the sticky box always tall enough to contain it. */
  height: max(calc((var(--vh, 1svh) * 100) - 52px), 747px);
  overflow: visible;
}

.story-copy {
  position: relative;
  width: 100%;
  height: 124px;
  flex: 0 0 124px;
  pointer-events: none;
}

.story-block {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(760px, calc(100% - 2rem));
  text-align: center;
  opacity: 0;
  transform: translateX(-50%);
  transition: none;
}

.story-block.active {
  opacity: 1;
}

.story-block h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.028em;
  margin: 0 0 1rem;
}

.story-block p:last-child {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.story-visual {
  position: absolute;
  top: 133px;
  left: 0;
  width: 100%;
  height: 614px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 0;
  pointer-events: none;
}

.story-visual .phone-frame {
  width: min(320px, 76vw);
  flex: 0 0 auto;
}

.story-frame-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 11%;
  opacity: 0;
  transition: none;
  will-change: opacity;
}

.story-frame-image.active {
  opacity: 1;
}

/* ---- attention ---- */

.attention {
  position: relative;
  z-index: 4;
  padding: clamp(4.125rem, 6.75vw, 5.625rem) 0 2rem;
  text-align: center;
}

.attention .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  }

.attention h2 {
  font-size: clamp(1.95rem, 4.875vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem;

  width: min(760px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.attention p:not(.eyebrow) {
  color: var(--text-muted);
  margin: 0 0 2rem;
}

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

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 1.5rem 7rem;
}

.doc h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 0 0 0.6rem;
}

.doc .updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.doc h2 {
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 2.7rem 0 0.8rem;
}

.doc p, .doc li { color: var(--text); }
.doc .summary-last { margin-bottom: 2em; }
.doc ul { padding-left: 1.2rem; }
.doc table { table-layout: fixed; max-width: 100%; }
.doc th, .doc td { overflow-wrap: anywhere; word-break: normal; }
.doc a:not(.btn-primary) { color: var(--text); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

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

.site-footer {
  padding: 1.5rem 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-pro-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--text); }

.footer-bottom > div {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.footer-legal {
  max-width: 720px;
  margin: 1.5rem 0 0;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ---- responsive ---- */

@media (max-width: 700px) {
  .wrap { width: min(100% - 2rem, var(--maxw)); }

  .hero { padding-top: 3rem; }

  .story-stage {
    min-height: calc((var(--vh, 1svh) * 100) + 760px);
  }

  .story-sticky {
    top: 52px;
    height: max(calc((var(--vh, 1svh) * 100) - 52px), 747px);
  }

  .story-copy {
    height: 124px;
    flex-basis: 124px;
  }

  .story-visual {
    top: 133px;
    height: 614px;
  }

  .story-block h2 { font-size: 1.8rem; }

}

/* ---- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .story-block,
  .story-frame-item {
    transition: none !important;
  }
}

/* Keep the page background continuous into the mobile browser viewport.
   No safe-area padding is added, so Safari's floating controls can overlay the page. */
@supports (padding: max(0px)) {
  body {
    padding-bottom: 0;
  }
}


/* Feature copy: full-width centered text layer */
.story-copy {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.story-block {
  left: 50%;
  width: min(760px, calc(100vw - 2rem));
}

.story-block p:last-child {
  max-width: 58ch;
}


/* Bottom statement: match the hero/feature title width and viewport centering */
.attention .wrap {
  width: 100%;
  max-width: none;
}

.attention h2 {
  width: min(760px, calc(100vw - 2rem));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Shared transition spacing: hero mockup -> feature copy */
.story-copy {
  padding-top: 0;
  margin-top: 0;
}

.wordmark-short { display: none; }

@media (max-width: 640px) {
  .wordmark-full { display: none; }
  .wordmark-short { display: inline; }
}

/* ---- legal page reader ---- */
.reader-start {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 1rem;
}

.reader-button,
.reader-controls button {
  appearance: none;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
}

.reader-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.reader-icon {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  color: currentColor;
}

.reader-button:hover,
.reader-controls button:hover {
  background: var(--surface-strong, var(--surface));
}

.reader-controls {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + 0.75rem));
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transform: translateX(-50%);
}

.reader-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  gap: 0.4rem;
  padding: 0 0.7rem;
  border: 0;
  font-size: 0.78rem;
  font-weight: 600;
}

.reader-controls .reader-status {
  padding: 0 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.reader-active {
  background: var(--surface);
  border-radius: 0.45rem;
  box-shadow: 0 0 0 0.3rem var(--surface);
  transition: background 160ms ease, box-shadow 160ms ease;
}

@media (max-width: 700px) {
  .reader-start {
    margin-bottom: 0.9rem;
  }

  .reader-controls {
    bottom: max(1rem, calc(env(safe-area-inset-bottom) + 0.65rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .reader-active {
    transition: none;
  }
}

.reader-button-label {
  display: inline-block;
}


/* Landing page download buttons */
.site-main .btn-primary.btn-small {
  padding-left: 1.17rem;
  padding-right: 1.17rem;
}

/* Final homepage download CTA */
.attention-download { margin-top: 2rem; }

.attention-download {
  margin-top: 2rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.75rem 1.35rem;
  min-height: 46px;
}
