/* Simple Phone Helper — "Lantern light" design system.
   Tokens (locked) -> base -> components -> responsive.
   No webfonts, no external requests. */

/* ============ Tokens ============ */
:root {
  color-scheme: light;

  --bg:            #FAF6F0;
  --surface:       #FFFFFF;
  --surface-warm:  #FFF7E8;
  --line:          #E7E1D8;
  --line-strong:   #CFC5B6;
  --ink:           #1F1F24;
  --ink-soft:      #57575F;
  --navy:          #24395B;
  --brand:         #A85413;
  --brand-strong:  #8F460E;
  --glow:          #F2A24B;
  --link:          #2E6BC6;
  --green-text:    #1F7A44;
  --focus:         #A85413;

  --fs-hero: clamp(2.35rem, 5.5vw, 3.5rem);
  --fs-h1:   clamp(2rem, 4.5vw, 2.75rem);
  --fs-h2:   clamp(1.55rem, 3.2vw, 2.1rem);
  --fs-h3:   1.3rem;
  --fs-lead: clamp(1.15rem, 1.8vw, 1.375rem);
  --fs-body: 1.125rem;
  --fs-small: 1rem;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 72px; --s9: 104px;

  --content-max: 1120px;
  --measure: 66ch;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(36,57,91,.08);
  --shadow: 0 18px 44px -20px rgba(36,57,91,.22);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", sans-serif;
}

/* ============ Base ============ */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3 {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { line-height: 1.15; }
h2, h3 { line-height: 1.2; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); }

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

ul, ol { margin: 0; padding: 0; }

/* Body links (prose): always underlined for this audience */
.prose a,
.lead a,
.tool-footnote a,
.keep-reading a,
.guide-article section a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

/* Focus ring (all interactive) — never removed */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.gallery:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ============ Layout ============ */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 20px;
}

main > section {
  padding-block: var(--s8);
}

.section-head { margin-bottom: var(--s6); }
.section-head p { max-width: var(--measure); }
.section-head-center {
  text-align: center;
  margin-inline: auto;
}
.section-head-center p { margin-inline: auto; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 150ms ease, color 150ms ease, transform 100ms ease;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-strong); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-secondary:hover { background: rgba(36,57,91,.06); }
.btn-compact {
  min-height: 40px;
  padding: 10px 18px;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 150ms ease;
}
@supports not (backdrop-filter: blur(8px)) {
  .site-header { background: var(--bg); }
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  min-height: 64px;
  padding-block: 10px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.logo-word {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.05rem;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s5);
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--fs-small);
}
.site-nav a:hover { color: var(--navy); }
.site-nav a[aria-current="page"] {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ Hero ============ */
.hero { background: var(--bg); }
.hero .wrap {
  display: grid;
  gap: var(--s7);
  align-items: center;
}
.hero-content { min-width: 0; }
.hero h1 { font-size: var(--fs-hero); }
.hero .lead { margin-top: var(--s4); }
.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: var(--measure);
}
.hero-cta { margin-top: var(--s6); }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
}
.cta-microcopy {
  margin-top: var(--s3);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.trust-line {
  margin-top: var(--s5);
  font-size: var(--fs-small);
  color: var(--navy);
  font-weight: 600;
  max-width: var(--measure);
}
.hero-media { position: relative; min-width: 0; }
.hero-media::before {
  content: "";
  position: absolute;
  inset: -8% 0;
  background: radial-gradient(closest-side, #FFF3D6, transparent);
  z-index: 0;
  pointer-events: none;
}
.hero-media .device-frame { position: relative; z-index: 1; }

/* ============ Device frame ============ */
.device-frame {
  background: #fff;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
}
.device-frame img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}
.frame-hero { max-width: 320px; }

/* ============ Trust strip ============ */
.trust-strip {
  background: var(--surface-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: var(--s5) !important;
}
.trust-strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4) var(--s6);
  justify-content: center;
  list-style: none;
}
.trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: var(--fs-small);
  font-weight: 600;
}
.check {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--green-text);
}

/* ============ Cinematic brand film ============ */
.brand-film { padding-block: var(--s8); background: var(--bg); }
.brand-film-media {
  max-width: 940px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: #201607;
  line-height: 0;
}
.brand-film-el { width: 100%; height: auto; display: block; }
.brand-film-caption {
  text-align: center;
  margin-top: var(--s5);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--navy);
}

/* ============ Problem / prose ============ */
.prose p { max-width: var(--measure); }
.prose { font-size: var(--fs-body); }
.narrow { max-width: var(--measure); margin-inline: auto; }

/* ============ How it works ============ */
.how-steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: var(--s6);
}
.how-steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--s4);
  align-items: start;
  max-width: var(--measure);
}
.how-steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.how-steps .step-title {
  display: block;
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.how-steps .step-text { min-width: 0; }
.how-note {
  margin-top: var(--s5);
  max-width: var(--measure);
  color: var(--ink-soft);
}
.split {
  display: grid;
  gap: var(--s7);
  align-items: center;
}
.split-media { min-width: 0; }
.section-cta { margin-top: var(--s6); }
.section-cta-center { text-align: center; }

/* ============ Benefits ============ */
.benefit-grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: 1fr;
}
.benefit-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s6);
}
.benefit-card h3 { margin-bottom: var(--s3); }

/* ============ Tools ============ */
.tool-panel {
  background: var(--surface-warm);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: var(--s6);
  display: grid;
  gap: var(--s5);
}
.tool-item {
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--line);
}
.tool-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.tool-item h3 { margin-bottom: var(--s2); }
.tool-footnote {
  margin-top: var(--s5);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ============ Gallery ============ */
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 78%);
  gap: var(--s5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--s4);
  -webkit-overflow-scrolling: touch;
}
.gallery figure {
  margin: 0;
  scroll-snap-align: start;
}
.gallery figcaption {
  margin-top: var(--s4);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
}

/* ============ Pricing ============ */
.pricing {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--s7);
  max-width: 820px;
}
.promise-list {
  list-style: none;
  display: grid;
  gap: var(--s3);
  margin: var(--s5) 0;
}
.promise-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--navy);
  font-weight: 600;
}
.promise-list .check { width: 22px; height: 22px; margin-top: 3px; }
.small-print {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ============ Who it's for ============ */
.who .section-head p { max-width: var(--measure); }

/* ============ Guides grid ============ */
.guides-grid {
  display: grid;
  gap: var(--s5);
  grid-template-columns: 1fr;
}
.guide-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s6);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.guide-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.guide-card h3 {
  margin-bottom: var(--s2);
  transition: color 150ms ease;
}
.guide-card:hover h3 {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guide-card .card-line {
  color: var(--ink-soft);
  margin-bottom: var(--s3);
}
.guide-card .read-more {
  color: var(--link);
  font-weight: 600;
}

/* ============ FAQ ============ */
.faq-list {
  display: grid;
  gap: var(--s4);
  max-width: 860px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 48px;
  padding: var(--s4) var(--s5);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  position: relative;
  background:
    linear-gradient(var(--brand), var(--brand)) center/16px 2px no-repeat,
    linear-gradient(var(--brand), var(--brand)) center/2px 16px no-repeat;
  transition: transform 150ms ease;
}
.faq-item[open] summary::after {
  background: linear-gradient(var(--brand), var(--brand)) center/16px 2px no-repeat;
}
.faq-item .faq-answer {
  padding: 0 var(--s5) var(--s5);
}
.faq-item .faq-answer p { max-width: var(--measure); }

/* ============ CTA panel (guides) ============ */
.cta-panel {
  background: var(--surface-warm);
  border: 1px solid rgba(242,162,75,.4);
  border-radius: var(--radius-lg);
  padding: var(--s7);
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}
.cta-panel h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--s3);
}
.cta-panel p {
  color: var(--ink-soft);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--s5);
}

/* ============ Final CTA ============ */
.final-cta {
  background: var(--navy);
  text-align: center;
}
.final-cta h2 { color: #fff; }
.final-cta p {
  color: #E9EDF5;
  max-width: 56ch;
  margin-inline: auto;
}
.final-cta .lead-body { margin: var(--s4) auto var(--s6); }
.final-cta .cta-microcopy { color: #C7D0DF; margin-top: var(--s4); }

/* ============ Footer ============ */
.site-footer {
  background: var(--navy);
  color: #E9EDF5;
  padding-block: var(--s8) var(--s7);
}
.footer-grid {
  display: grid;
  gap: var(--s7);
  grid-template-columns: 1fr;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.footer-brand-icon { width: 72px; height: 72px; border-radius: 16px; }
.footer-brand-name { font-size: 1.2rem; font-weight: 700; color: #fff; }
.footer-app p { color: #C7D0DF; max-width: 34ch; margin-bottom: var(--s5); }
.footer-col h3 { color: #fff; font-size: 1.05rem; margin-bottom: var(--s4); }
.footer-col ul { list-style: none; display: grid; gap: var(--s3); }
.footer-col a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-col a:hover { color: var(--glow); }
.footer-disclaimer,
.footer-copyright {
  font-size: var(--fs-small);
  color: #C7D0DF;
  max-width: 90ch;
  margin-top: var(--s6);
}
.footer-copyright { margin-top: var(--s4); }

/* ============ Sticky mobile CTA ============ */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.sticky-cta-label {
  color: var(--navy);
  font-weight: 700;
  font-size: var(--fs-small);
}

/* ============ Breadcrumb ============ */
.breadcrumb { padding-top: var(--s5); }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
  content: "/";
  color: var(--line-strong);
}
.breadcrumb a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current="page"] { color: var(--ink-soft); }

/* ============ Guide layout ============ */
.guide-hero { padding-block: var(--s6) var(--s5); }
.guide-hero h1 { font-size: var(--fs-h1); }
.guide-hero .lead { margin-top: var(--s4); }
.guide-cta-line {
  margin-bottom: var(--s3);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}
.guide-top-cta { margin-top: var(--s5); }
.guide-media { margin-block: var(--s5); }
.guide-media .device-frame { max-width: 300px; }

.guide-article { padding-bottom: var(--s7); }
.guide-article section { margin-top: var(--s7); max-width: var(--measure); }
.guide-article h2 { margin-bottom: var(--s3); }
.guide-article .prose-list {
  list-style: disc;
  padding-left: 1.3em;
  display: grid;
  gap: var(--s2);
}
.guide-article .prose-list li { max-width: var(--measure); }

.keep-reading {
  margin-top: var(--s7);
  border-top: 1px solid var(--line);
  padding-top: var(--s6);
}
.keep-reading .kr-title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--s3);
}
.keep-reading ul { list-style: none; display: grid; gap: var(--s3); }
.keep-reading a { font-weight: 600; }

/* ============ Responsive ============ */
/* Nav links hidden on small screens (logo + CTA remain; no hamburger — minimal-JS rule). */
@media (max-width: 700px) {
  .site-nav { display: none; }
}

@media (min-width: 700px) {
  .benefit-grid { grid-template-columns: 1fr 1fr; }
  .guides-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .wrap { padding-inline: 24px; }
  .sticky-cta { display: none; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 55fr 45fr; }
  .split { grid-template-columns: 1fr 0.85fr; }
  .guide-media { float: right; width: 300px; margin-left: var(--s6); margin-top: 0; }
}

@media (min-width: 1024px) {
  main > section { padding-block: var(--s9); }
  .guides-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    scroll-snap-type: none;
  }
  .gallery figcaption { max-width: none; }
}

/* Sticky bar space reservation (mobile only) */
@media (max-width: 767.98px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}

/* ============ Motion & preferences ============ */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
