/* Forkify website: one shared stylesheet. Light/dark via prefers-color-scheme. */
:root {
  --brand: #d63a2f;
  --brand-strong: #b82e24;
  --on-brand: #ffffff;
  --brand-soft: #fde7e4;
  --like: #1e8e4f;
  --bg: #ffffff;
  --surface: #f5f4f2;
  --text: #1c1b1a;
  --muted: #5f5c58;
  --line: #e6e3df;
  --radius: 20px;
  --max: 1080px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff6a5c;
    --brand-strong: #ff8476;
    --on-brand: #1f0b08;
    --brand-soft: #3a1a16;
    --like: #3dd68c;
    --bg: #121110;
    --surface: #1e1c1b;
    --text: #f4f2ef;
    --muted: #b3aea8;
    --line: #2e2b29;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 10px; z-index: 10;
}
.skip-link:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface); color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 14px;
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; font-size: 1rem;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-secondary { background: var(--surface); color: var(--text); }
.btn-secondary:hover { color: var(--text); filter: brightness(0.97); }
/* "Coming soon" pill: not a link yet, but still readable in both themes. */
.btn-soon { background: var(--brand-soft); color: var(--brand); cursor: default; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 4px 12px; border-radius: 999px; font-size: .9rem; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; margin: 16px 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; margin: 0 0 6px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.small { font-size: .9rem; color: var(--muted); }

/* Phone mock with a swipe card */
.phone {
  justify-self: center; width: min(320px, 100%); aspect-ratio: 9 / 18.5;
  background: var(--text); border-radius: 44px; padding: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.18);
}
.screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: var(--bg); padding: 46px 14px 14px; }
.card {
  position: absolute; inset: 46px 14px 90px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #000));
  color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
}
.card.back { transform: scale(.94) translateY(12px); opacity: .55; }
.card.front { inset: 50px 22px 94px; transform: rotate(-4deg); box-shadow: 0 12px 24px rgba(0,0,0,.25); }
.card .glyph { position: absolute; top: 28%; left: 50%; transform: translateX(-50%); font-size: 72px; opacity: .9; }
.card .badge { align-self: flex-start; background: #fff; color: var(--brand); font-weight: 800; font-size: .72rem; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.card .name { font-weight: 800; font-size: 1.35rem; margin-top: 8px; }
.card .meta { font-size: .85rem; opacity: .9; }
.stamp { position: absolute; top: 16px; left: 16px; border: 3px solid var(--like); color: var(--like); background: rgba(255,255,255,.9); font-weight: 900; padding: 2px 10px; border-radius: 8px; transform: rotate(-14deg); }
.controls { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 18px; }
.controls span { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 22px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }

/* Sections */
section { padding: 56px 0; }
.alt { background: var(--surface); }
.section-head { max-width: 40em; margin-bottom: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.alt .tile { background: var(--bg); }
section:not(.alt) .tile { background: var(--surface); border-color: transparent; }
.tile .num { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.tile p { margin: 0; color: var(--muted); }

/* Plans table */
.plans { width: 100%; border-collapse: collapse; background: var(--bg); border-radius: var(--radius); overflow: hidden; }
.plans th, .plans td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.plans thead th { font-size: 1.05rem; }
.plans thead th:last-child { color: var(--brand); }
.plans tr:last-child td { border-bottom: 0; }

/* FAQ */
details { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style-position: outside; }
details p { margin: 0 0 14px; color: var(--muted); }

/* Long-form pages (privacy, support) */
.prose { max-width: 46em; padding: 48px 20px 64px; margin: 0 auto; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.5rem; margin-top: 40px; }
.prose h3 { margin-top: 24px; }
.prose li { margin: 6px 0; }
.note { background: var(--brand-soft); border-radius: 14px; padding: 14px 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 480px) {
  .site-header .wrap { gap: 8px; }
  .logo { font-size: 1.1rem; gap: 8px; }
  .logo img { width: 30px; height: 30px; }
  .nav { gap: 0; flex-wrap: nowrap; }
  .nav a { padding: 6px 8px; font-size: .95rem; }
}
@media (max-width: 820px) {
  .hero { padding-top: 36px; }
  .hero .wrap, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .phone { width: min(280px, 80%); }
  .nav a { padding: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .card.front { animation: nudge 4s ease-in-out infinite; }
  @keyframes nudge { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(-1deg); } }
}

/* Visually hidden but available to screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.plans-caption { caption-side: bottom; padding-top: 12px; text-align: left; }
.center { text-align: center; }
