/* teelands.com. The colours and box style are the app's (apps/mobile/src/theme.ts). Sizes are in rem
   so a reader's own browser text size still works; nothing goes below 0.875rem (14px). */
:root {
  color-scheme: dark;
  --background: #101a14;
  --box: #18233a;
  --line: #e8f0ff;
  --text: #e8f0ff;
  --dim: #b4c3d8;
  --accent: #f4d35e;
  --sky: #1d3b5c;
  --sky-low: #2c5a7a;
  --grass: #5fa83f;
  --retro: Menlo, Consolas, "DejaVu Sans Mono", "Courier New", monospace;
  --read: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--read);
  font-size: 1rem;
  line-height: 1.6;
}

a { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img { display: block; image-rendering: pixelated; }

.skip {
  position: absolute;
  left: -999px;
  background: var(--accent);
  color: #000;
  padding: 10px 14px;
  font-family: var(--retro);
  font-weight: 700;
}
.skip:focus { left: 16px; top: 8px; z-index: 1; }

/* Headings stay in the retro face, in capitals. Long reading text uses the phone's own font. */
h1, h2, h3, .retro {
  font-family: var(--retro);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
h1 { color: var(--accent); font-size: 1.5rem; line-height: 1.3; margin: 0 0 8px; }
h2 { color: var(--accent); font-size: 1.125rem; line-height: 1.35; margin: 0 0 8px; }
h3 { color: var(--accent); font-size: 1rem; line-height: 1.35; margin: 0 0 6px; }
p, ul { margin: 0 0 10px; }
p:last-child, ul:last-child { margin-bottom: 0; }
ul { padding-left: 20px; }
li { margin-bottom: 4px; }
code { font-family: var(--retro); font-size: 0.875rem; overflow-wrap: anywhere; }

/* The top bar */
.bar { background: var(--background); border-bottom: 4px solid var(--line); }
.bar-in {
  max-width: 960px;
  margin: 0 auto;
  padding: 4px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--accent);
  font-family: var(--retro);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.bar nav { display: flex; gap: 4px; }
.bar nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--text);
  font-family: var(--retro);
  font-weight: 700;
  text-decoration: none;
}
.bar nav a[aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* The home page's sky, ending in hard pixel bands. The swing strip is 17 frames of 64 art px, drawn at
   exactly 2x so every pixel stays square. */
.sky {
  background: var(--sky);
  text-align: center;
  padding: 24px 16px 0;
  overflow: hidden;
}
.sky h1 { margin: 0; }
.sky img.logo {
  width: min(100%, 600px);
  height: auto;
  margin: 0 auto;
  animation: float 4s steps(4, jump-none) infinite alternate;
}
@keyframes float { to { transform: translateY(8px); } }
.tagline {
  font-family: var(--retro);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: 0.04em;
  margin: 20px auto 0;
  max-width: 44ch;
  text-shadow: 2px 2px 0 #000;
}
.tee-box {
  height: 112px;
  margin: 12px -16px 0;
  position: relative;
  background: linear-gradient(var(--sky) 0 24px, #254a6b 24px 56px, var(--sky-low) 56px);
}
.golfer {
  position: absolute;
  left: calc(50% - 64px);
  bottom: -14px;
  width: 128px;
  height: 128px;
  background: url("/art/swing.png") 0 0 / 2176px 128px no-repeat;
  image-rendering: pixelated;
  animation: swing 3.6s steps(17) infinite;
}
@keyframes swing {
  0%, 30% { background-position-x: 0; }
  100% { background-position-x: -2176px; }
}
.ground { height: 20px; background: var(--grass); border-top: 4px solid #000; border-bottom: 4px solid #3f2c1c; }

@media (prefers-reduced-motion: reduce) {
  .sky img.logo, .golfer { animation: none; }
}

/* Pages */
main { max-width: 960px; margin: 0 auto; padding: 24px 16px 40px; }
.page { max-width: 720px; }
.lead { font-size: 1.125rem; }
.dim { color: var(--dim); font-size: 0.875rem; }

/* The app's RetroBox */
.box {
  background: var(--box);
  border: 4px solid var(--line);
  box-shadow: 4px 4px 0 #000;
  padding: 16px;
  margin: 20px 0;
}
.box.note { border-color: var(--accent); }
.grid { display: grid; gap: 20px; margin: 20px 0; }
.grid .box { margin: 0; }
@media (min-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.jump { padding-left: 0; list-style: none; }
.jump a { display: inline-block; padding: 8px 0; }
.jump li { margin: 0; }

footer { border-top: 4px solid var(--line); }
.foot {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  color: var(--dim);
  font-size: 0.875rem;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--retro); font-weight: 700; }
