/* PhoneDiet site. Theme follows the app: system blue gradient, white ring, Apple-native calm.
   Layout: left-aligned, generous measure; one signature moment (the hero storage gauge). */
:root {
  --blue: #2e7bff;
  --deep: #0040c8;
  --ink: #0b1f44;        /* navy body text */
  --ink-soft: #46597f;
  --paper: #f6f8fc;      /* cool white page */
  --card: #ffffff;
  --line: #dfe6f3;
  --full: #ff6b3d;       /* only for "storage full" */
  --radius-lg: 32px;
  --radius-md: 20px;
  --display: "Bricolage Grotesque", "SF Pro Display", -apple-system, system-ui, sans-serif;
  --body: "Figtree", -apple-system, system-ui, "Segoe UI", sans-serif;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaf0ff; --ink-soft: #a9b7d6; --paper: #070f22; --card: #0f1a33; --line: #1f2c4b;
    --blue: #4f93ff; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body); text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--deep); }
@media (prefers-color-scheme: dark) { a:hover { color: #8db8ff; } }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); font-weight: 750; }
h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink-soft); line-height: 1.55; }

/* Header */
.site-header { padding-block: 18px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.25rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; gap: 22px; font-weight: 600; font-size: 0.98rem; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav a:not(.nav-keep) { display: none; } }

/* Hero */
.hero { padding-block: clamp(28px, 6vw, 72px) clamp(8px, 2vw, 24px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 4px 0 0; list-style: none; color: var(--ink-soft); font-weight: 600; font-size: 0.98rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { flex: none; color: var(--blue); }
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 56px; width: auto; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.cta-note { color: var(--ink-soft); font-size: 0.95rem; }

/* The gauge: the page's one memorable thing */
.gauge { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin-inline: auto; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .track { stroke: var(--line); }
.gauge .fill { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset 2.2s cubic-bezier(.22,.8,.2,1), stroke 1.2s ease 0.4s; }
.gauge.is-full .fill { stroke: var(--full); }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.gauge-num { font: 800 clamp(3.4rem, 9vw, 5.6rem)/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.gauge-label { font-weight: 600; color: var(--ink-soft); }
.gauge-freed { margin-top: 8px; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); font-weight: 700; font-size: 0.95rem; opacity: 0; transition: opacity .6s ease 1.8s; }
.gauge:not(.is-full) .gauge-freed { opacity: 1; }

/* Sections */
section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(32px, 4vw, 52px); }

/* Screens */
.screens { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 28px; overflow-x: auto; padding: 8px var(--gutter) 28px; margin-inline: calc(var(--gutter) * -1); scroll-snap-type: x mandatory; scrollbar-width: thin; }
.screens figure { margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 14px; }
.phone { border-radius: 38px; padding: 9px; background: linear-gradient(160deg, #c9d6ee, #8ea3c8); box-shadow: 0 24px 50px -24px rgba(0, 40, 140, 0.45); }
@media (prefers-color-scheme: dark) { .phone { background: linear-gradient(160deg, #33415f, #1a2440); } }
.phone img { border-radius: 30px; width: 100%; }
.screens figcaption { font-weight: 600; line-height: 1.35; }
.screens figcaption span { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.95rem; margin-top: 2px; }

/* How it works: a real three-step sequence */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); counter-reset: step; padding: 0; margin: 0; list-style: none; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 10px; padding-top: 22px; border-top: 3px solid var(--blue); }
.steps li::before { content: counter(step); font: 800 2.6rem/1 var(--display); color: var(--blue); }
.steps p { color: var(--ink-soft); }

/* Download / pricing band */
.download { background: var(--card); border-block: 1px solid var(--line); }
.download .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .download .wrap { grid-template-columns: 1fr; } }
.plans { display: grid; gap: 14px; }
.plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 20px 22px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--paper); }
.plan strong { font: 700 1.2rem/1.2 var(--display); }
.plan .price { font-weight: 700; white-space: nowrap; }
.plan p { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.98rem; }
.plan.is-featured { border: 2px solid var(--blue); }
.fineprint { color: var(--ink-soft); font-size: 0.92rem; margin-top: 6px; }

/* Guides list */
.guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); padding: 0; margin: 0; list-style: none; }
@media (max-width: 760px) { .guide-list { grid-template-columns: 1fr; } }
.guide-list li { border-top: 1px solid var(--line); }
.guide-list a { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; text-decoration: none; color: var(--ink); }
.guide-list a strong { font: 700 1.15rem/1.3 var(--display); }
.guide-list a span { color: var(--ink-soft); font-size: 0.98rem; }
.guide-list a:hover strong { color: var(--blue); }

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); padding-block: 4px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 700 1.15rem/1.35 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq .answer { padding: 0 0 20px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-soft); }
.faq .answer a { font-weight: 600; }

/* Closing CTA: the only full-bleed colour on the page */
.final { background: linear-gradient(135deg, #2e8bff 0%, #0040c8 100%); color: #fff; }
.final .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (max-width: 700px) { .final .wrap { grid-template-columns: 1fr; } }
.final img.final-icon { width: clamp(96px, 14vw, 150px); border-radius: 30%; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.5); }
.final h2 { color: #fff; }
.final p { color: rgba(255, 255, 255, 0.86); }
.final .store-badge img { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25)); }

/* Footer */
.site-footer { padding-block: 40px 56px; color: var(--ink-soft); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--ink-soft); }

/* Guide and legal pages */
.article { padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 96px); }
.article .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .article .wrap { grid-template-columns: 1fr; } }
.prose { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 18px; }
.prose ol, .prose ul { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 10px; max-width: var(--measure); }
.prose li::marker { color: var(--blue); font-weight: 700; }
.crumbs { font-size: 0.92rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.answer-box { padding: 22px 24px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--blue) 9%, var(--card)); max-width: var(--measure); }
.answer-box p { color: var(--ink); }
.note { color: var(--ink-soft); font-size: 0.98rem; }
.aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 18px; padding: 22px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); }
@media (max-width: 900px) { .aside { position: static; } }
.aside .phone { max-width: 220px; }
.aside h3 { font-size: 1.2rem; }
.aside p { color: var(--ink-soft); font-size: 0.98rem; }
.related { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; list-style: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gauge .fill, .gauge-freed, .faq summary::after { transition: none; }
}
