/* Moofie — site styles. Apple product-page feel: dark, calm, typographic. */

/* Inter is the fallback when SF Pro isn't available (self-hosted, no third-party requests). */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --tile: #111113;
  --surface: #1d1d1f;
  --surface-2: #2c2c2e;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --text-2: #86868b;
  --text-3: #6e6e73;
  --accent: #ffef00;

  --radius: 30px;
  --radius-sm: 18px;
  --max: 1024px;
  --gutter: clamp(20px, 5vw, 44px);
  --ease: cubic-bezier(.25, .1, .25, 1);

  /* SF Pro when available, otherwise Inter. Like Apple: Display cut for 20px and up, Text cut below. */
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

::selection { background: rgba(255, 255, 255, 0.22); color: inherit; }

:focus-visible { outline: 2px solid rgba(255, 255, 255, .8); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.center { text-align: center; }

/* SF Symbols: one SVG per symbol in assets/icons/<name>.svg, tinted with currentColor.
   main.js shows an icon only once its SVG file exists. */
.sf { display: none; }
.sf.is-loaded {
  display: inline-block; width: 1em; height: 1em; flex: none;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* ---------- Nav (translucent material) ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 22, 23, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 19px; line-height: 1; letter-spacing: -0.012em; font-family: var(--font-display); }
.brand-mark { width: 30px; height: 30px; border-radius: 22.5%; }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1; letter-spacing: -0.016em; }
.nav-links a { display: block; padding-block: 8px; text-decoration: none; color: rgba(245, 245, 247, .8); transition: color .2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; }

/* ---------- Type ---------- */

/* Apple's type scale: large ≥1069px, medium 735–1068px, small ≤734px */
.eyebrow { font-family: var(--font-display); color: var(--accent); font-size: 21px; line-height: 1.19048; font-weight: 600; letter-spacing: .011em; margin: 0 0 6px; }

.display { font-family: var(--font-display); font-size: 80px; line-height: 1.05; font-weight: 600; letter-spacing: -0.015em; margin: 0; }

.h2 { font-family: var(--font-display); font-size: 56px; line-height: 1.07143; font-weight: 600; letter-spacing: -0.005em; margin: 0; }

.h3 { font-family: var(--font-display); font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: 0; margin: 0; }

.lede { font-family: var(--font-display); font-size: 28px; line-height: 1.14286; font-weight: 400; letter-spacing: .007em; color: var(--text-2); margin: 12px 0 0; }
.center .lede { margin-inline: auto; max-width: 30ch; }

@media (max-width: 1068px) {
  .display { font-size: 64px; line-height: 1.0625; letter-spacing: -0.009em; }
  .h2 { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; }
  .h3 { font-size: 32px; line-height: 1.125; letter-spacing: .004em; }
  .lede { font-size: 24px; line-height: 1.16667; letter-spacing: .009em; }
  .eyebrow { font-size: 19px; line-height: 1.21053; letter-spacing: .012em; }
}

@media (max-width: 734px) {
  .display { font-size: 48px; line-height: 1.08349; letter-spacing: -0.003em; }
  .h2 { font-size: 40px; line-height: 1.1; letter-spacing: 0; }
  .h3 { font-size: 28px; line-height: 1.14286; letter-spacing: .007em; }
  .lede { font-size: 21px; line-height: 1.19048; letter-spacing: .011em; }
  .eyebrow { font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em; }
}

.muted { color: var(--text-2); }
.dim { color: var(--text-2); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 980px;
  font: 400 17px/1.17648 var(--font); letter-spacing: -0.022em; text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform .1s ease-out, background-color .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn .sf { font-size: 18px; }

.link { color: #2997ff; text-decoration: none; font-size: 21px; line-height: 1.19048; letter-spacing: .011em; font-family: var(--font-display); }
.link::after { content: " ›"; }
.link:hover { text-decoration: underline; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 30px; }
.center .cta-row { justify-content: center; }

/* ---------- Hero ---------- */

.hero { padding-block: 56px 0; overflow: hidden; }
.eyebrow.eyebrow-top { font-family: var(--font); font-size: 15px; line-height: 1.2; font-weight: 600; letter-spacing: -0.016em; margin: 0 0 28px; }
.app-icon { width: 120px; height: auto; margin: 0 auto 24px; border-radius: 22.5%; box-shadow: 0 20px 60px -20px rgba(255, 239, 0, .25); }

.hero-shot {
  width: min(400px, 86vw); margin: 36px auto 0;
  aspect-ratio: 1302 / 1650; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero-shot img { width: 100%; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(96px, 14vw, 170px); }

.stage { margin-top: 36px; display: flex; justify-content: center; }
.stage-card img { width: min(440px, 100%); }

/* Tiles with a phone rising from the bottom edge */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile {
  background: var(--tile); border-radius: var(--radius);
  padding: clamp(36px, 5vw, 56px) 24px 0; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.tile .lede { font-size: 21px; line-height: 1.19048; letter-spacing: .011em; max-width: 24ch; margin-top: 10px; }
/* Phone sits close under the copy; its bottom is cropped by the tile edge */
.tile .phone { width: min(300px, 76%); margin-top: 28px; margin-bottom: -22%; }

/* Three short facts */
.tiles-section { padding-top: 0; padding-bottom: 16px; }

/* Facts: same card language as the tiles above */
.facts-section { padding-top: 0; padding-bottom: 0; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { background: var(--tile); border-radius: var(--radius); padding: 36px 32px; }
.fact .h3 { font-size: 32px; line-height: 1.125; letter-spacing: .004em; margin-bottom: 8px; }
.fact p { margin: 0; color: var(--text-2); font-size: 19px; line-height: 1.21053; letter-spacing: .012em; font-family: var(--font-display); }
.fact-wide { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.fact-wide .h3 { margin: 0; }

.models { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.models li { padding: 10px 20px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 17px; font-weight: 500; letter-spacing: -0.022em; }

/* Final call to action */
.final { text-align: center; padding-block: clamp(96px, 12vw, 140px); }
.final .app-icon { width: 88px; margin-bottom: 22px; }

/* ---------- Footer ---------- */

footer { background: var(--bg); border-top: 1px solid var(--line); padding-block: 36px 56px; font-size: 14px; line-height: 1.42859; color: var(--text-3); letter-spacing: -0.016em; }
footer .wrap { display: grid; gap: 18px; }
footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 6px; }
footer nav ul { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
footer nav a { color: var(--text-2); text-decoration: none; }
footer nav a:hover { color: var(--text); text-decoration: underline; }
footer p { margin: 0; max-width: 80ch; }
footer .brand { font-size: 17px; }
footer .brand-mark { width: 24px; height: 24px; }

/* ---------- Sub pages ---------- */

.page-hero { padding-block: 88px 48px; text-align: center; }
.page-hero .lede { margin-inline: auto; max-width: 34ch; }

.doc { padding-bottom: clamp(80px, 10vw, 140px); }
.doc .wrap { max-width: 720px; }
.doc h2 { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: .007em; line-height: 1.14286; margin: 56px 0 12px; }
.doc h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: .011em; line-height: 1.19048; margin: 28px 0 8px; }
.doc p, .doc li { color: #d2d2d7; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: currentColor; }
.doc .meta { color: var(--text-3); font-size: 14px; text-align: center; }

.toc { background: var(--surface); border-radius: var(--radius-sm); padding: 20px 24px; margin: 0 0 16px; }
.toc strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2 220px; column-gap: 32px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { text-decoration: none; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 12px; }
.summary div { background: var(--surface); border-radius: var(--radius-sm); padding: 22px; }
.summary .sf { font-size: 24px; margin-bottom: 12px; }
.summary b { display: block; font-size: 17px; margin-bottom: 4px; color: var(--text); }
.summary span { color: var(--text-2); font-size: 15px; line-height: 1.4; display: block; }

.callout { display: flex; gap: 14px; background: var(--surface); border-radius: var(--radius-sm); padding: 18px 20px; margin: 18px 0; }
.callout .sf { font-size: 22px; margin-top: 2px; }
.callout p { margin: 0; color: var(--text); }

.data-table-wrap { overflow-x: auto; margin: 18px 0; border-radius: var(--radius-sm); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.data-table th, .data-table td { text-align: left; padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--text-2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td { color: #d2d2d7; }
.data-table td:first-child { color: var(--text); font-weight: 600; }

/* Support */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.steps li { background: var(--surface); border-radius: var(--radius-sm); padding: 22px; }
.steps .sf { font-size: 26px; margin-bottom: 14px; }
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--text-2); font-size: 15px; line-height: 1.4; display: block; }

.faq-group { margin-top: 64px; }
.faq-group > h2 { font-family: var(--font-display); font-size: 32px; font-weight: 600; line-height: 1.125; letter-spacing: .004em; margin: 0 0 16px; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 22px; color: #d2d2d7; max-width: 62ch; }
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer ol, .faq .answer ul { margin: 0 0 10px; padding-left: 1.3em; }
.faq .answer li { margin: 4px 0; }
.faq .answer a { color: var(--text); text-underline-offset: 3px; }

.panel { background: var(--surface); border-radius: var(--radius); padding: clamp(24px, 3.4vw, 36px); }
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-top: 80px; }
.contact .panel { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.contact .panel p { color: var(--text-2); margin: 10px 0 0; }
.contact .h3 { font-size: 21px; margin-bottom: 4px; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; color: #d2d2d7; font-size: 15px; }
.checklist li { display: flex; gap: 10px; }
.checklist li::before { content: "✓"; color: var(--text-2); font-weight: 600; }

/* ---------- Guides (SEO landing pages) ---------- */

picture { display: contents; }
.h1-stack { margin: 0; font-weight: inherit; }
.h1-stack > span { display: block; }

.crumbs { font-size: 14px; color: var(--text-2); margin: 0 0 18px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.quick { background: var(--tile); border-radius: var(--radius); padding: 28px 32px; margin: 0 0 8px; }
.doc .quick p { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.38; letter-spacing: .011em; color: var(--text); }

.doc ol.howto { counter-reset: step; list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.doc ol.howto li { counter-increment: step; position: relative; margin: 0; padding: 18px 20px 18px 64px; background: var(--surface); border-radius: var(--radius-sm); }
.doc ol.howto li::before { content: counter(step); position: absolute; left: 20px; top: 17px; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: #000; font-weight: 600; font-size: 15px; display: grid; place-items: center; }

.doc .figure { margin: 40px 0; display: flex; justify-content: center; }
.doc .figure img { width: min(380px, 100%); }

.doc .features { padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.doc .features li { margin: 0; padding-left: 18px; position: relative; }
.doc .features li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 40px 0; }
.duo figure { margin: 0; background: var(--tile); border-radius: var(--radius); padding: 28px 24px 0; overflow: hidden; text-align: center; }
.duo figcaption { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: .011em; color: var(--text); margin-bottom: 20px; }
.duo img { width: 78%; margin: 0 auto -22%; }

.doc-cta { text-align: center; padding-top: 72px; }
.doc .doc-cta h2 { margin-top: 0; }
.doc .doc-cta .cta-row { justify-content: center; }
.doc .doc-cta .link { text-decoration: none; color: #2997ff; }

.langs { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.langs a { color: var(--text-2); text-decoration: none; }
.langs a:hover, .langs a[aria-current] { color: var(--text); }

@media (max-width: 734px) {
  .duo, .doc .features { grid-template-columns: 1fr; }
  .quick { padding: 24px; }
  .doc .quick p { font-size: 19px; }
}

/* Language suggestion: floating sheet that rises from the bottom and leaves the same way */
.lang-sheet {
  position: fixed; z-index: 60; left: 50%; bottom: 20px;
  width: min(420px, calc(100% - 32px));
  padding: 22px 22px 18px; border-radius: 24px;
  background: rgba(36, 36, 38, .82);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.12);
  transform: translate(-50%, calc(100% + 40px)); opacity: 0; pointer-events: none;
  transition: transform .5s cubic-bezier(.32, .72, 0, 1), opacity .3s ease;
}
.lang-sheet.is-open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.lang-sheet-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 21px; line-height: 1.19; font-weight: 600; letter-spacing: .011em; }
.lang-sheet-text { margin: 0 0 16px; color: var(--text-2); font-size: 15px; line-height: 1.4; letter-spacing: -0.016em; }
.lang-sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-sheet .btn { flex: 1; padding-block: 10px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .lang-sheet { transform: translate(-50%, 0); transition: opacity .2s ease; }
}
@media (prefers-reduced-transparency: reduce) {
  .lang-sheet { background: #242426; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Motion ---------- */

.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity .4s ease; }
  .btn:active { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav { background: #161617; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 834px) {
  .tiles, .contact { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .summary { grid-template-columns: 1fr; }
}

@media (max-width: 734px) {
  .hero, .page-hero { padding-top: 64px; }
  .app-icon { width: 96px; }
  .tile .lede { font-size: 19px; line-height: 1.21053; letter-spacing: .012em; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .nav .wrap { height: 52px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 26px; height: 26px; }
  .nav-links { gap: 20px; font-size: 14px; }
}
