/* LANDSEAIRE — a found frequency.
   Layout: one night-lake world. Cream "printed" slips float on dark water; old-web tables and frames,
   nothing aligned too well. Single deliberate dark look (not theme-switched). */
:root {
  --lake: #0a1820;        /* night water, the ground */
  --lake-2: #12283a;      /* a shallower night */
  --stock: #eee2c4;       /* cream paper stock */
  --stock-ink: #2a2116;   /* letterpress ink on stock */
  --brass: #d1a54e;       /* brass fittings, headings */
  --verd: #6fb3a2;        /* verdigris, secondary */
  --phos: #ffbf5e;        /* radio phosphor, amber */
  --fg: #d9e4dc;          /* moonlit text on the lake */
  --dim: #7f978f;         /* fog text */
  --link: #9fd3ff;        /* old-web unvisited */
  --visited: #d6a8ff;     /* old-web visited */

  --display: "Limelight", "Broadway", "Copperplate", Georgia, serif;
  --body: "IM Fell DW Pica", "Iowan Old Style", "Times New Roman", Times, serif;
  --mono: "VT323", "Courier New", Courier, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--lake); }
body {
  margin: 0;
  background-color: var(--lake); /* site.js paints a seigaiha wave tile over this */
  color: var(--fg);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  padding-inline: 16px;
  padding-block: 0 48px;
  overflow-x: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M3 3l6 15 2-6 6-2z' fill='%23eee2c4' stroke='%230a1820' stroke-width='1.2'/%3E%3C/svg%3E") 3 3, auto;
}
a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: var(--phos); text-decoration-style: wavy; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px dashed var(--phos); outline-offset: 3px;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--brass); text-wrap: balance; letter-spacing: .02em; line-height: 1.1; }
h1 { font-size: clamp(2.2rem, 7vw, 4.4rem); margin: .2em 0; }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); margin: .4em 0 .3em; }
h3 { font-size: 1.15rem; margin: .3em 0; }
p { margin: .5em 0; }
hr { border: 0; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12'%3E%3Cpath d='M0 6 Q10 0 20 6 T40 6' fill='none' stroke='%23d1a54e' stroke-width='1.2'/%3E%3C/svg%3E") repeat-x center; margin: 1.4em 0; }
small, .small { font-size: .82rem; color: var(--dim); }
.mono { font-family: var(--mono); font-size: 1.25em; line-height: 1.1; }

.wrap { max-width: 980px; margin: 0 auto; }

/* the starfield + fog canvas sits behind everything */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body > :where(:not(#sky)) { position: relative; z-index: 1; }

/* top strip: the frequency banner */
.band {
  font-family: var(--mono); font-size: 1.15rem; color: var(--phos);
  border-bottom: 1px solid var(--lake-2); padding-block: 6px; overflow: hidden; white-space: nowrap;
  margin-inline: -16px; padding-inline: 16px; background: rgba(10, 24, 32, .82);
}
.band .scroll { display: inline-block; animation: band 48s linear infinite; padding-left: 100%; }
@keyframes band { to { transform: translateX(-100%); } }

/* cream printed slip */
.slip {
  background: var(--stock); color: var(--stock-ink);
  padding: 14px 18px; box-shadow: 3px 4px 0 rgba(0,0,0,.45);
  background-image: radial-gradient(rgba(80,60,20,.06) 1px, transparent 1px);
  background-size: 3px 3px;
}
.slip a { color: #1d4f7a; }
.slip a:visited { color: #6a2f86; }
.slip h2, .slip h3 { color: #6b4a12; }
.slip small { color: #6b5d45; }

/* old-web framed box */
.box { border: 3px double var(--brass); padding: 12px 14px; background: rgba(10, 24, 32, .78); }
.box > h3:first-child { margin-top: 0; }
.box.verd { border-color: var(--verd); }

.grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid.side { grid-template-columns: 220px minmax(0, 1fr) 200px; } }

.tilt-l { transform: rotate(-1.4deg); }
.tilt-r { transform: rotate(1.1deg); }

.counter { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .12em; background: #000; color: var(--phos); border: 2px inset var(--dim); padding: 0 6px; display: inline-block; font-variant-numeric: tabular-nums; }

/* 88x31 buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.b88 { width: 88px; height: 31px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; line-height: 1; text-align: center; text-decoration: none; border: 1px solid; image-rendering: pixelated; overflow: hidden; }
.b88:visited { color: inherit; }

/* webring */
.ring { text-align: center; font-family: var(--mono); font-size: 1.2rem; margin-top: 2.5em; color: var(--dim); }
.ring a { margin: 0 .4em; }

button, .btn {
  font-family: var(--mono); font-size: 1.2rem; background: var(--lake-2); color: var(--phos);
  border: 2px outset var(--brass); padding: 2px 12px; cursor: pointer;
}
button:active { border-style: inset; }

input, textarea {
  font-family: var(--body); font-size: 1rem; background: var(--stock); color: var(--stock-ink);
  border: 2px inset var(--dim); padding: 6px; width: 100%;
}

/* lightbox */
.lb { position: fixed; inset: 0; background: rgba(4, 10, 14, .92); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.lb figure { margin: 0; max-width: min(720px, 100%); max-height: 100%; overflow: auto; text-align: center; }
.lb img { max-height: 78vh; box-shadow: 0 0 0 6px var(--stock), 0 0 60px rgba(209,165,78,.25); }
.lb figcaption { margin-top: 14px; color: var(--fg); }
.lb figcaption b { font-family: var(--display); font-weight: 400; color: var(--brass); font-size: 1.4rem; display: block; }

/* the sparkle trail */
.spray { position: fixed; pointer-events: none; z-index: 60; width: 4px; height: 4px; border-radius: 50%; background: var(--stock); animation: spray 900ms ease-out forwards; }
@keyframes spray { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

/* the flying boat that crosses on the secret */
#overflight { position: fixed; top: 18vh; left: -260px; width: 240px; z-index: 70; pointer-events: none; animation: fly 14s linear forwards; }
@keyframes fly { to { left: 110vw; top: 8vh; } }

.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .band .scroll, .blink, #overflight, .spray { animation: none !important; }
  .band .scroll { padding-left: 0; }
}
