/* Reef Tone landing page – plain CSS, system fonts, mobile-first */
:root {
  --bg: #04141f;
  --bg-2: #082233;
  --card: #0b2c42;
  --line: #15415c;
  --text: #e9f5fb;
  --muted: #9bbacb;
  --accent: #2bc4d8;
  --accent-ink: #032530;
  --radius: 16px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px;
}
.skip:focus { left: 8px; z-index: 10; }

/* Header */
.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.lang { font-size: .9rem; color: var(--muted); }
.lang a { color: var(--muted); text-decoration: none; padding: 4px 6px; }
.lang a[aria-current="true"] { color: var(--text); font-weight: 700; }

/* Hero */
.hero {
  padding: 28px 0 56px;
  background: radial-gradient(120% 80% at 50% 0%, #0d4d6b 0%, var(--bg) 65%);
  text-align: center;
}
h1 { font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.02em; }
.subline { font-size: clamp(1.05rem, 3.2vw, 1.3rem); color: var(--muted); max-width: 40ch; margin: 0 auto 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 1.05rem; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
/* Official Apple badge: unmodified, with clear space of 1/4 of its height around it */
.store-badge { display: inline-block; padding: 14px; line-height: 0; }
.store-badge img { width: 162px; height: 54px; }
.store-badge:hover { filter: brightness(1.1); }
.checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; list-style: none; margin: 4px 0 36px; padding: 0; font-size: .92rem; color: var(--muted); }
.checks li::before { content: "\2713"; color: var(--accent); font-weight: 700; margin-right: 6px; }

/* Sections */
section { padding: 56px 0; }
section:nth-of-type(even) { background: var(--bg-2); }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1.2; margin: 0 0 12px; text-align: center; }
.lead { color: var(--muted); text-align: center; max-width: 60ch; margin: 0 auto 32px; }

/* Footer */
.site-footer { padding: 32px 0 48px; color: var(--muted); font-size: .9rem; text-align: center; border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 12px; }

@media (min-width: 720px) {
  .hero { padding: 72px 0 96px; }
  section { padding: 80px 0; }
}

/* Before/After slider */
.ba {
  --pos: 50%;
  position: relative; max-width: 860px; margin: 0 auto;
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--card); touch-action: pan-y;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,.5); pointer-events: none;
}
.ba .tag {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(3,20,31,.7); font-size: .8rem; font-weight: 600; z-index: 1;
}
.ba .tag.l { left: 12px; } .ba .tag.r { right: 12px; }
.ba input[type=range] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; z-index: 2;
}
/* Visible drag handle */
.ba::before {
  content: "\2039  \203A"; position: absolute; z-index: 1; top: 50%; left: var(--pos);
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; white-space: pre;
  background: #fff; color: #04141f; font: 700 1.3rem/1 var(--font);
  box-shadow: 0 2px 10px rgba(0,0,0,.45); pointer-events: none;
}
.ba:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.caption { text-align: center; color: var(--muted); font-size: .9rem; margin: 12px 0 0; }

/* Features */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 700; vertical-align: middle; }

/* Cameras */
.cameras { max-width: 60ch; margin: 0 auto; text-align: center; color: var(--muted); }
.placeholder { border: 2px dashed var(--line); border-radius: var(--radius); padding: 24px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style-position: inside; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* Example picker under the before/after slider */
.thumbs { display: flex; justify-content: center; gap: 10px; max-width: 860px; margin: 14px auto 0; }
.thumb { display: flex; flex-direction: column; justify-content: flex-start; flex: 1 1 0; max-width: 200px; padding: 0; background: var(--card); color: var(--muted); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; font: 600 .78rem/1.3 var(--font); text-align: center; }
.thumb img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.thumb span { display: block; flex: 1; padding: 6px 4px 8px; }
.thumb[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }

/* How it works: app screenshots */
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.step { flex: 0 0 68%; max-width: 280px; scroll-snap-align: center; }
/* Generic CSS iPhone frame (no Apple artwork): bezel, Dynamic Island, side buttons, home bar */
.phone { position: relative; margin: 0 8px 18px; padding: 3.2%; background: linear-gradient(145deg, #3a3d42, #16181b 40%, #2a2d31); border-radius: 15% / 6.9%; box-shadow: 0 0 0 1px #4a4e54 inset, 0 14px 34px rgba(0,0,0,.55); }
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 520 / 1127; border-radius: 11.6% / 5.3%; background: #000; }
.phone::before { content: ""; position: absolute; z-index: 1; top: 5.4%; left: 50%; width: 29%; height: 2.5%; transform: translateX(-50%); background: #000; border-radius: 999px; }
.phone::after { content: ""; position: absolute; z-index: 1; bottom: 4.6%; left: 50%; width: 34%; height: .5%; min-height: 3px; transform: translateX(-50%); background: rgba(255,255,255,.55); border-radius: 999px; }
.phone i { position: absolute; width: 1.2%; background: #2a2d31; border-radius: 2px; }
.phone i.b1 { left: -1%; top: 17%; height: 4%; }
.phone i.b2 { left: -1%; top: 24%; height: 7%; }
.phone i.b3 { left: -1%; top: 33%; height: 7%; }
.phone i.pw { right: -1%; top: 27%; height: 11%; }
.step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step .num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .8rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (min-width: 720px) {
  .steps { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .step { max-width: none; }
}

/* Physics: how far each color travels in water */
.depth { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: grid; gap: 14px; }
.depth-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.depth-label { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.depth-label span { color: var(--muted); }
.depth-track { display: block; height: 18px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.depth-bar { display: block; height: 100%; border-radius: 999px; }
.depth-bar.red { background: linear-gradient(90deg, #e5483d 55%, rgba(229,72,61,.15)); }
.depth-bar.orange { background: linear-gradient(90deg, #f08a24 55%, rgba(240,138,36,.15)); }
.depth-bar.yellow { background: linear-gradient(90deg, #f2d03b 55%, rgba(242,208,59,.15)); }
.depth-bar.blue { background: linear-gradient(90deg, #3fbf8f, #2bc4d8 45%, #2a7fd6); }
@media (min-width: 720px) {
  .depth-row { grid-template-columns: 240px 1fr; align-items: center; gap: 18px; }
  .depth-label { flex-direction: column; gap: 0; }
}

/* Comparison table */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.table-wrap { max-width: 860px; margin: 0 auto; overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cmp th, .cmp td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.cmp thead th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.cmp thead th.us { color: var(--accent); }
.cmp tbody th { text-align: left; font-weight: 500; padding-left: 4px; }
.cmp td.y { color: var(--text); font-weight: 700; font-size: 1.1rem; }
.cmp tbody td:nth-child(2) { background: rgba(43,196,216,.09); }
.cmp tbody td:nth-child(2).y { color: var(--accent); }
.cmp td.n { color: var(--muted); opacity: .7; }
.cmp td.s { color: var(--muted); font-size: .82rem; }
.cmp .badge { margin-left: 4px; font-size: .62rem; padding: 0 6px; }
@media (min-width: 720px) { .cmp { font-size: 1rem; } .cmp th, .cmp td { padding: 14px 12px; } }

/* Legal notice page */
.legal { padding: 48px 0 72px; }
.legal .wrap { max-width: 720px; }
.legal h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); margin: 0 0 8px; }
.legal h2 { font-size: 1.15rem; text-align: left; margin: 28px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal .meta { color: var(--muted); font-size: .9rem; }
