/* BLACKTIDE | Deer Isle - site styles */

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/barlow-condensed-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/barlow-condensed-700.woff2') format('woff2');
}

:root {
  --ink: #0a0c0a;
  --ink-2: #101310;
  --ink-3: #151915;
  --paper: #eae7dc;
  --muted: #a9ac9a;
  --rust: #e0663c;
  --rust-soft: #f08a5f;
  --olive: #8b8d6c;
  --line: #2a2e26;
  --line-soft: #1e221d;
  --maxw: 1180px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, 'Liberation Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--rust-soft); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--rust-soft);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--rust); color: #14100e; padding: 10px 16px; font-weight: 700;
}
.skip:focus { left: 0; }

h1, h2, h3, .brand-name, .eyebrow, .btn, .nav-toggle, .site-nav a, .strip-inner, .status-state {
  font-family: var(--display);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  line-height: 1.05;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}
h3 {
  font-size: 1.3rem;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.03em;
}

.eyebrow {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rust-soft);
  margin: 0 0 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.brand img { border-radius: 6px; }
.brand-name {
  display: block; font-size: 1.5rem; font-weight: 700; line-height: 0.95; letter-spacing: 0.06em;
}
.brand-name b { color: var(--rust); font-weight: 700; }
.brand-name small {
  display: block; font-family: var(--body); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.24em; color: var(--muted); margin-top: 4px;
}

.nav-toggle {
  display: none; background: transparent; color: var(--paper);
  border: 1px solid var(--line); padding: 12px 16px; font-size: 0.95rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  color: var(--paper); text-decoration: none; font-size: 1rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rust); }
.site-nav a.btn:hover { border-bottom-color: transparent; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; padding: 13px 22px; text-decoration: none;
  font-size: 1.02rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--rust); color: #140f0c; border-color: var(--rust); }
.btn-primary:hover { background: #f07a4d; }
.btn-ghost { background: transparent; color: var(--paper); border-color: #666c5e; }
.btn-ghost:hover { background: rgba(234, 231, 220, 0.08); border-color: var(--paper); }
.btn-sm { padding: 9px 16px; font-size: 0.95rem; }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero-img { position: absolute; inset: 0; display: block; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,12,10,.96) 0%, rgba(10,12,10,.86) 42%, rgba(10,12,10,.42) 100%),
    linear-gradient(0deg, var(--ink) 2%, rgba(10,12,10,0) 45%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 44px; align-items: center;
  padding-top: 84px; padding-bottom: 84px;
}
@media (min-width: 901px) {
  .hero-inner { min-height: min(74vh, 660px); align-content: center; }
}
.hero-copy { max-width: 620px; }
.hero h1 {
  font-size: clamp(3.4rem, 12vw, 6.4rem);
  line-height: 0.86; font-weight: 700; letter-spacing: 0.01em;
  margin: 0 0 18px;
}
.hero h1 b { color: var(--rust); font-weight: 700; }
.lede {
  font-family: var(--display); font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  font-weight: 600; line-height: 1.15; color: var(--paper); margin: 0 0 14px;
  text-wrap: balance;
}
.hero-sub { color: #cbc9bc; margin: 0 0 28px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Status card ---------- */

.status-card {
  background: rgba(16, 19, 16, 0.9);
  border: 1px solid var(--line);
  padding: 22px;
}
.status-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none;
}
.dot.is-online { background: #6fca6c; box-shadow: 0 0 10px rgba(111, 202, 108, .7); }
.dot.is-offline { background: #e0574c; box-shadow: 0 0 10px rgba(224, 87, 76, .6); }
.status-state {
  font-size: 2.1rem; font-weight: 700; line-height: 1; margin: 0 0 6px; letter-spacing: 0.03em;
}
.status-detail { margin: 0 0 16px; color: #cbc9bc; font-size: 0.95rem; }
.status-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
  margin: 0 0 14px; padding: 16px 0 0; border-top: 1px solid var(--line-soft);
}
.status-grid div { min-width: 0; }
.status-grid dt {
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.status-grid dd { margin: 2px 0 0; font-weight: 600; font-size: 0.95rem; }
.status-foot { margin: 0; font-size: 0.76rem; color: var(--muted); line-height: 1.45; }

/* ---------- Strip ---------- */

.strip { background: var(--ink-2); border-bottom: 1px solid var(--line-soft); }
.strip-inner {
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center;
  padding-top: 16px; padding-bottom: 16px;
  font-size: 0.94rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.strip-inner b { color: var(--rust-soft); font-weight: 700; }

/* ---------- Sections ---------- */

.section { padding: 76px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }

.prose { max-width: 72ch; }
.prose p { color: #c6c4b7; }
.prose .big { font-size: 1.16rem; color: var(--paper); }

/* Join */
.section-join { background: var(--ink-2); }
.join-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 44px; }

.connect { border: 1px solid var(--line); background: var(--ink); padding: 20px; margin: 0 0 26px; }
.connect-label {
  margin: 0 0 10px; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.connect-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ip {
  font-family: var(--mono); font-size: clamp(1.05rem, 3.4vw, 1.45rem); font-weight: 600;
  color: var(--paper); background: #050605; border: 1px solid var(--line);
  padding: 11px 14px; letter-spacing: 0.02em; flex: 1 1 260px; text-align: center;
  overflow-wrap: anywhere;
}
.copy-btn { flex: 0 0 auto; }
.copy-btn.is-copied { background: #6fca6c; border-color: #6fca6c; }
.connect-meta { margin: 14px 0 0; font-size: 0.88rem; color: var(--muted); }
.connect-meta b { color: var(--paper); }

.steps { counter-reset: step; list-style: none; margin: 0 0 18px; padding: 0; }
.steps li {
  counter-increment: step; position: relative; padding: 0 0 18px 52px; color: #c6c4b7;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -2px;
  font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--rust);
}
.steps li b { color: var(--paper); }
.steps code, .kv code {
  font-family: var(--mono); font-size: 0.92em; background: #050605;
  border: 1px solid var(--line); padding: 1px 6px; overflow-wrap: anywhere;
}
.note { font-size: 0.9rem; color: var(--muted); margin: 0; }

.join-side { display: grid; gap: 18px; align-content: start; }
.card { background: var(--ink-3); border: 1px solid var(--line); padding: 22px; }
.card p { color: #c6c4b7; margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.card p b { color: var(--paper); }
.card-quiet { background: var(--ink); }
.card-warn { border-color: #6a3323; box-shadow: inset 3px 0 0 var(--rust); }

.kv { margin: 0; display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.kv dt { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }

/* Gameplay cards */
.cards {
  list-style: none; margin: 34px 0 0; padding: 0;
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
}

/* Rules */
.section-rules { background: var(--ink-2); }
.rules-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.rules-grid p { color: #c6c4b7; margin: 0 0 22px; }
.rules-list { margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: rule; }
.rules-list li {
  counter-increment: rule; position: relative; padding: 14px 0 14px 46px;
  border-top: 1px solid var(--line); color: var(--paper);
}
.rules-list li:first-child { border-top: 0; }
.rules-list li::before {
  content: counter(rule); position: absolute; left: 0; top: 12px;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--rust);
}

/* Discord */
.section-discord { text-align: center; }
.discord-inner { max-width: 62ch; margin: 0 auto; }
.discord-inner p { color: #c6c4b7; }
.section-discord .hero-actions { justify-content: center; margin-top: 26px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--ink-2); padding: 42px 0 30px; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; align-items: flex-start;
}
.footer-brand { margin: 0 0 6px; font-size: 1.5rem; }
.muted { color: var(--muted); margin: 0; font-family: var(--mono); font-size: 0.9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.footer-nav a {
  color: var(--paper); text-decoration: none; font-size: 0.9rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 11px 0; display: inline-block;
}
.footer-nav a:hover { color: var(--rust-soft); }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.footer-legal p { margin: 0; color: var(--muted); font-size: 0.8rem; max-width: 80ch; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding-top: 58px; padding-bottom: 58px; }
  .join-grid, .rules-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero::after {
    background:
      linear-gradient(90deg, rgba(10,12,10,.92) 0%, rgba(10,12,10,.72) 100%),
      linear-gradient(0deg, var(--ink) 3%, rgba(10,12,10,0) 55%);
  }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line); padding: 8px 20px 18px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav a.btn { margin-top: 12px; text-align: center; border-bottom: 1px solid var(--rust); }
  .header-inner { position: relative; }
  .section { padding: 56px 0; }
  .status-card { padding: 18px; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
  .btn { width: 100%; text-align: center; }
  .btn-sm, .copy-btn { width: auto; }
  .hero-actions .btn { width: 100%; }
}

@media (max-width: 420px) {
  .connect-row { flex-direction: column; align-items: stretch; }
  .copy-btn { width: 100%; }
}

/* ---------- Sub-pages (shop, leaderboard) ---------- */

.page { padding: 56px 0 76px; }
.page-title { font-size: clamp(2.6rem, 8vw, 4.2rem); line-height: 0.9; font-weight: 700; margin: 0 0 16px; }
.page-lede { font-size: 1.1rem; color: #c6c4b7; max-width: 62ch; margin: 0 0 32px; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--rust); }

.stat-row {
  list-style: none; margin: 0 0 28px; padding: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat-row li { background: var(--ink-2); border: 1px solid var(--line); padding: 16px 18px; }
.stat-row b {
  display: block; font-family: var(--display); font-size: 2rem; font-weight: 700;
  line-height: 1; color: var(--paper);
}
.stat-row span {
  display: block; margin-top: 6px; font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}

.lb-state {
  background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--rust);
  padding: 18px 20px; color: #c6c4b7; margin: 0 0 28px;
}
.lb-state .btn { margin-top: 14px; }

.table-scroll { overflow-x: auto; margin: 0 0 34px; -webkit-overflow-scrolling: touch; }
.lb-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.lb-table th, .lb-table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.lb-table thead th {
  font-family: var(--display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line);
}
.lb-table td { font-size: 0.98rem; }
.lb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-table .strong { font-weight: 700; color: var(--paper); }
.lb-table .col-rank { width: 54px; color: var(--muted); font-family: var(--display); font-size: 1.05rem; }
.lb-table tbody tr:nth-child(1) .col-rank { color: var(--rust); font-weight: 700; }
.lb-table tbody tr:hover { background: rgba(234, 231, 220, 0.03); }

.lb-feed { margin: 0 0 28px; }
.lb-feed h2 { font-size: 1.5rem; margin: 0 0 14px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline;
}
.feed b { color: var(--paper); }
.feed-meta { color: var(--rust-soft); font-size: 0.88rem; }
.feed-time { color: var(--muted); font-size: 0.8rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.lb-updated { color: var(--muted); font-size: 0.82rem; margin: 0 0 34px; }
.lb-note { max-width: 78ch; }
.lb-note h2 { font-size: 1.3rem; }

/* Shop */
.shop-notice {
  background: var(--ink-3); border: 1px solid #6a3323; border-left: 3px solid var(--rust);
  padding: 16px 18px; margin: 0 0 24px; color: var(--paper);
}
.shop-cat { margin: 0 0 40px; }
.shop-cat h2 { font-size: 1.7rem; margin: 0 0 6px; }
.shop-blurb { color: var(--muted); margin: 0 0 18px; }
.shop-item { display: flex; flex-direction: column; }
.shop-item h3 { margin-bottom: 6px; }
.shop-price {
  font-family: var(--display); font-size: 1.6rem; font-weight: 700;
  color: var(--rust-soft); margin: 0 0 10px !important;
}
.shop-item .btn { margin-top: auto; align-self: flex-start; }
.shop-soldout {
  margin-top: auto; font-family: var(--display); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.shop-foot { max-width: 78ch; }
.shop-foot h2 { font-size: 1.3rem; }
.plain-list { margin: 0; padding: 0 0 0 20px; color: #c6c4b7; }
.plain-list li { margin: 0 0 10px; }
.plain-list li:last-child { margin-bottom: 0; }

@media (max-width: 760px) {
  .page { padding: 40px 0 56px; }
  .lb-table th, .lb-table td { padding: 11px 12px; }
  .feed-time { margin-left: 0; width: 100%; }
  .shop-item .btn { width: 100%; text-align: center; }
}
