/* Claret TTT — site styles.
 *
 * GoldSrc, then thirty years of restraint.
 *
 * The palette is not "inspired by" the game's UI, it IS the game's UI: every hex below is lifted
 * from Theme.Colors in lua/scrapworks/core/cl_theme.lua. If the in-game panels are ever retuned,
 * these should be retuned with them — the point is that the site and the F3 menu look like the
 * same object.
 *
 * WHAT IS GOLDSRC HERE: the olive/khaki panel ground, the two-tone bevel (light top-left, dark
 * bottom-right), the amber accent, and the phosphor terminal blocks.
 * WHAT IS MODERN: space. GoldSrc UI packed every pixel; this does the opposite — one accent
 * colour, generous line height, wide gutters, and bevels used on a handful of surfaces rather
 * than on everything. The chrome is the same, there is just far less of it.
 */

:root {
  --panel:        #505746;
  --recessed:     #3C4233;
  --titlebar:     #363B2D;
  --slot:         #33382A;
  --ground:       #23271D;
  --bevel-light:  #8B9278;
  --bevel-dark:   #2E3226;
  --text:         #EDE9D8;
  --text-2:       #A8A896;
  --text-dim:     #82806E;
  --amber:        #E0A33D;
  --green:        #9BC46A;
  --blue:         #7FB0D8;
  --red:          #C1594A;
  --beige:        #C9B491;
  --term-bg:      #0E0C08;
  --term-fg:      #FFA82E;
  --term-dim:     #8A5A18;

  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --mono: "Lucida Console", "DejaVu Sans Mono", Consolas, monospace;

  --gutter: 28px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  /* The faintest diagonal weave, at an alpha you notice only if you look for it. GoldSrc filled
     its backgrounds with a tiling texture; this is the memory of that rather than the thing. */
  background-image: repeating-linear-gradient(45deg,
      rgba(255,255,255,0.012) 0 2px, transparent 2px 6px);
}

/* ---- The bevel. One rule, reused. ---------------------------------------------------------- */
.bevel {
  border-top: 2px solid var(--bevel-light);
  border-left: 2px solid var(--bevel-light);
  border-right: 2px solid var(--bevel-dark);
  border-bottom: 2px solid var(--bevel-dark);
}
.bevel-in {
  border-top: 2px solid var(--bevel-dark);
  border-left: 2px solid var(--bevel-dark);
  border-right: 2px solid var(--bevel-light);
  border-bottom: 2px solid var(--bevel-light);
}

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

/* ---- Testing banner ------------------------------------------------------------------------
 * Injected above the masthead by site.js when SITE.testing is on; see the note there for why it
 * is not written into the pages. The only red on the site, and the only element above the nav.
 * It is not dismissible on purpose — someone who closes it and comes back next week has no way
 * of knowing the warning still applies. */
.site-testing {
  background: var(--red);
  color: #1B0F0C;
  border-bottom: 2px solid var(--bevel-dark);
  padding: 9px 0;
}
.site-testing .wrap { display: flex; gap: 6px 16px; align-items: baseline; flex-wrap: wrap; }
.site-testing b {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700;
  white-space: nowrap;
}
.site-testing span { font-size: 13px; opacity: 0.88; }

/* ---- Header ------------------------------------------------------------------------------- */
.masthead { background: var(--titlebar); border-bottom: 2px solid var(--bevel-dark); }
.masthead .wrap { display: flex; align-items: center; gap: 22px; min-height: 66px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; margin-right: auto; }
.brand b { color: var(--text); font-size: 20px; letter-spacing: 0.02em; }
.brand span { color: var(--amber); font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em; }

nav.top { display: flex; gap: 4px; flex-wrap: wrap; }
nav.top a {
  color: var(--text-2); text-decoration: none; font-size: 13px;
  padding: 7px 13px; border-radius: 2px; letter-spacing: 0.04em;
}
nav.top a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
nav.top a[aria-current="page"] { color: var(--amber); background: rgba(224,163,61,0.10); }

/* ---- Hero --------------------------------------------------------------------------------- */
.hero { padding: 84px 0 64px; border-bottom: 1px solid var(--bevel-dark); }
.hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p.lede { font-size: clamp(17px, 2.2vw, 21px); color: var(--text-2); max-width: 62ch; margin: 0 0 30px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; background: var(--panel); color: var(--text); text-decoration: none;
  padding: 11px 22px; font-size: 14px; letter-spacing: 0.03em;
}
.btn:hover { background: #5A6250; }
.btn.primary { background: var(--amber); color: #241C08; font-weight: 700; }
.btn.primary:hover { background: #EDB45C; }

/* ---- Sections and panels ------------------------------------------------------------------ */
section { padding: 58px 0; }
section + section { border-top: 1px solid rgba(0,0,0,0.28); }

h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--amber);
     margin: 0 0 6px; font-weight: 700; }
h2 + .sub { color: var(--text-2); margin: 0 0 30px; max-width: 66ch; font-size: 17px; }
h3 { font-size: 19px; margin: 0 0 8px; }
p { max-width: 72ch; }
a { color: var(--amber); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }

.card { background: var(--panel); padding: 20px 22px; }
.card h3 { color: var(--text); }
.card p { color: var(--text-2); font-size: 15px; margin: 0; }
.card .big { font-size: 30px; color: var(--amber); line-height: 1.1; display: block; margin-bottom: 2px; }
.card .unit { font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-dim); }

/* ---- Terminal ----------------------------------------------------------------------------- */
.term {
  background: var(--term-bg); color: var(--term-fg); font-family: var(--mono);
  font-size: 14px; line-height: 1.75; padding: 18px 20px; position: relative; overflow-x: auto;
  border: 3px solid var(--amber);
}
.term::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
}
.term .dim { color: var(--term-dim); }
.term b { color: #FFD08A; font-weight: 400; }

/* ---- Tables ------------------------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-dim); font-weight: 700; padding: 10px 12px;
  border-bottom: 2px solid var(--bevel-dark); white-space: nowrap;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid rgba(0,0,0,0.22); color: var(--text-2); }
.tbl td:first-child { color: var(--text); }
.tbl tr:hover td { background: rgba(255,255,255,0.035); }
.scroll { overflow-x: auto; background: var(--recessed); padding: 4px 6px; }

/* ---- Swatches ----------------------------------------------------------------------------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.sw { padding: 0; }
.sw .chip { height: 62px; position: relative; }
.sw .chip.shiny::after {
  content: ""; position: absolute; left: 12%; top: 10%; width: 26%; height: 80%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.65), transparent);
  transform: skewX(-18deg);
}
.sw .meta { padding: 8px 10px 10px; background: var(--recessed); }
.sw .meta b { display: block; font-size: 13px; color: var(--text); font-weight: 700; }
.sw .meta span { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }

/* ---- Tier pills --------------------------------------------------------------------------- */
.pill { display: inline-block; padding: 2px 9px; font-size: 11px; letter-spacing: 0.1em;
        text-transform: uppercase; color: #1B1B14; font-weight: 700; }

/* ---- Placeholders ------------------------------------------------------------------------- */
/* Deliberately loud. A placeholder that looks like content is how a fake Discord invite ends up
   in front of players. Every one of these is filled from assets/config.js. */
.ph {
  display: inline-block; border: 1px dashed var(--amber); color: var(--amber);
  background: rgba(224,163,61,0.09); padding: 1px 8px; font-size: 12px;
  font-family: var(--mono); letter-spacing: 0.04em; border-radius: 2px;
}
.ph::before { content: "SET "; opacity: 0.65; }

/* ---- Callouts ----------------------------------------------------------------------------- */
.note { background: var(--recessed); border-left: 3px solid var(--amber); padding: 14px 18px; }
.note.warn { border-left-color: var(--red); }
.note p { margin: 0; color: var(--text-2); font-size: 15px; }
.note b { color: var(--text); }

ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,0.22); color: var(--text-2); font-size: 15px; }
ul.clean li b { color: var(--text); }
ul.clean li:last-child { border-bottom: 0; }

.kbd { font-family: var(--mono); background: var(--slot); border: 1px solid var(--bevel-dark);
       padding: 1px 7px; font-size: 13px; color: var(--text); }

/* ---- Footer ------------------------------------------------------------------------------- */
footer { background: var(--titlebar); border-top: 2px solid var(--bevel-dark); padding: 34px 0; margin-top: 40px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
footer p { color: var(--text-dim); font-size: 13px; margin: 0; }
footer nav a { color: var(--text-2); text-decoration: none; font-size: 13px; margin-left: 16px; }
footer nav a:hover { color: var(--amber); }

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .hero { padding: 54px 0 42px; }
  section { padding: 42px 0; }
}
