/* AviatorWatch 2.0 home page. The look follows the App Store 2.0 art:
   dusk photos, Saira Semi Condensed headlines, Ultra watches with real
   screens. The privacy, contact and 404 pages load this file, then
   pages.css. No page uses style.css. */

:root {
  --night: #0b1022;
  --night-2: #121a35;
  --night-3: #1b2547;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.78);
  --ink-3: rgba(255, 255, 255, 0.56);
  --rule: rgba(255, 255, 255, 0.12);
  --magenta: #ff5fd2;
  --cyan: #5cc8ff;
  --vfr: #3ddc84;
  --windsock: #e8742e;
  --radius: 28px;
  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: 'Saira Semi Condensed', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 10px max(16px, calc((100vw - var(--wrap)) / 2));
  background: rgba(11, 16, 34, 0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; flex: none; }
.icon-gradient {
  display: block; width: 100%; height: 100%; position: relative;
  background: linear-gradient(to bottom, #3578F7 0%, #54BAF8 100%);
  background: linear-gradient(to bottom, color(display-p3 0.208 0.478 0.969) 0%, color(display-p3 0.329 0.729 0.976) 100%);
}
.icon-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform: scale(1.2); }
.icon-layer.icon-ticks { transform: scale(1.1); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 16px; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 560px) { .nav-links a.nav-text { display: none; } }

/* ───────── App Store badge ───────── */
/* Apple's official badge artwork, unchanged. */
.badge { display: inline-block; line-height: 0; transition: transform 0.15s ease; }
.badge:hover { transform: translateY(-1px); }
.badge img { height: 56px; width: auto; }
.nav-links .badge img { height: 35px; }

/* ───────── Hero ───────── */
.hero { position: relative; }
.hero picture img { width: 100%; height: auto; }
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 24%;
  background: linear-gradient(180deg, rgba(11, 16, 34, 0), var(--night));
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; text-align: center; padding: 8px 16px 40px; margin-top: -2vw; }
.hero-copy p { margin: 0 auto 22px; max-width: 34ch; font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; line-height: 1.25; }
.hero-note { display: block; margin-top: 14px; font-size: 14px; color: var(--ink-3); }

/* ───────── Chapters ───────── */
.chapter {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(32px, 6vw, 80px);
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(48px, 8vw, 104px) 16px;
}
.chapter.flip .panel { order: -1; }
.eyebrow { display: inline-block; margin-bottom: 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--magenta); }
.chapter h2, .plain h2 { margin: 0 0 16px; font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; }
.chapter p { margin: 0 0 14px; color: var(--ink-2); max-width: 46ch; }

/* Faces chapter: the pills sit under the text on a wide screen, and
   under the watch picture on a phone. */
.faces { grid-template-areas: "copy panel" "chips panel"; row-gap: 0; }
.faces .copy { grid-area: copy; align-self: end; }
.faces .panel { grid-area: panel; }
.faces .chips-wrap { grid-area: chips; align-self: start; padding-top: 8px; }
.chips-title { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chips button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; color: var(--ink-2); cursor: pointer;
  font: 500 14px/1.4 'Saira Semi Condensed', system-ui, sans-serif;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.chips button:hover, .chips button:focus-visible { border-color: var(--magenta); color: var(--ink); outline: none; }
.chips .count { color: var(--ink-3); font-size: 13px; }
.chips-hint { margin: 8px 0 0 !important; font-size: 13px; color: var(--ink-3) !important; }

/* ───────── Complication popovers ───────── */
.comp-pop {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); overflow: auto;
  margin: auto; padding: 0; border: 1px solid var(--rule); border-radius: 22px;
  background: var(--night-2); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.comp-pop::backdrop { background: rgba(5, 8, 20, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.comp-pop-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 10px; padding: 18px 20px 12px; background: var(--night-2); border-bottom: 1px solid var(--rule); }
.comp-pop-head h3 { margin: 0; font-size: 24px; font-weight: 700; }
.comp-pop-head span { color: var(--ink-3); font-size: 15px; }
.comp-close { margin-left: auto; align-self: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--night-3); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.comp-grid { display: flex; flex-wrap: wrap; gap: 14px; padding: 18px 20px 22px; }
.comp { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-radius: 16px; background: #000; text-align: center; }
.comp.circular { width: calc(33.333% - 10px); min-width: 130px; flex-grow: 1; }
.comp.rectangular, .comp.inline { width: 100%; }
.comp-img { display: flex; align-items: center; justify-content: center; min-height: 92px; }
.comp.circular img { width: 92px; }
.comp.rectangular img { width: 250px; }
.comp.inline img { width: 250px; }
.comp figcaption { font-size: 14px; font-weight: 600; color: var(--ink-2); line-height: 1.25; }
.comp figcaption span { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }

/* ───────── And more ───────── */
.more-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 28px; }
.more-card { margin: 0; padding: 14px 12px 16px; border: 1px solid var(--rule); border-radius: 20px; background: var(--night-2); }
.more-card img { width: 86%; margin: 0 auto 10px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4)); }
.more-card figcaption { font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.more-card b { display: block; margin-bottom: 4px; font-size: 18px; color: var(--ink); }
@media (max-width: 1000px) { .more-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .more-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .more-card { padding: 10px 8px 12px; } .more-card figcaption { font-size: 14px; } .more-card b { font-size: 16px; } }

/* A tall photo panel with watches, like a store screenshot. */
.panel {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background-color: var(--night-2);
  background-size: cover; background-position: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.panel::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 10, 30, 0.25) 0%, rgba(5, 10, 30, 0) 40%, rgba(5, 10, 30, 0.35) 100%);
}
.watches { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.watches img { width: 44%; filter: drop-shadow(0 14px 18px rgba(0, 20, 60, 0.45)); }
.watches img + img { margin-left: -9%; }
.watches.trio img { width: 38%; }
.watches.trio img:nth-child(1) { transform: translateY(6%) rotate(-4deg); }
.watches.trio img:nth-child(2) { width: 48%; position: relative; z-index: 2; }
.watches.trio img:nth-child(3) { transform: translateY(6%) rotate(4deg); }
.watches.duo img:nth-child(1) { width: 50%; position: relative; z-index: 2; transform: translateY(-4%); }
.watches.duo img:nth-child(2) { transform: translateY(8%); }
.watches.solo img { width: 58%; }
.watches.phone { gap: 0; }
.watches.phone .iphone { width: 46%; position: relative; z-index: 1; transform: translateX(8%); }
.watches.phone > img { width: 42%; position: relative; z-index: 2; transform: translate(-6%, 18%); margin: 0; }

.iphone {
  border-radius: 14% / 6.5%;
  padding: 2.4%;
  background: #1c1c1e;
  box-shadow: 0 0 0 1.5px #4b4b50, 0 24px 40px rgba(0, 0, 0, 0.45);
}
.iphone img { border-radius: 12% / 5.6%; width: 100%; }

/* Bottom-right fine print, like the store art. */
.panel-note { position: absolute; right: 14px; bottom: 10px; z-index: 3; margin: 0; font-size: 12px; line-height: 1.25; text-align: right; color: rgba(255, 255, 255, 0.86); }

/* ───────── Flight tools: one watch, screens change as you scroll ───────── */
.fly { align-items: start; }
.fly .panel { position: sticky; top: 92px; }
.fly .screens img { position: absolute; left: 50%; top: 50%; width: 58%; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.35s ease; }
.fly .screens img.on { opacity: 1; }
.fly .screens img:first-child { opacity: 1; }
.fly.js .screens img:first-child:not(.on) { opacity: 0; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { padding: 0 0 0 20px; border-left: 2px solid var(--rule); transition: border-color 0.3s ease, opacity 0.3s ease; }
.fly.js .step { min-height: clamp(340px, 58vh, 560px); display: flex; flex-direction: column; justify-content: center; opacity: 0.4; }
.fly.js .step.on { opacity: 1; border-color: var(--magenta); }
.step h3 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 34px); font-weight: 700; line-height: 1.05; }
.step-shot { display: none; }
.fly-intro { margin-bottom: 8px; }
.fly-intro p { margin-bottom: 0; }

/* ───────── Plain sections ───────── */
.plain { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 7vw, 88px) 16px; }
.plain > p { max-width: 60ch; color: var(--ink-2); margin: 0 0 14px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.card { padding: 22px 24px; border: 1px solid var(--rule); border-radius: 20px; background: var(--night-2); }
.card h3 { margin: 0 0 10px; font-size: 22px; font-weight: 700; }
.card ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.card li { margin-bottom: 6px; }
.card li strong { color: var(--ink); font-weight: 600; }

.fine {
  max-width: var(--wrap); margin: 0 auto 0; padding: 0 16px;
}
.fine-inner {
  padding: 28px 32px; border-radius: 20px;
  border: 1px solid rgba(232, 116, 46, 0.45);
  background: linear-gradient(180deg, rgba(232, 116, 46, 0.10), rgba(232, 116, 46, 0.03));
}
.fine h2 { margin: 0 0 10px; font-size: 26px; font-weight: 700; }
.fine p { margin: 0; color: var(--ink-2); max-width: 70ch; }

.final { text-align: center; padding: clamp(64px, 9vw, 120px) 16px 40px; }
.final h2 { margin: 0 0 22px; font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.05; }

/* ───────── Footer ───────── */
footer { position: relative; margin-top: 70px; }
.windsock { position: absolute; left: max(16px, calc((100vw - var(--wrap)) / 2)); bottom: 100%; width: 84px; height: 110px; margin-bottom: -4px; }
.windsock-cone { transform-origin: 12px 22px; animation: sock 6s ease-in-out infinite; }
@keyframes sock { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .windsock-cone { animation: none; } }
.footer-band { background: linear-gradient(180deg, #3d6a2f, #2a4a20); padding: 26px 16px 30px; text-align: center; font-size: 16px; }
.footer-band p { margin: 0 0 6px; color: rgba(255, 255, 255, 0.92); }
.footer-band .muted { color: rgba(255, 255, 255, 0.7); font-size: 14px; }
.footer-band a { color: #fff; }

/* ───────── Narrow screens ───────── */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .chapter { grid-template-columns: 1fr; gap: 28px; }
  .faces { grid-template-areas: "copy" "panel" "chips"; row-gap: 20px; }
  .faces .chips-wrap { padding-top: 0; }
  .chapter.flip .panel { order: 0; }
  .panel { max-width: 520px; width: 100%; margin: 0 auto; }
  .cards { grid-template-columns: 1fr; }

  /* Flight tools: no sticky watch. Each step shows its own screen. */
  .fly .panel { display: none; }
  .fly.js .step { min-height: 0; opacity: 1; display: block; border-color: var(--magenta); padding-bottom: 28px; }
  .step-shot { display: block; width: 62%; max-width: 280px; margin: 14px auto 0; filter: drop-shadow(0 14px 18px rgba(0, 20, 60, 0.45)); }
  .fine-inner { padding: 22px 20px; }
}
