/* =========================================================
   IdenTT landing page — "Lagoon"
   Plain CSS, custom properties, no framework.
   Fonts and colour tokens: tokens.css.
   ========================================================= */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
/* clip, not hidden: hidden content still counts as scrollable width, and
   Firefox's responsive view widens the page to it on first load. */
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: var(--tint); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Shared bits ---------- */

.section { padding-block: var(--section-y); }
.section--card { background: var(--card); }

.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.section-head__lede { margin-top: 16px; color: var(--muted); font-size: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  padding: 14px 24px;
  transition: background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn--outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--outline:hover { box-shadow: inset 0 0 0 1px var(--text); transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ---------- Brand / wordmark ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.brand__icon { width: 36px; height: 36px; border-radius: 10px; }
.brand__word {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.045em;
  line-height: 1;
  padding-bottom: 2px;
}
.brand--footer .brand__icon { width: 30px; height: 30px; border-radius: 8px; }
.brand--footer .brand__word { font-size: 20px; }

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  flex: none; /* a flex row must not squeeze it: the screen would crop */
  width: 260px;
  padding: 7px;
  border-radius: 38px;
  background: #0b1f22;
  box-shadow: var(--shadow-phone), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.phone img {
  /* The screenshot at its own proportions; the frame wraps it, never crops it. */
  display: block;
  width: 100%; height: auto;
  border-radius: 31px;
}
.phone::after { /* subtle glass sheen */
  content: ""; position: absolute; inset: 7px; border-radius: 31px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 40%);
}

/* ---------- SiteHeader ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px;
}
.site-header__nav { display: flex; align-items: center; gap: 28px; }
.site-header__links { display: flex; gap: 26px; }
.site-header__links a {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 6px 0; position: relative;
}
.site-header__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.site-header__links a:hover::after { transform: scaleX(1); }
.site-header__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle, .site-header__menu-btn {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  cursor: pointer; transition: transform .2s var(--ease), background-color .2s;
}
.theme-toggle:hover, .site-header__menu-btn:hover { transform: translateY(-1px); }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
.site-header__menu-btn { display: none; }

@media (max-width: 860px) {
  .site-header__menu-btn { display: inline-grid; }
  .site-header__nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .site-header__nav.is-open { display: flex; }
  .site-header__links { flex-direction: column; gap: 0; }
  .site-header__links a { display: block; padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .site-header__links a::after { display: none; }
  .site-header__actions { justify-content: space-between; }
}

/* ---------- HeroSection ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(26, 127, 137, 0.45), transparent 60%),
    radial-gradient(600px 400px at 10% 110%, rgba(244, 183, 64, 0.12), transparent 60%),
    linear-gradient(160deg, var(--hero) 0%, var(--hero-2) 100%);
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
  padding-block: clamp(56px, 8vw, 112px);
}
.hero__title {
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.hero__accent { display: block; color: #bfe9ec; }
.hero__lede {
  margin-top: 22px; max-width: 520px;
  font-size: clamp(18px, 2vw, 20px);
  color: #cfe2e1;
}

.hero__visual {
  position: relative;
  height: 600px;
}
.hero__visual .phone { position: absolute; }
.phone--front { width: 262px; left: 12%; top: 40px; z-index: 2; rotate: -4deg; }
.phone--back  { width: 236px; right: 6%; top: 0; z-index: 1; rotate: 6deg; opacity: 0.96; }

/* ---------- Store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
/* The stores' own badge artwork, unaltered. Google's file carries its clear
   space as padding (41 of 250 px on each side), so it is drawn larger and
   pulled back in to sit level with Apple's. */
.store-badge {
  --badge-h: 52px;
  display: inline-block; line-height: 0;
  transition: transform .2s var(--ease);
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { display: block; height: var(--badge-h); width: auto; }
.store-badge--google img {
  height: calc(var(--badge-h) * 250 / 168);
  margin: calc(var(--badge-h) * -41 / 168);
}

/* ---------- HowItWorksSection ---------- */
.how__inner {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
}
.steps { display: grid; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -0.04em;
  color: var(--tint); font-variant-numeric: tabular-nums;
}
.step__title { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.step__text { color: var(--muted); font-size: 16px; }

.how__visual { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 0; }
.phone--tilt-left { rotate: -3deg; z-index: 2; }
.phone--tilt-right { rotate: 4deg; margin-left: 20px; }
.phone--offset { margin-top: 72px; }

/* ---------- PrivacySection ---------- */
.privacy__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.privacy__visual, .reputation__visual, .safety__visual { display: flex; justify-content: center; }

.keys {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.keys__card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  flex: 0 1 150px;
  padding: 18px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.keys__icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--tint-soft); color: var(--tint);
}
.keys__icon--accent { background: var(--accent); color: var(--on-accent); }
.keys__label { font-size: 15px; }
.keys__holder { font-size: 14px; color: var(--muted); }
.keys__link {
  flex: 1 1 24px; min-width: 16px; height: 0;
  border-top: 2px dashed var(--line);
  margin-inline: 6px;
}
.keys__lock {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  flex: none;
  width: 116px; height: 116px;
  border-radius: 28px;
  background: var(--primary); color: var(--on-primary);
  box-shadow: 0 14px 30px -14px rgba(13, 79, 87, 0.7);
}
.keys__lock-text { font-size: 13px; font-weight: 700; }

.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
.outcome { padding-top: 16px; border-top: 2px solid var(--line); }
.outcome--good { border-top-color: var(--success); }
.outcome--report { border-top-color: var(--accent); }
.outcome__title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.outcome__text { font-size: 15px; color: var(--muted); }

/* ---------- ReputationSection ---------- */
.reputation__inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: center; }
.record { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.record__item { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.record__item strong { color: var(--text); font-weight: 700; }
.reputation__note { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 15px; }

/* ---------- SafetySection ---------- */
.safety__inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: center; }
.tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 32px; }
.tip {
  display: grid; grid-template-columns: 28px 1fr; gap: 2px 14px; align-content: start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.tip:last-child { grid-column: 1 / -1; }
.tip__icon { grid-row: span 2; color: var(--tint); padding-top: 2px; }
.tip__title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.tip__text { font-size: 15px; color: var(--muted); }

/* ---------- FaqSection ---------- */
.faq__inner { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start; }
.faq__list { display: grid; gap: 12px; }
.faq__item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: box-shadow .2s var(--ease);
}
.faq__item[open] { box-shadow: var(--shadow-md); }
.faq__q {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px;
  font-weight: 700; font-size: 17px;
  cursor: pointer; list-style: none;
  border-radius: var(--radius-sm);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--tint-soft) var(--plus-icon) center / 14px no-repeat;
  transition: transform .25s var(--ease);
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { padding: 0 20px 20px; color: var(--muted); }

/* ---------- DownloadSection ---------- */
.download { background: var(--accent); color: var(--on-accent); padding-block: clamp(48px, 7vw, 80px); }
.download__inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.download__icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 24px -10px rgba(42, 28, 0, 0.5); }
.download__copy { flex: 1 1 320px; }
.download__title { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; }
.download__text { margin-top: 6px; font-size: 17px; }
.download .store-badges { margin-top: 0; }
.download :focus-visible { outline-color: #0a3a40; }

/* ---------- SiteFooter ---------- */
.site-footer { padding-block: 40px; border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__links a { color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.site-footer__links a:hover { color: var(--tint); text-decoration: underline; }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; width: 100%; color: var(--muted); font-size: 14px; }

/* ---------- Motion ---------- */
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
.float { animation: float 6s ease-in-out infinite; }
.float--slow { animation-duration: 7.5s; animation-delay: -2s; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .phone { width: 230px; }
  .phone--front { width: 230px; }
  .phone--back { width: 206px; }
  .hero__visual { height: 520px; }
}

@media (max-width: 900px) {
  .hero__inner,
  .how__inner,
  .privacy__inner,
  .reputation__inner,
  .safety__inner,
  .faq__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__copy { text-align: left; }
  .hero__visual { height: 480px; max-width: 460px; width: 100%; margin-inline: auto; }
  .reputation__visual { order: 2; }
  .faq__inner { gap: 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero__visual { height: 420px; }
  .phone--front { width: 196px; left: 4%; top: 36px; }
  .phone--back { width: 176px; right: 2%; }
  .phone { width: 210px; border-radius: 32px; padding: 6px; }
  .phone img, .phone::after { border-radius: 26px; }
  .phone::after { inset: 6px; }
  .how__visual .phone { width: 170px; }
  .phone--tilt-right { margin-left: 14px; }
  .phone--offset { margin-top: 48px; }
  .tips, .outcomes { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .keys { flex-direction: column; padding: 20px; }
  .keys__card { flex: none; width: 100%; max-width: 260px; }
  .keys__link { flex: none; width: 0; height: 22px; min-width: 0; border-top: 0; border-left: 2px dashed var(--line); margin: 4px 0; }
}

@media (max-width: 380px) {
  .brand__word { font-size: 21px; }
  .hero__visual { height: 380px; }
  .phone--front { width: 176px; }
  .phone--back { width: 158px; }
  .how__visual .phone { width: 150px; }
}

@media (min-width: 1280px) {
  .phone--front { width: 280px; }
  .phone--back { width: 250px; }
  .hero__visual { height: 640px; }
}

/* ---------- Join page (join.html) ---------- */
.join { padding-block: clamp(40px, 7vw, 80px) var(--section-y); }
.join__inner { max-width: 640px; }
.join__title { font-size: clamp(30px, 5vw, 44px); font-weight: 800; line-height: 1.15; }
.join__lede { margin-top: 14px; color: var(--muted); font-size: 18px; }
.join__heading { margin-top: 40px; margin-bottom: 12px; font-size: 22px; font-weight: 800; }
.join-code { margin-top: 28px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.join-code__label { font-size: 15px; font-weight: 700; color: var(--muted); }
.join-code__value { margin-top: 4px; font-size: clamp(40px, 11vw, 56px); font-weight: 800; letter-spacing: 0.08em; line-height: 1.2; }
.join-code__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.join-code__copy { background: var(--tint-soft); color: var(--text); }
.join-code__note { margin-top: 14px; color: var(--muted); font-size: 15px; }
.join-steps { padding-left: 1.3em; list-style: decimal; }
.join-steps li { margin-bottom: 10px; }
.join .store-badges { margin-top: 20px; }
