/* GOGOGolf — the site around the app.
 *
 * Plain CSS, no framework and no build step beyond the one that stamps the
 * pages out. The whole file is a few kilobytes and arrives in one request,
 * which is most of why the page appears instantly on a phone on hotel wifi.
 *
 * Colours come from the app: fairway green for what you can act on, brass
 * for what has been achieved. Somebody arriving here from the store should
 * recognise the app they are about to install. */

:root {
  --fairway: #1f5c3d;
  --fairway-dark: #16402b;
  --brass: #9a6f26;
  --ink: #14201a;
  --muted: #5d6b63;
  --line: #dfe5e1;
  --bg: #ffffff;
  --bg-soft: #f5f8f6;
  --radius: 14px;
  --wrap: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fairway: #6fbf92;
    --fairway-dark: #8fd4ac;
    --brass: #d9ae5c;
    --ink: #e7ece9;
    --muted: #9aa8a1;
    --line: #2a332e;
    --bg: #11150f;
    --bg-soft: #171d19;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
               "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans Thai",
               "Microsoft JhengHei", Roboto, sans-serif;
  /* Generous, because a lot of this is read on a phone by people who have
     been squinting at a scorecard all day. */
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--fairway); }

h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); margin: 0 0 1.6rem; }
h3 { font-size: 1.1rem; margin: 0 0 .4rem; }

section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.band { background: var(--bg-soft); max-width: none; }
.band > * { max-width: var(--wrap); margin-inline: auto; }
.band > h2 { max-width: var(--wrap); }

.quiet { color: var(--muted); }

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

/* ---- header ------------------------------------------------------------ */

.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  /* The bar carries the only way to change language, so it stays reachable
     however far down the page somebody has scrolled. */
}

.brand {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1.05rem;
  color: var(--ink); text-decoration: none;
}

.nav { display: flex; gap: 1.2rem; margin-inline-start: auto; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem;
  white-space: nowrap;
}
.nav a:hover { color: var(--fairway); }

.picker select {
  font: inherit; font-size: .9rem;
  padding: .35rem 1.6rem .35rem .6rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* On a phone the section links wrap into a second row rather than pushing
   the language picker off the edge. */
@media (max-width: 46rem) {
  .bar { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin: .4rem 0 0; overflow-x: auto; }
  .picker { margin-inline-start: auto; }
}

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

.hero {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1.15fr .85fr;
  padding-top: 3.5rem;
}
@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-shot { justify-self: center; }
}

.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 1.8rem; }

.cta {
  display: inline-block;
  padding: .95rem 1.9rem;
  background: var(--fairway); color: #fff;
  font-weight: 700; font-size: 1.02rem;
  text-decoration: none; border-radius: var(--radius);
  /* Comfortably past the 48px anyone recommends: this is pressed with a
     thumb, often outdoors, often by someone wearing a glove. */
  min-height: 54px;
  transition: background .15s ease;
}
.cta:hover { background: var(--fairway-dark); }
@media (prefers-color-scheme: dark) { .cta { color: #08130d; } }

.fine { font-size: .92rem; color: var(--muted); margin: .9rem 0 0; }

.hero-shot img {
  width: min(300px, 72vw);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .13);
}

/* ---- features ---------------------------------------------------------- */

.grid {
  display: grid; gap: 1.6rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.grid article {
  padding: 1.4rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.grid p { margin: 0; color: var(--muted); font-size: .97rem; }

/* ---- steps ------------------------------------------------------------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.9rem 3.6rem;
  border-inline-start: 2px solid var(--line);
  margin-inline-start: 1.1rem;
}
.steps li:last-child { border-inline-start-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; inset-inline-start: -1.15rem; top: -.15rem;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  background: var(--fairway); color: #fff;
  border-radius: 50%; font-weight: 700; font-size: .95rem;
}
@media (prefers-color-scheme: dark) { .steps li::before { color: #08130d; } }
.steps p { margin: 0; color: var(--muted); }

/* ---- video ------------------------------------------------------------- */

.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- screenshots ------------------------------------------------------- */

.shots {
  display: flex; gap: 1rem; overflow-x: auto;
  padding-bottom: .8rem;
  scroll-snap-type: x mandatory;
  /* A row that scrolls rather than a grid that reflows: the shots are all
     the same shape and swiping through them is how a phone reads them. */
}
.shots img {
  flex: 0 0 auto;
  width: min(240px, 62vw);
  border-radius: 16px;
  border: 1px solid var(--line);
  scroll-snap-align: start;
}

/* ---- notices ----------------------------------------------------------- */

.notice {
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brass);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--bg);
}
.notice h3 { margin: 0 0 .3rem; }
.notice time { font-size: .85rem; color: var(--muted); }
.notice p { margin: .5rem 0 0; white-space: pre-wrap; }

/* ---- faq --------------------------------------------------------------- */

.faq { margin: 0; }
.faq dt {
  font-weight: 700; margin-top: 1.7rem;
  padding-inline-start: 1.3rem; position: relative;
}
.faq dt::before {
  content: "Q"; position: absolute; inset-inline-start: 0;
  color: var(--fairway); font-weight: 700;
}
.faq dt:first-child { margin-top: 0; }
.faq dd {
  margin: .4rem 0 0; padding-inline-start: 1.3rem;
  color: var(--muted);
}

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

.contact { text-align: center; }
.contact p { color: var(--muted); max-width: 34rem; margin: 0 auto 1.8rem; }

footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.25rem 3.5rem;
  text-align: center;
  font-size: .92rem;
}
footer p { margin: .4rem 0; }
footer a { margin: 0 .7rem; }

/* ---- the guide --------------------------------------------------------- */

.guide { max-width: var(--wrap); margin: 0 auto; }
.guide-head { padding-bottom: 1.5rem; }

.toc {
  max-width: var(--wrap); margin: 0 auto;
  padding: 1.6rem 1.6rem 1.8rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
/* The margin is on the nav, not the section, so the box lines up with the
   sections above and below it rather than sitting a little inset. */
.toc { margin: 0 1.25rem 1rem; }
@media (min-width: 71rem) { .toc { margin-inline: auto; } }
.toc h2 { font-size: 1rem; margin: 0 0 .8rem; color: var(--muted); }
.toc ol {
  margin: 0; padding-inline-start: 1.3rem;
  columns: 2; column-gap: 2.5rem;
}
@media (max-width: 40rem) { .toc ol { columns: 1; } }
.toc li { margin: .35rem 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.guide-section {
  padding-top: 3rem; padding-bottom: 1rem;
  /* The sticky header would otherwise cover the heading somebody just
     jumped to from the contents. */
  scroll-margin-top: 4.5rem;
}
.guide-section + .guide-section { border-top: 1px solid var(--line); }
.guide-section .lead { margin-bottom: 1.4rem; }

.guide-body {
  display: grid; gap: 1.6rem 2.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
@media (max-width: 52rem) {
  .guide-body { grid-template-columns: 1fr; }
}

.guide-steps { margin: 0; padding-inline-start: 1.4rem; }
.guide-steps li { margin: 0 0 .9rem; padding-inline-start: .3rem; }
.guide-steps li::marker { color: var(--fairway); font-weight: 700; }

.guide-shot {
  width: min(230px, 60vw);
  border-radius: 16px;
  border: 1px solid var(--line);
  grid-row: span 2;
}

.guide-note {
  grid-column: 1;
  margin: 0;
  padding: .9rem 1.1rem;
  background: var(--bg-soft);
  border-inline-start: 3px solid var(--brass);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
  font-size: .95rem;
}

/* A row on the landing page that opens the guide. */
.guide-link {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  background: var(--bg);
}
.guide-link:hover { border-color: var(--fairway); }
.guide-link strong { display: block; }
.guide-link span { color: var(--muted); font-size: .95rem; }
.guide-link .arrow { margin-inline-start: auto; color: var(--fairway); font-size: 1.4rem; }
