/* bitsharq — "deep water" theme
   Signature: every numeric value is monospace, tabular, aligned.
   Bold spent in one place: cold deep-water palette + a single coral "bite". */

:root {
  --ink-900: #07131b;   /* deep water — page */
  --ink-850: #0a1a24;
  --ink-800: #0d2230;   /* surface / cards */
  --ink-700: #11303f;   /* raised */
  --line:    #1a3a48;   /* hairlines */
  --fog:     #7d9aa6;   /* muted text */
  --fog-dim: #50707c;
  --foam:    #e9f2f4;   /* primary text */
  --coral:   #ff6a45;   /* signature accent — the bite */
  --coral-dim:#c8492c;
  --up:      #35d39a;   /* functional: price up */
  --down:    #f2706e;   /* functional: price down */

  --display: 'Archivo', system-ui, sans-serif;
  --body:    'Hanken Grotesk', system-ui, sans-serif;
  --data:    'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1080px;
  --r: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink-900);
  color: var(--foam);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* faint depth gradient — like light fading into deep water */
  background-image: radial-gradient(120% 60% at 50% -10%, #0f2a3a 0%, var(--ink-900) 55%);
  background-attachment: fixed;
}

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

a { color: inherit; text-decoration: none; }

/* ---------- numeric data treatment (the signature) ---------- */
.num {
  font-family: var(--data);
  font-feature-settings: "tnum" 1, "zero" 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.up   { color: var(--up); }
.down { color: var(--down); }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: rgba(7,19,27,0.82);
  backdrop-filter: blur(10px);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 9px; }
.brand .fin {
  /* shark-fin / depth mark in coral */
  width: 14px; height: 14px; background: var(--coral);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
  transform: skewX(-12deg);
}
nav.main { display: flex; gap: 22px; font-size: 14px; }
nav.main a { color: var(--fog); transition: color .15s; }
nav.main a:hover { color: var(--foam); }
nav.main a.cta { color: var(--coral); }

/* ---------- hero ---------- */
.hero { padding: 46px 0 30px; }
.hero .eyebrow {
  font-family: var(--data); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(30px, 5vw, 50px);
  letter-spacing: -0.03em; line-height: 1.02; max-width: 16ch;
}
.hero p.sub { color: var(--fog); margin-top: 14px; max-width: 56ch; font-size: 16px; }

/* lead price block — BTC reading like a sonar depth gauge */
.lead {
  margin-top: 30px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px;
}
@media (max-width: 760px){ .lead { grid-template-columns: 1fr; } }
.lead .card {
  background: var(--ink-800); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
}
.lead .gauge { border-left: 3px solid var(--coral); }
.lead .label { font-size: 12px; color: var(--fog); letter-spacing: .08em; text-transform: uppercase; }
.lead .big { font-family: var(--data); font-weight: 700; font-size: clamp(34px, 6vw, 52px); margin-top: 6px; letter-spacing: -0.02em; }
.lead .row2 { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.lead .stat .k { font-size: 11px; color: var(--fog); text-transform: uppercase; letter-spacing: .07em; }
.lead .stat .v { font-family: var(--data); font-size: 16px; margin-top: 2px; }

/* ---------- ad slot ---------- */
.ad {
  margin: 26px auto; border: 1px dashed var(--line); border-radius: var(--r);
  background: repeating-linear-gradient(135deg, transparent, transparent 9px, rgba(26,58,72,.18) 9px, rgba(26,58,72,.18) 10px);
  display: flex; align-items: center; justify-content: center;
  color: var(--fog-dim); font-family: var(--data); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; min-height: 96px; text-align:center; padding: 10px;
}
.ad.leaderboard { min-height: 100px; }
.ad.rect { min-height: 260px; }

/* ---------- section heads ---------- */
.shead { display: flex; align-items: baseline; justify-content: space-between; margin: 40px 0 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.shead h2 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.shead .meta { font-family: var(--data); font-size: 12px; color: var(--fog); }

/* ---------- price table ---------- */
.tablecard { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.prices { width: 100%; border-collapse: collapse; min-width: 0; }
table.prices th {
  text-align: right; font-family: var(--data); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--fog);
  padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.prices th.l, table.prices td.l { text-align: left; }
table.prices td { padding: 13px 16px; border-bottom: 1px solid rgba(26,58,72,.5); text-align: right; white-space: nowrap; font-size: 15px; }
table.prices tr:last-child td { border-bottom: none; }
table.prices tbody tr { transition: background .12s; }
table.prices tbody tr:hover { background: var(--ink-700); }
.coincell { display: flex; align-items: center; gap: 11px; }
.coincell img { width: 24px; height: 24px; border-radius: 50%; }
.coincell .nm { font-weight: 600; }
.coincell .sy { color: var(--fog); font-family: var(--data); font-size: 12px; text-transform: uppercase; }
.rank { font-family: var(--data); color: var(--fog-dim); font-size: 12px; width: 22px; display:inline-block; }

/* ---------- utility grid ---------- */
.ugrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px){ .ugrid { grid-template-columns: 1fr; } }
.ucard { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.ucard h3 { font-family: var(--display); font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.ucard p.d { color: var(--fog); font-size: 14px; margin-bottom: 16px; }
.conv { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.conv input, .conv select {
  background: var(--ink-900); border: 1px solid var(--line); color: var(--foam);
  border-radius: 8px; padding: 10px 12px; font-family: var(--data); font-size: 15px;
}
.conv input { width: 130px; }
.conv .eq { color: var(--coral); font-family: var(--data); }
.conv .out { font-family: var(--data); font-size: 18px; }
.count { font-family: var(--data); font-size: clamp(24px,5vw,34px); color: var(--coral); letter-spacing: -0.01em; }
.count small { color: var(--fog); font-size: 13px; }

/* ---------- coin page ---------- */
.cphead { display: flex; align-items: center; gap: 16px; padding: 34px 0 8px; }
.cphead img { width: 52px; height: 52px; border-radius: 50%; }
.cphead h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px,5vw,38px); letter-spacing: -0.02em; }
.cphead .sy { color: var(--fog); font-family: var(--data); text-transform: uppercase; }
.cpprice { font-family: var(--data); font-size: clamp(30px,6vw,46px); font-weight: 700; margin: 6px 0 4px; }
.statgrid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 22px 0; }
@media (max-width: 680px){ .statgrid { grid-template-columns: repeat(2,1fr); } }
.statgrid .s { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.statgrid .s .k { font-size: 11px; color: var(--fog); text-transform: uppercase; letter-spacing: .06em; }
.statgrid .s .v { font-family: var(--data); font-size: 17px; margin-top: 5px; }
.prose { max-width: 64ch; color: #cfe0e4; }
.prose h2 { font-family: var(--display); font-size: 22px; margin: 28px 0 10px; letter-spacing: -0.02em; }
.prose p { margin-bottom: 14px; }
.prose .faqq { font-weight: 700; color: var(--foam); margin-top: 16px; }
.note { font-size: 13px; color: var(--fog); border-left: 2px solid var(--coral); padding-left: 12px; margin: 22px 0; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); margin-top: 56px; padding: 30px 0 50px; color: var(--fog); }
footer.site .cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: var(--fog); }
footer.site a:hover { color: var(--foam); }
footer.site .fnav { display: flex; gap: 18px; font-size: 14px; flex-wrap: wrap; }
footer.site .disc { font-size: 12px; color: var(--fog-dim); margin-top: 18px; max-width: 70ch; }
.crumbs { font-family: var(--data); font-size: 12px; color: var(--fog); padding-top: 18px; }
.crumbs a:hover { color: var(--coral); }

/* mobile: drop the least-critical columns so the table fits without a cut.
   coin / price / 24h stay; 7d / market cap / volume hide (still in full table on desktop). */
@media (max-width: 620px){
  .wrap { padding: 0 14px; }
  table.prices th, table.prices td { padding: 12px 10px; font-size: 14px; }
  table.prices .c-7d, table.prices .c-mcap, table.prices .c-vol { display: none; }
  .coincell { gap: 8px; }
  .coincell .sy { display: none; }
  .rank { width: 16px; }
}
@media (max-width: 380px){
  .coincell .nm { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- language switcher ---------- */
.langs { display: flex; gap: 2px; align-items: center; margin-left: 16px; }
.langs a {
  font-family: var(--data); font-size: 12px; color: var(--fog-dim);
  padding: 4px 7px; border-radius: 6px; line-height: 1;
}
.langs a:hover { color: var(--foam); }
.langs a.on { color: var(--ink-900); background: var(--coral); }
@media (max-width: 560px){
  nav.main { gap: 14px; }
  nav.main a:not(.cta):not(.langs *) { display: none; } /* keep header tidy on phones */
  nav.main .cta { display: inline; }
}

/* ---------- legal pages ---------- */
.legal { max-width: 70ch; padding-top: 30px; }
.legal h1 { font-family: var(--display); font-weight: 800; font-size: clamp(26px,5vw,36px); letter-spacing: -0.02em; margin-bottom: 6px; }
.legal .upd { font-family: var(--data); font-size: 12px; color: var(--fog); margin-bottom: 24px; }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 26px 0 8px; }
.legal p, .legal li { color: #cfe0e4; margin-bottom: 12px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }

/* ---------- cookie consent ---------- */
.cookie {
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 50;
  max-width: 720px; margin: 0 auto;
  background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.cookie p { font-size: 13.5px; color: var(--foam); flex: 1; min-width: 220px; margin: 0; }
.cookie a { color: var(--coral); }
.cookie .btns { display: flex; gap: 8px; }
.cookie button {
  font-family: var(--body); font-size: 13px; font-weight: 600; cursor: pointer;
  border-radius: 7px; padding: 8px 14px; border: 1px solid var(--line); background: transparent; color: var(--foam);
}
.cookie button.accept { background: var(--coral); border-color: var(--coral); color: var(--ink-900); }
.cookie button:hover { filter: brightness(1.08); }

@media (prefers-reduced-motion: no-preference){
  .fade { animation: up .5s ease both; }
  @keyframes up { from { opacity:0; transform: translateY(8px);} to {opacity:1; transform:none;} }
}
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
