/* Flaggies — colours sampled from the app's own assets, not invented:
     #00A400 wordmark green, #C0242C flag red, #FCBC20 flagstick amber,
     #0C0F11 the hole view's chrome, #FCFACB the launch screen's cream.
   Layout concept: the app's dark chrome carries the imagery; the page below
   it is the launch screen's warm paper. */

:root {
  /* brand, fixed in both themes */
  --green:      #00A400;
  --green-deep: #007C00;
  --green-lift: #2CB42C;
  --red:        #C0242C;
  --amber:      #FCBC20;
  --chrome:     #0C0F11;
  --chrome-2:   #161D19;
  --cream:      #FCFACB;
  --cream-warm: #FAEDB6;

  /* themed surfaces */
  --paper:      #faf8e6;
  --card:       #fffdf4;
  --ink:        #15201a;
  --ink-soft:   #5a6459;
  --ink-faint:  #8d9589;
  --rule:       #ddd9bd;
  --rule-soft:  #eae7d2;
  --accent:     #056b05;
  --stroke-1:   rgba(252, 188, 32, 0.22);
  --stroke-2:   rgba(252, 188, 32, 0.46);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --measure: 64ch;
  --shell: 1080px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0c0f11;
    --card:       #141a17;
    --ink:        #e9efea;
    --ink-soft:   #9aa69d;
    --ink-faint:  #6d7872;
    --rule:       #27302b;
    --rule-soft:  #1c2420;
    --accent:     #3fd03f;
    --stroke-1:   rgba(252, 188, 32, 0.16);
    --stroke-2:   rgba(252, 188, 32, 0.34);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper:      #0c0f11;
  --card:       #141a17;
  --ink:        #e9efea;
  --ink-soft:   #9aa69d;
  --ink-faint:  #6d7872;
  --rule:       #27302b;
  --rule-soft:  #1c2420;
  --accent:     #3fd03f;
  --stroke-1:   rgba(252, 188, 32, 0.16);
  --stroke-2:   rgba(252, 188, 32, 0.34);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv05" 1;
}

img, svg { max-width: 100%; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- shell ---------- */

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding-block: 0.9rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.mark img {
  display: block;
  width: 136px;
  height: auto;
}

@media (max-width: 420px) {
  .mark img { width: 116px; }
}

.masthead nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 2px;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--red); }

/* ---------- type ---------- */

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--ink-faint);
  margin: 0;
}

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.3rem, 6.2vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin: 0.45em 0 0;
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0 0 0.5rem;
}

h3 {
  font-family: var(--body);
  font-weight: 650;
  font-size: 1.03rem;
  letter-spacing: -0.005em;
  margin: 0 0 0.3rem;
}

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.06rem, 2.1vw, 1.22rem);
  color: var(--ink-soft);
  line-height: 1.55;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }

section { padding-block: clamp(3rem, 7vw, 5.25rem); }
section + section { border-top: 1px solid var(--rule-soft); }

.section-head { margin-bottom: 2.25rem; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.75rem, 6.5vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.hero .lede { margin-top: 1.1rem; }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0.4rem 0.8rem 0.4rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: var(--card);
}

.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); flex: none;
}

/* ---------- scorecard ---------- */

figcaption {
  margin-top: 0.85rem;
  font-size: 0.83rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ---------- feature grid ---------- */

.grid {
  display: grid;
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid > div {
  background: var(--paper);
  padding: 1.4rem 1.35rem;
  min-width: 0;
}

.grid p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

.glyph {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.7rem;
}

/* ---------- press formats ---------- */

.formats { margin: 0; display: grid; gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); }

.formats > div {
  background: var(--paper);
  padding: 1.1rem 1.3rem;
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.3rem 1.75rem;
  align-items: baseline;
}

@media (max-width: 640px) {
  .formats > div { grid-template-columns: 1fr; }
}

.formats dt {
  font-weight: 650;
  font-size: 0.95rem;
  min-width: 0;
}

.formats dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-width: 0;
}

/* ---------- two column ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}
.cols > * { min-width: 0; }

/* ---------- rule list ---------- */

ul.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; max-width: var(--measure); }

ul.ticks li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.58em;
  width: 0.62rem; height: 1px;
  background: var(--accent);
}

ul.ticks li strong { color: var(--ink); font-weight: 600; }

/* ---------- contact ---------- */

.contact {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.75rem;
}

.contact > div { background: var(--card); padding: 1.2rem 1.3rem; min-width: 0; }

.contact dt {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.contact dd { margin: 0; font-size: 0.95rem; word-break: break-word; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  background: var(--card);
  padding-block: 2.5rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

footer .wrap { display: grid; gap: 1.5rem; }

footer .foot-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

footer nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
footer p { margin: 0; max-width: 46ch; }
footer .entity { color: var(--ink-faint); font-size: 0.8rem; }

/* ---------- document pages ---------- */

.doc { padding-block: clamp(2.5rem, 6vw, 4rem); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 0.4rem; }
.doc h2 { font-size: clamp(1.25rem, 2.6vw, 1.5rem); margin-top: 2.5rem; }
.doc h3 { margin-top: 1.6rem; }
.doc > p, .doc > ul, .doc > ol { max-width: var(--measure); }
.doc ul, .doc ol { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.45rem; color: var(--ink-soft); }
.doc li strong { color: var(--ink); }
.doc .updated { font-size: 0.83rem; color: var(--ink-faint); letter-spacing: 0.02em; }

.callout {
  border-left: 3px solid var(--red);
  background: var(--card);
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  max-width: var(--measure);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---------- real app screenshot ---------- */

.shot { margin: clamp(2rem, 5vw, 3rem) 0 0; }

.shot-frame {
  background: var(--chrome);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  /* The source frame is 1800x828. Framing to 1800x678 and anchoring to the
     bottom lifts the window past the app toolbar and the club crest. Show the
     whole frame by setting aspect-ratio to 1800/828 and object-position to
     center. */
  aspect-ratio: 1800 / 828;
  max-width: 100%;
}

.shot-frame img,
.shot-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--chrome);
}

/* ---------- launch-screen band ---------- */

.band {
  background: var(--cream-warm);
  border-block: 1px solid var(--rule);
  padding-block: 0;
  overflow: hidden;
  /* The launch artwork is 1400x832 and mostly empty sky. Framing to the
     lower stretch keeps the horizon and the three golfers. */
  aspect-ratio: 1400 / 500;
}

.band img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

section.band + section { border-top: 0; }
