/* AveGate website. Colors and type match the app and the App Store screenshots. */

:root {
  color-scheme: light;
  --blue: #1F4FBF;
  --blue-deep: #163A8F;
  --mist: #DCE5FF;
  --ivory: #F5F0E6;
  --paper: #FFFDF8;
  --ink: #1E1B17;
  --sub: #5F574C;
  --marian: #2E4A7D;
  --gold: #E3C27A;
  --yellow: #FFD23F;
  --frame: #0E1530;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
}

img { max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 10vw, 120px); }
.section--blue { background: var(--blue); color: #FFFFFF; }
.section--ivory { background: var(--ivory); }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 6vw, 64px); }
.section-head h2 { font-size: clamp(40px, 6.4vw, 72px); }
.section-head p { margin-top: 18px; font-size: clamp(18px, 2.2vw, 22px); color: var(--sub); }
.section--blue .section-head p { color: var(--mist); }

.eyebrow {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--marian);
}
.section--blue .eyebrow { color: var(--yellow); }

/* Header */

.site-header { background: var(--blue); color: #FFFFFF; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.header-link {
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 18px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
}
.header-link:hover { border-color: #FFFFFF; }

/* Hero */

.hero { background: var(--blue); color: #FFFFFF; overflow: hidden; }
.hero .container {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero h1 { font-size: clamp(56px, 10vw, 112px); line-height: 0.98; letter-spacing: -0.02em; }
.hero .lead { margin-top: 24px; max-width: 30ch; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.45; color: var(--mist); }

.soon {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 32px;
  padding: 14px 22px;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}
.soon strong {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.facts { margin-top: 18px; font-size: 16px; font-weight: 600; color: var(--mist); }

.hero-art { position: relative; width: 100%; max-width: 520px; margin-inline: auto; }
.arch {
  margin: 0;
  width: 80%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 8px solid var(--gold);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  background: #1A1410;
}
.arch img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-art .phone { position: absolute; right: 0; bottom: -6%; width: 40%; }
.sticker {
  position: absolute;
  top: 2%;
  right: 4%;
  padding: 0.6em 1em;
  border-radius: 999px;
  background: var(--yellow);
  color: #14110D;
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  transform: rotate(8deg);
  box-shadow: 0 10px 24px rgba(5, 12, 40, 0.35);
}

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; }
}

/* Phone frames */

.phone {
  padding: 2.6%;
  border-radius: 12% / 5.6%;
  background: var(--frame);
  box-shadow: 0 24px 60px rgba(5, 12, 40, 0.35);
}
.phone > img, .screen {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10.4% / 4.8%;
}

/* A drawing of the Screen Time gate (Extensions/ShieldConfiguration), sized in container units. */
.screen { position: relative; aspect-ratio: 1320 / 2868; overflow: hidden; container-type: inline-size; }
.shield { background: var(--ivory); color: var(--ink); text-align: center; }
.shield > span { position: absolute; }
.sh-time { left: 10.3cqw; top: 4.7cqw; font-size: 3.9cqw; font-weight: 600; line-height: 1; }
.sh-icon {
  left: 41.25cqw;
  top: 57.6cqw;
  width: 17.5cqw;
  height: 17.5cqw;
  display: grid;
  place-items: center;
  border: 1.23cqw solid var(--marian);
  border-radius: 50%;
}
.sh-icon > span { width: 8.6cqw; height: 8.6cqw; border: 1.23cqw solid var(--marian); border-radius: 50%; }
.sh-title { left: 6cqw; right: 6cqw; top: 82cqw; font-size: 6.8cqw; font-weight: 800; line-height: 1.1; }
.sh-sub { left: 11.3cqw; right: 11.3cqw; top: 93.5cqw; font-size: 4.3cqw; font-weight: 500; line-height: 1.35; color: var(--sub); }
.sh-primary {
  left: 7.2cqw;
  right: 7.2cqw;
  top: 178cqw;
  height: 12.8cqw;
  border-radius: 3.1cqw;
  background: var(--marian);
  color: #FFFFFF;
  font-size: 4.5cqw;
  font-weight: 600;
  line-height: 12.8cqw;
}
.sh-secondary { left: 7.2cqw; right: 7.2cqw; top: 194.5cqw; font-size: 4.5cqw; font-weight: 600; color: var(--marian); }
.sh-home { left: 34.5cqw; bottom: 2.3cqw; width: 31cqw; height: 1.2cqw; border-radius: 1cqw; background: rgba(30, 27, 23, 0.35); }

/* The line under the hero */

.hook { padding-block: clamp(64px, 10vw, 112px); background: var(--ivory); text-align: center; }
.hook p {
  max-width: 20ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-size: clamp(34px, 5.6vw, 60px);
  font-weight: 700;
  line-height: 1.12;
  text-wrap: balance;
}
.hook em { font-style: normal; color: var(--blue); }

/* How it works */

.cards { display: grid; gap: clamp(40px, 5vw, 32px); margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card .phone { width: min(78%, 280px); margin-inline: auto; margin-bottom: 28px; }
.card h3 { display: flex; align-items: baseline; gap: 12px; font-size: clamp(28px, 3vw, 34px); }
.card p { margin-top: 10px; color: var(--sub); }
.num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 800;
  transform: translateY(-4px);
}

/* Unlock tiers (Shared/UnlockPolicy.swift) */

.tiers { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "when time" "what time" "beads beads";
  column-gap: 16px;
  padding: 28px;
  border-radius: 28px;
  background: var(--ivory);
  color: var(--ink);
  box-shadow: 0 24px 50px rgba(5, 12, 40, 0.35);
}
.tier-when { grid-area: when; font-size: 14px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--marian); }
.tier-what { grid-area: what; margin-top: 6px; font-family: var(--serif); font-size: clamp(28px, 3vw, 34px); font-weight: 700; line-height: 1.05; }
.tier-time { grid-area: time; align-self: center; text-align: center; color: var(--blue); font-size: 20px; font-weight: 800; line-height: 1; }
.tier-time span { display: block; font-size: clamp(56px, 7vw, 72px); letter-spacing: -0.04em; }
.beads { grid-area: beads; display: flex; align-items: center; gap: 6px; margin-top: 22px; }
.bead {
  --s: 30px;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background:
    radial-gradient(calc(var(--s) * 0.22) calc(var(--s) * 0.15) at 35% 25%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0)),
    radial-gradient(circle calc(var(--s) * 0.65) at 40% 35%, #D2B088 0%, #8A6640 55%, #3F2C18 100%);
  box-shadow: 0 3px 8px rgba(30, 27, 23, 0.3);
}
.bead--small { --s: 19px; }
.tiers-note { margin-top: 28px; color: var(--mist); }

/* More in the app */

.features { display: grid; gap: 48px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.features .phone { width: min(70%, 250px); margin-inline: auto; margin-bottom: 24px; }
.features h3 { font-size: clamp(26px, 2.8vw, 30px); }
.features p { margin-top: 8px; color: var(--sub); }

/* Privacy */

.promises { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .promises { grid-template-columns: repeat(2, 1fr); } }
.promises li { padding: 26px 28px; border-radius: 24px; background: rgba(255, 255, 255, 0.1); }
.promises strong { display: block; font-family: var(--serif); font-size: clamp(26px, 3vw, 32px); line-height: 1.1; }
.promises span { display: block; margin-top: 8px; color: var(--mist); }
.privacy-link { margin-top: 28px; }
.privacy-link a { font-weight: 700; color: var(--yellow); }

/* FAQ */

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid rgba(30, 27, 23, 0.15); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--sans); font-weight: 500; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 22px; max-width: 64ch; color: var(--sub); }

/* Closing */

.closing { text-align: center; }
.closing h2 { font-size: clamp(48px, 8vw, 96px); }
.closing .soon { margin-top: 36px; }

.site-footer { padding-block: 40px; background: var(--blue-deep); color: var(--mist); font-size: 15px; }
.site-footer .container { display: grid; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 700; color: #FFFFFF; }
.site-footer small { font-size: 14px; }

/* Plain text pages (privacy) */

.doc { max-width: 760px; padding-block: clamp(48px, 8vw, 96px); }
.doc h1 { font-size: clamp(40px, 6vw, 64px); }
.doc h2 { margin-top: 40px; font-size: clamp(24px, 3vw, 30px); }
.doc p, .doc ul { margin-top: 14px; }
.doc li + li { margin-top: 6px; }
.doc .meta { color: var(--sub); }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
