/* Iron Tide's website: the game's own colours (olive, sand, sky, team red
 * and blue) on dark, the pictures kept as crisp pixels. Wt's own widgets
 * (buttons, inputs, tables) are styled here too: the site has no Wt theme. */
:root {
  --bg: #161b14;
  --band: #1e251b;
  --band-dark: #12160f;
  --ink: #e8e4d0;
  --muted: #a9a58f;
  --olive: #778866;
  --sand: #ddcc99;
  --gold: #ffee44;
  --red: #ee3333;
  --blue: #4466ff;
  --line: #3a4434;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Consolas", "Lucida Console", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); }
img { image-rendering: pixelated; image-rendering: crisp-edges; max-width: 100%; height: auto; display: block; }
a { color: var(--sand); }
h1, h2, h3, .brand, .kicker { font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; }
h2 { font-size: 1.9rem; margin: 0 0 1rem; color: var(--sand); }
h3 { font-size: 1.05rem; color: var(--gold); margin: 1.4rem 0 .5rem; }
code, kbd { font-family: var(--mono); font-size: .9em; }
kbd { border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 4px; padding: 0 .4em; background: #22291f; }
small, .small { color: var(--muted); font-size: .85rem; }
.center { text-align: center; }

/* ---- the bar at the top ---- */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
       gap: 1rem; padding: .6rem 1.5rem; background: rgba(18, 22, 15, .95); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: bold; }
.top nav { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--ink); }
.top nav a.cta { color: var(--gold); }

/* ---- the opening ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2.5rem; align-items: center;
        padding: 4rem 1.5rem 3rem; max-width: 1200px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1; margin: .3rem 0 1rem; color: var(--ink);
           text-shadow: 4px 4px 0 #000, 0 0 30px rgba(255, 238, 68, .15); }
.kicker { color: var(--gold); font-size: .85rem; margin: 0; }
.lead { font-size: 1.15rem; color: #d6d2bc; }
.hero-shot img { width: 100%; border: 3px solid #000; box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0, 0, 0, .6); }
.buttons { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.5rem 0; }
.button, button { display: inline-block; font: bold .95rem var(--mono); letter-spacing: .08em; text-transform: uppercase;
                  text-decoration: none; color: #161b14; background: var(--gold); border: 0; border-radius: 3px;
                  padding: .75rem 1.3rem; cursor: pointer; box-shadow: 3px 3px 0 #000; }
.button:hover, button:hover { background: #fff27a; }
.button.ghost, button.ghost { background: transparent; color: var(--sand); box-shadow: inset 0 0 0 2px var(--line); }
.live { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .9rem; background: #0d100b;
        border: 1px solid var(--line); border-radius: 3px; font: .85rem var(--mono); color: var(--muted); }
.dot { width: .65rem; height: .65rem; border-radius: 50%; background: #44dd55; box-shadow: 0 0 8px #44dd55; flex: none; }
.dot.off { background: #775; box-shadow: none; }

/* ---- sections ---- */
.band { padding: 4rem 1.5rem; max-width: 1200px; margin: 0 auto; }
.band.dark { max-width: none; background: var(--band-dark); }
.band.dark > * { max-width: 1152px; margin-left: auto; margin-right: auto; }
.band.narrow { max-width: 760px; }
.band.wide { max-width: 1400px; }
.note { color: var(--muted); margin-top: -.5rem; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
.rules { padding-left: 1.2rem; }
.rules li { margin: .35rem 0; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.feature { background: var(--band); border: 1px solid var(--line); border-top: 3px solid var(--olive); padding: 1.1rem 1.2rem; }
.feature h3 { margin-top: 0; }
.feature p { margin: 0; color: #cfcbb5; font-size: .95rem; }

/* ---- pictures ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.thumb, .hero-img, .mapimg { cursor: zoom-in; color: var(--muted); font-size: .85rem; }
.thumb img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border: 2px solid #000;
             box-shadow: 0 0 0 1px var(--line); transition: transform .15s; }
.thumb:hover img { transform: scale(1.02); box-shadow: 0 0 0 2px var(--gold); }
.thumb span { display: block; margin-top: .35rem; }
.hero-img img { width: 100%; border: 3px solid #000; box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(0, 0, 0, .6); }
.hero-img span, .mapimg span { display: none; }
.town-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-content: start; }
.town-shots .thumb:last-child { grid-column: span 2; }
.lightbox { display: flex; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .92); cursor: zoom-out;
            align-items: center; justify-content: center; flex-direction: column; gap: .8rem; padding: 2rem; color: var(--ink); }
.lightbox img { width: min(1280px, 100%); max-height: 85vh; object-fit: contain; }

/* ---- the map ---- */
.map { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.mapimg img { width: 100%; border: 3px solid #000; box-shadow: 0 0 0 1px var(--line); }
.legend dt { font: bold .95rem var(--mono); color: var(--gold); margin-top: .8rem; }
.legend dt.red { color: var(--red); }
.legend dt.blue { color: #7799ff; }
.legend dd { margin: 0; color: #cfcbb5; }
.arsenal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: end; margin-top: 1rem; }
.arsenal figure { margin: 0; text-align: center; background: var(--band); border: 1px solid var(--line); padding: 1rem; }
.arsenal img { margin: 0 auto .5rem; max-height: 140px; width: auto; }
.arsenal figcaption { font: bold .9rem var(--mono); color: var(--sand); }

/* ---- playing ---- */
.speed { border-collapse: collapse; width: 100%; font-size: .9rem; margin-top: 1rem; }
.speed th, .speed td { border-bottom: 1px solid var(--line); padding: .35rem .5rem; text-align: right; }
.speed th:first-child, .speed td:first-child { text-align: left; }
.speed th { color: var(--gold); font-weight: normal; font-family: var(--mono); }
.keys { line-height: 2.1; }

/* ---- the sign-up ---- */
.signup { display: flex; flex-direction: column; gap: .9rem; background: var(--band); border: 1px solid var(--line);
          border-top: 3px solid var(--gold); padding: 1.5rem; }
.signup label { display: flex; flex-direction: column; gap: .3rem; font-size: .95rem; }
.signup input, .signup select, .signup textarea { font: 1rem var(--font); color: var(--ink); background: #10140e;
          border: 1px solid var(--line); border-radius: 3px; padding: .6rem .7rem; }
.signup input:focus, .signup select:focus, .signup textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.signup .check { flex-direction: row; align-items: center; gap: .6rem; }
.signup .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error { color: #ff8877; font-size: .9rem; }
.faq dt { font-weight: bold; color: var(--sand); margin-top: 1.1rem; }
.faq dd { margin: .2rem 0 0; color: #cfcbb5; }

/* ---- forms ---- */
.signup .check label, .check label { display: inline; }
.signup .check input { margin-right: .5rem; }
.signup button, .signup a.button { align-self: flex-start; }
.ok { color: #9be59f; font-size: .9rem; }
.error:empty, .ok:empty { display: none; }

/* ---- your account ---- */
.status { border: 1px solid var(--line); border-left: 5px solid var(--olive); padding: .7rem 1.2rem; margin: 1rem 0 1.5rem;
          background: var(--band); font-family: var(--mono); }
.status.approved, .status.licensed { border-left-color: #44dd55; }
.status.declined, .status.banned { border-left-color: var(--red); }
.downloads { display: flex; flex-direction: column; gap: .8rem; }
.downloads .file { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* ---- organisers ---- */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.tabs a { text-decoration: none; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }
.tabs a.on { color: #161b14; background: var(--sand); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.small-button, .admin-table button { font: .8rem var(--mono); padding: .3rem .6rem; box-shadow: none; text-transform: none;
            letter-spacing: 0; background: #2c3527; color: var(--ink); border: 1px solid var(--line); margin: 0 .3rem .3rem 0; }
.small-button.on { background: var(--sand); color: #161b14; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 1rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--line); padding: .45rem .4rem; text-align: left; vertical-align: top;
            overflow-wrap: anywhere; }
.admin-table th { color: var(--gold); font-weight: normal; }
.generator { margin-bottom: 1.5rem; }
.generator input { max-width: 26rem; }
.serials { font-family: var(--mono); }
.mono { font-family: var(--mono); white-space: nowrap; }

footer { border-top: 1px solid var(--line); padding: 2rem 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
footer p { margin: .3rem 0; }

@media (max-width: 860px) {
  .hero, .cols, .map { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .arsenal { grid-template-columns: 1fr 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .admin-table { display: block; overflow-x: auto; }
}
