/* Forkly landing page — matcha & cream, matching the app. */
:root {
  --bg: #FBF8F1; --bg-2: #F3EFE4; --card: #FFFFFF; --ink: #1E2A23; --subtle: #5E6F64; --line: rgba(30, 42, 35, 0.09);
  --accent: #2F9E6E; --accent-dark: #1F7A57; --mint: #5CC48E; --yolk: #F4C95D;
  --shadow: 0 18px 50px rgba(30, 42, 35, 0.12); --radius: 24px;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111814; --bg-2: #18211C; --card: #1C2620; --ink: #EEF3EE; --subtle: #A7B8AD; --line: rgba(238, 243, 238, 0.09);
    --accent: #5CC48E; --accent-dark: #2F9E6E; --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px; font-weight: 800; font-family: var(--display); font-size: 17px;
  text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--mint), var(--accent-dark)); color: #fff; box-shadow: 0 10px 24px rgba(47, 158, 110, 0.35); }
.btn-ghost { background: var(--card); border: 1px solid var(--line); }
.btn-light { background: #fff; color: #1F7A57; }
.btn-small { padding: 10px 18px; font-size: 15px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 22px; }
.brand img { border-radius: 10px; }
.nav nav { display: flex; gap: 26px; margin-left: auto; }
.nav nav a { text-decoration: none; font-weight: 700; color: var(--subtle); font-size: 16px; }
.nav nav a:hover { color: var(--ink); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.blob-green { width: 560px; height: 560px; background: var(--mint); right: -120px; top: -140px; }
.blob-yolk { width: 420px; height: 420px; background: var(--yolk); right: 260px; bottom: -220px; opacity: 0.4; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px;
  padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-weight: 700; font-size: 14px; color: var(--subtle);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(47, 158, 110, 0.18); }
h1 { font-size: clamp(44px, 6.4vw, 80px); font-weight: 900; }
.accent { background: linear-gradient(120deg, var(--mint), var(--accent-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--subtle); max-width: 34ch; margin: 22px 0 30px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.trust { display: flex; gap: 18px; padding: 0; margin: 24px 0 0; list-style: none; color: var(--subtle); font-weight: 700; font-size: 15px; }
.trust li::before { content: "✓"; color: var(--accent); margin-right: 6px; font-weight: 900; }

/* Phones */
.phone {
  margin: 0; border-radius: 13.5% / 6.2%; padding: 3.2%;
  background: #0E1210; box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone img { width: 100%; height: auto; aspect-ratio: 600 / 1304; background: var(--bg-2); border-radius: 11.5% / 5.3%; }
.hero-phones { position: relative; height: clamp(460px, 52vw, 640px); }
.hero-phones .phone { position: absolute; width: clamp(200px, 22vw, 290px); }
.phone-front { left: 12%; top: 4%; transform: rotate(-4deg); z-index: 2; }
.phone-back { right: 4%; top: 12%; transform: rotate(6deg); }
.float {
  position: absolute; z-index: 3; font-size: clamp(30px, 3.4vw, 44px);
  width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow); animation: float 5s ease-in-out infinite;
}
.f1 { left: 0; top: 18%; }
.f2 { right: 0; top: 2%; animation-delay: -1.2s; }
.f3 { left: 46%; bottom: 2%; animation-delay: -2.4s; }
.f4 { right: 8%; bottom: 18%; animation-delay: -3.6s; }
@keyframes float { 50% { transform: translateY(-12px) rotate(4deg); } }

/* Steps */
.steps ol { list-style: none; margin: 40px auto 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-icon { font-size: 34px; display: block; margin-bottom: 12px; }
.steps h3 { font-size: 24px; font-weight: 900; margin-bottom: 6px; }
.steps p { margin: 0; color: var(--subtle); font-size: 17px; }

/* Features */
.features { padding: 40px 0; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 64px 0; }
.feature-flip .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; align-items: flex-start; position: relative; }
.feature-media::before {
  content: ""; position: absolute; inset: 10% 6%; border-radius: 40px; z-index: -1;
  background: radial-gradient(circle at 30% 30%, rgba(92, 196, 142, 0.35), transparent 60%), radial-gradient(circle at 70% 80%, rgba(244, 201, 93, 0.3), transparent 60%);
}
.feature-media .phone { width: min(300px, 70vw); }
.feature-pair { gap: 18px; }
.feature-pair .phone { width: min(250px, 42vw); }
.phone-offset { margin-top: 70px; }
.kicker { margin: 0 0 10px; color: var(--accent); font-weight: 800; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 14px; }
.feature h2 { font-size: clamp(32px, 4vw, 50px); font-weight: 900; margin-bottom: 16px; }
.feature-copy > p { color: var(--subtle); font-size: 19px; max-width: 40ch; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.checks li::before { content: "✓"; color: #fff; background: var(--accent); width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 900; transform: translateY(3px); }

/* iPhone Duo */
.duo { padding: 64px 0; }
.duo-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.duo h2 { font-size: clamp(32px, 4vw, 50px); font-weight: 900; margin-bottom: 16px; }
.duo-copy > p { color: var(--subtle); font-size: 19px; max-width: 40ch; }
.duo-media { position: relative; padding: 0 0 48px 48px; }
.duo-media::before {
  content: ""; position: absolute; inset: 8% 4% 12% 12%; border-radius: 40px; z-index: -1;
  background: radial-gradient(circle at 30% 30%, rgba(92, 196, 142, 0.35), transparent 60%), radial-gradient(circle at 70% 80%, rgba(244, 201, 93, 0.3), transparent 60%);
}
.duo-open {
  position: relative; margin: 0; padding: 1.6%; border-radius: 5% / 7%;
  background: #0E1210; box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.duo-open img { width: 100%; height: auto; aspect-ratio: 1400 / 985; border-radius: 3.6% / 5.1%; background: var(--bg-2); }
/* A faint crease where the screen folds. */
.duo-open::after {
  content: ""; position: absolute; top: 1.6%; bottom: 1.6%; left: 50%; width: 10px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.06), transparent);
  pointer-events: none;
}
.phone-duo { position: absolute; left: 0; bottom: 0; width: 27%; padding: 2.4%; border-radius: 15% / 10.5%; }
.phone-duo img { aspect-ratio: 687 / 1000; border-radius: 11% / 7.6%; }

/* Grid */
.grid-section { padding: 72px 0; }
.center { text-align: center; }
.grid-section h2 { font-size: clamp(32px, 4vw, 50px); font-weight: 900; }
.sub { color: var(--subtle); max-width: 52ch; margin: 14px auto 36px; font-size: 19px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tile-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.tile h3 { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.tile p { margin: 0; color: var(--subtle); font-size: 16px; }

/* Gallery */
.gallery { padding: 40px 0 72px; background: var(--bg-2); }
.gallery h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; margin: 24px 0; }
.gallery-track {
  display: flex; align-items: flex-start; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px max(20px, calc((100% - 1160px) / 2)) 30px;
  scrollbar-width: thin;
}
.gallery-track .phone { flex: none; width: 230px; padding: 8px; scroll-snap-align: center; }

/* Final CTA */
.final { padding: 80px 0; }
.final-card {
  text-align: center; color: #fff; border-radius: 36px; padding: clamp(40px, 6vw, 72px) 24px;
  background: linear-gradient(135deg, #5CC48E, #1F7A57); box-shadow: 0 24px 60px rgba(31, 122, 87, 0.35);
  position: relative; overflow: hidden;
}
.final-card img { margin: 0 auto 18px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.final-card h2 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 900; }
.final-card p { margin: 12px auto 28px; max-width: 44ch; opacity: 0.92; font-size: 19px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--subtle); font-size: 15px; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 20px; }
.footer nav a { text-decoration: none; font-weight: 700; }
.footer p { margin: 0 0 0 auto; }

/* Responsive */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .btn-small { margin-left: auto; }
  .hero { padding-top: 44px; }
  .hero-inner, .feature { grid-template-columns: 1fr; gap: 28px; }
  .hero-copy { text-align: center; }
  .lede { margin-inline: auto; }
  .cta-row, .trust { justify-content: center; }
  .hero-phones { height: 520px; max-width: 460px; width: 100%; margin: 0 auto; }
  .hero-phones .phone { width: 220px; }
  .feature { padding: 40px 0; }
  .feature-flip .feature-media { order: 0; }
  .feature-copy { text-align: center; }
  .feature-copy > p { margin-inline: auto; }
  .checks { justify-content: center; text-align: left; max-width: 360px; margin-inline: auto; }
  .steps ol, .grid { grid-template-columns: 1fr; }
  .duo-inner { grid-template-columns: 1fr; gap: 28px; }
  .duo-copy { text-align: center; }
  .duo-copy > p { margin-inline: auto; }
  .duo-media { padding: 0 0 32px 24px; }
  .footer p { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) {
  .hero-phones { height: 440px; }
  .hero-phones .phone { width: 180px; }
  .phone-front { left: 4%; }
  .phone-back { right: 0; }
  .cta-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
  .btn { transition: none; }
}
