/* Archery Timer — one stylesheet, no framework, no web fonts.
   Palette: the CapTarget identity (navy, blue) plus the timer's own phase
   colours, which are the app's whole visual language. */

:root {
  color-scheme: light dark;

  --navy: #083A64;
  --blue: #458BCA;
  --green: #32BE59;
  --red: #E12B2B;
  --orange: #F09610;

  --bg: #FBFCFD;
  --panel: #FFFFFF;
  --ink: #10243A;
  --ink-soft: #4A5F75;
  --line: #E2E8EF;
  --accent: var(--navy);
  --shadow: 0 1px 2px rgba(8, 58, 100, .06), 0 12px 32px rgba(8, 58, 100, .08);

  --measure: 34rem;
  --radius: 14px;
  --pad: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1620;
    --panel: #121F2C;
    --ink: #E8EEF4;
    --ink-soft: #9DB0C2;
    --line: #223243;
    --accent: var(--blue);
    --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(1rem, .97rem + .18vw, 1.09rem)/1.65 -apple-system, BlinkMacSystemFont,
        "Segoe UI", "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--navy); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- header */

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .6rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 650; color: inherit; text-decoration: none; letter-spacing: -.01em;
}
.brand img { border-radius: 8px; }

.bar-nav { display: flex; gap: 1.1rem; margin-inline-start: auto; flex-wrap: wrap; }
.bar-nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.bar-nav a:hover, .bar-nav a[aria-current] { color: var(--ink); text-decoration: underline; }

.langs { position: relative; font-size: .95rem; }
.langs summary {
  list-style: none; cursor: pointer; padding: .3rem .6rem;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft);
  white-space: nowrap;
}
.langs summary::-webkit-details-marker { display: none; }
.langs[open] summary { color: var(--ink); }
.langs ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + .4rem); z-index: 6;
  margin: 0; padding: .4rem; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(8rem, 1fr)); gap: .1rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.langs a {
  display: block; padding: .4rem .6rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.langs a:hover { background: color-mix(in srgb, var(--blue) 12%, transparent); }
.langs a[aria-current] { font-weight: 650; color: var(--accent); }

/* ------------------------------------------------------------------ main */

main { display: block; }

section { padding: clamp(2.5rem, 6vw, 4.5rem) var(--pad); }

.hero {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  max-width: 74rem; margin: 0 auto;
  padding-top: clamp(2rem, 5vw, 3.5rem);
}
.hero-text { max-width: var(--measure); }
.hero-text p { color: var(--ink-soft); font-size: 1.08em; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; font-weight: 650;
  color: var(--blue); margin-bottom: .8rem;
}

.hero-video {
  width: min(72%, 280px); margin: 0 auto; aspect-ratio: 1100 / 2390;
  border-radius: 22px; box-shadow: var(--shadow); overflow: hidden;
}
.hero-video iframe {
  width: 100%; height: 100%; border: 0; display: block;
  opacity: 0; transition: opacity .35s ease;
}
.hero-video iframe.ready { opacity: 1; }

.hero-text .free-chip {
  /* `.hero-text p` (a class + an element) outranks a bare `.free-chip`
     class selector, so without this extra scoping it silently overrides the
     gold chip's text back to the muted --ink-soft body colour. */
  color-scheme: light;
  display: inline-flex; align-items: center; gap: .45rem;
  margin: 1.1rem 0 0; padding: .5rem 1.05rem;
  border-radius: 999px; font-weight: 800; font-size: .92rem;
  color: #402900; background: linear-gradient(135deg, #FFD24D, #E8A317);
  box-shadow: 0 4px 14px rgba(180, 122, 8, .4);
}
.free-chip svg {
  width: 1.05rem; height: 1.05rem; flex: 0 0 auto;
  fill: rgba(64, 41, 0, .2); stroke: #402900; stroke-width: 1.4;
}
.hero-shots { position: relative; display: flex; justify-content: center; min-height: 1px; }
.shot { border-radius: 22px; box-shadow: var(--shadow); display: block; }
.shot-front { width: min(58%, 240px); position: relative; z-index: 2; }
.shot-back {
  width: min(58%, 240px); position: relative; z-index: 1;
  margin-inline-start: -12%; margin-top: 2.2rem; opacity: .96;
}
.shot-wide { width: 100%; border-radius: 12px; }
.shot-watch { width: min(60%, 190px); border-radius: 26px; }

/* buttons */

.cta-row { margin-top: 1.6rem; }
.cta {
  display: inline-block; padding: .8rem 1.5rem;
  background: var(--navy); color: #fff; border-radius: 999px;
  font-weight: 650; text-decoration: none; border: 1px solid transparent;
}
.cta:hover { background: #0B4B80; }
.cta-lg { padding: .95rem 1.9rem; font-size: 1.05rem; }
.cta-off {
  background: transparent; color: var(--ink-soft);
  border: 1px dashed var(--line); cursor: not-allowed;
}
.cta-off:hover { background: transparent; }
.cta-note { margin: .7rem 0 0; font-size: .9rem; color: var(--ink-soft); max-width: var(--measure); }
.cta-note strong { color: var(--ink); }

/* content sections */

.panel { max-width: 74rem; margin: 0 auto; }
.panel h2, .split h2 {
  margin-bottom: 1.2rem;
  /* The store listings write these headings in capitals, and several
     languages capitalise nouns, so lowercasing them by rule would be wrong.
     Sized down instead, which makes capitals read as a label rather than a
     shout. */
  font-size: clamp(1.2rem, 1.05rem + .7vw, 1.55rem);
  letter-spacing: .005em;
}

.ticks {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.ticks li {
  position: relative; padding: .95rem 1rem .95rem 2.6rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.ticks li::before {
  content: ""; position: absolute; left: 1rem; top: 1.35rem;
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--green);
}

.split {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center; max-width: 74rem; margin: 0 auto;
}
.split p { color: var(--ink-soft); }
.split .ticks { grid-template-columns: minmax(0, 1fr); }

.quote {
  background: var(--navy); color: #fff; text-align: center;
}
.quote p {
  margin: 0 auto; max-width: 42rem;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); font-weight: 600; line-height: 1.35;
}
.quote p::before, .quote p::after { content: none; }

.closing { max-width: 42rem; margin: 0 auto; text-align: center; }
.closing p { color: var(--ink-soft); }
.closing .cta-note { margin-inline: auto; }

/* ----------------------------------------------------------------- prose */

.prose {
  max-width: 42rem; margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) clamp(3rem, 7vw, 5rem);
}
.prose h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); }
.prose h2 {
  font-size: 1.25rem; margin-top: 2.4rem;
  padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.prose ul { padding-inline-start: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose code {
  font-size: .9em; padding: .1em .35em; border-radius: 5px;
  background: color-mix(in srgb, var(--blue) 12%, transparent);
}

/* ---------------------------------------------------------------- footer */

.foot {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--pad) 3rem;
  text-align: center; color: var(--ink-soft); font-size: .92rem;
}
.foot nav { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.foot p { margin: .3rem 0; }
.foot-free strong { color: var(--green); font-weight: 800; font-size: 1.05em; }
.fine { font-size: .85rem; }

/* ------------------------------------------------------------ root picker */

.picker { display: grid; place-items: center; min-height: 100vh; text-align: center; }
.picker main { padding: 2rem; }
.picker img { border-radius: 18px; }
.picker ul {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .4rem;
  max-width: 40rem;
}
.picker a {
  display: block; padding: .6rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); text-decoration: none;
}
.picker a:hover { border-color: var(--blue); }

/* ------------------------------------------------------------ wider views */

@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.05fr .95fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .split .ticks { grid-template-columns: minmax(0, 1fr); }
  .split-flip > :first-child { order: 2; }
  .hero-video { width: min(66%, 320px); }
  .shot-front { width: min(52%, 260px); }
  .shot-back { width: min(52%, 260px); }
}

/* A phone puts the brand on its own line; nav and the language picker share
   the next one rather than each taking a row of their own. */
@media (max-width: 34rem) {
  .brand { flex: 1 0 100%; }
  .bar-nav { margin-inline-start: 0; font-size: .9rem; }
  .langs { margin-inline-start: auto; }
  .langs ul { grid-template-columns: repeat(2, minmax(7rem, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
