/* =========================================================
   BREWLINE -- circuitry + coffee Neocities template
   Edit the CSS custom properties below to re-theme fast.
   ========================================================= */

:root {
  --bg:          #150d09;
  --bg-panel:    #1e140d;
  --bg-panel-2:  #251811;
  --copper:      #c17a3d;
  --copper-lite: #e3a463;
  --copper-dim:  #7a4f2c;
  --cream:       #f3e6d3;
  --cream-dim:   #cbb89f;
  --coffee:      #2b160b;
  --crema:       #d9a066;
  --teal:        #5eead4;
  --teal-dim:    #2e6f66;
  --radius:      10px;
  --font-mono:   'Space Mono', 'Courier New', monospace;
  --font-body:   'Work Sans', 'Segoe UI', sans-serif;
}

/* -------------------- reset -------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

/* Custom circuit-arrow cursor. The two numbers are the hotspot (the tip
   of the arrow); the glow around it is baked into the PNG itself, since
   custom cursors can't take CSS box-shadow. */
body {
  cursor: url("../assets/cursor-tech.png") 3 3, auto;
  background:
    radial-gradient(ellipse at top left, rgba(193,122,61,0.10), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(94,234,212,0.06), transparent 60%),
    url("../assets/circuit-pattern.svg") repeat,
    var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Horrible Movies page swaps the circuit pattern for a pixel-art film-reel
   one -- same gradient/solid treatment otherwise, just a different tile. */
body.movies-page {
  background:
    radial-gradient(ellipse at top left, rgba(193,122,61,0.10), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(94,234,212,0.06), transparent 60%),
    url("../assets/film-pattern.svg") repeat,
    var(--bg);
}

a { color: var(--copper-lite); text-decoration: none; cursor: inherit; }
a:hover { color: var(--teal); text-decoration: underline; }
img { max-width: 100%; display: block; }

h1, h2, h3, .brand, nav a, .led-status {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* faint CRT-style scanlines over everything, purely decorative */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.06) 0px,
    rgba(0,0,0,0.06) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.35;
}

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

/* -------------------- header -------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--copper-dim);
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 500;
  background:
    radial-gradient(ellipse at top left, rgba(193,122,61,0.14), transparent 65%),
    linear-gradient(rgba(21,13,9,0.45), rgba(21,13,9,0.45)),
    url("../assets/coffee-beans.svg") repeat,
    var(--bg-panel);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  color: var(--cream);
}

.brand .mug { font-size: 1.4rem; }

.brand .brew-icon {
  width: 1.3em;
  height: 1.3em;
  vertical-align: middle;
  margin-left: 4px;
  overflow: visible;
}
.brew-icon .steam {
  stroke: var(--teal);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  opacity: 0.7;
  animation: brew-rise 2.2s ease-in-out infinite;
}
.brew-icon .steam.s2 { animation-delay: 0.5s; }
.brew-icon .mugbody { fill: var(--cream); stroke: var(--copper-dim); stroke-width: 1.5; }
.brew-icon .coffee { fill: var(--coffee); }
.brew-icon .handle { fill: none; stroke: var(--copper); stroke-width: 1.6; }

nav { display: flex; gap: 16px; flex-wrap: wrap; }
nav a {
  color: var(--cream-dim);
  font-size: 0.92rem;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
}
nav a:hover { color: var(--copper-lite); text-decoration: none; }
nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0%; height: 1px;
  background: var(--teal);
  transition: width 0.25s ease;
}
nav a:hover::after { width: 100%; }

.header-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 10px;
}

.lcd-clock {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--teal);
  background: #06110c;
  border: 1px solid var(--teal-dim);
  border-radius: 4px;
  padding: 3px 6px;
  text-shadow: 0 0 5px rgba(94, 234, 212, 0.65);
}

.led-status {
  font-size: 0.72rem;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.led-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 6px 1px var(--teal);
  animation: pulse 1.6s ease-in-out infinite;
}

/* -------------------- hero -------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
  padding: 64px 0 40px;
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; margin: 0 auto; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 10px;
  color: var(--cream);
}
.hero h1 span { color: var(--copper-lite); }

.hero p.tagline {
  color: var(--cream-dim);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 0 24px;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 1px solid var(--copper);
  transition: all 0.2s ease;
}
.btn.primary {
  background: var(--copper);
  color: #1a1109;
}
.btn.primary:hover {
  background: var(--copper-lite);
  text-decoration: none;
  box-shadow: 0 0 16px rgba(193,122,61,0.55);
}
.btn.ghost { color: var(--cream); }
.btn.ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
  text-decoration: none;
  box-shadow: 0 0 16px rgba(94,234,212,0.3);
}

.hero-art { width: 100%; max-width: 320px; justify-self: center; }
.hero-art .trace {
  fill: none;
  stroke: var(--copper);
  stroke-width: 2;
  stroke-dasharray: 6 5;
  animation: dash 3.5s linear infinite;
  opacity: 0.8;
}
.hero-art .pad { fill: var(--copper-lite); }
.hero-art .led { fill: var(--teal); filter: drop-shadow(0 0 4px var(--teal)); animation: pulse 1.8s ease-in-out infinite; }
.hero-art .steam {
  stroke: var(--cream-dim);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  opacity: 0.7;
  animation: rise 3s ease-in-out infinite;
}
.hero-art .steam.s2 { animation-delay: 0.6s; }
.hero-art .steam.s3 { animation-delay: 1.2s; }
.hero-art .mugbody { fill: var(--cream); stroke: var(--copper-dim); stroke-width: 2; }
.hero-art .coffee { fill: var(--coffee); }
.hero-art .crema { fill: none; stroke: var(--crema); stroke-width: 2; }
.hero-art .handle { fill: none; stroke: var(--copper-dim); stroke-width: 6; }
.hero-art .chip { fill: #1a120c; stroke: var(--teal); stroke-width: 1.5; }
.hero-art .chip-leg { stroke: var(--teal); stroke-width: 1.5; }

/* -------------------- panels / about -------------------- */
.panel {
  background: linear-gradient(160deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--copper-dim);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0;
  position: relative;
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 5px rgba(193,122,61,0.7);
}
.panel::before { top: -5px; left: -5px; }
.panel::after  { bottom: -5px; right: -5px; }

.panel h2 {
  color: var(--copper-lite);
  font-size: 1.3rem;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel h2::before {
  content: "//";
  color: var(--teal-dim);
}
.panel p { color: var(--cream-dim); }

/* -------------------- card grid -------------------- */
.section-title {
  font-family: var(--font-mono);
  color: var(--copper-lite);
  font-size: 1.3rem;
  margin: 44px 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before { content: "//"; color: var(--teal-dim); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--copper-dim);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--teal-dim);
  box-shadow: 0 10px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(94,234,212,0.15);
}
.card .card-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
  text-transform: uppercase;
}
.card h3 { margin: 8px 0; color: var(--cream); font-size: 1.05rem; }
.card p { color: var(--cream-dim); font-size: 0.92rem; margin: 0 0 10px; }
.card a.read-more { font-family: var(--font-mono); font-size: 0.8rem; }

/* -------------------- neocities badge row -------------------- */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0 4px;
}
.badge-88x31 {
  width: 88px; height: 31px;
  background: var(--bg-panel-2);
  border: 1px solid var(--copper-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--cream-dim);
  text-align: center;
  line-height: 1.1;
}

/* -------------------- widgets strip --------------------
   A full-bleed band that breaks out of .wrap's max-width, for classic
   sidebar-style widgets (visitor counter, etc). More widgets can be added
   inside .widgets-strip-inner later. No background/border of its own --
   just a full-width layout slot. */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.widgets-strip {
  padding: 40px 24px;
}
.widgets-strip-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

/* classic LED-digit hit counter, with a looping coffee-pour GIF to its
   left instead of a border/frame around it. */
.hit-counter {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hit-counter-gif {
  width: 48px;
  height: 60px;
  flex: none;
}
.hit-counter-label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--teal-dim);
  font-size: 1rem;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.hit-counter-digits {
  display: inline-flex;
  gap: 3px;
}
.hit-counter-digits .digit {
  background: #06110c;
  border: 1px solid var(--teal-dim);
  color: var(--teal);
  text-shadow: 0 0 6px rgba(94, 234, 212, 0.7);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.4rem;
  width: 1.15em;
  text-align: center;
  border-radius: 3px;
  padding: 6px 0;
}
.hit-counter-sub {
  display: block;
  margin-top: 12px;
  font-size: 0.68rem;
  color: var(--cream-dim);
  opacity: 0.7;
}

/* -------------------- horrible movies page -------------------- */
.movies-hero {
  text-align: center;
  padding: 48px 0 32px;
}
.distressed-title {
  font-family: 'Rubik Distressed', var(--font-mono);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  color: var(--copper-lite);
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  text-shadow:
    2px 2px 0 rgba(0,0,0,0.5),
    0 0 18px rgba(193,122,61,0.45),
    0 0 40px rgba(94,234,212,0.15);
  transform: rotate(-1.5deg);
}
.movies-hero .tagline { color: var(--cream-dim); }

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0 60px;
}
.movie-card {
  background: var(--bg-panel);
  border: 1px solid var(--copper-dim);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--teal-dim);
  box-shadow: 0 10px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(94,234,212,0.15);
}
.movie-poster {
  width: 96px;
  height: 128px;
  margin: 0 auto 14px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 1px solid var(--copper-dim);
  border-radius: 3px;
}
.movie-card h3 {
  margin: 0 0 8px;
  color: var(--cream);
  font-size: 1rem;
}
.movie-year {
  font-family: var(--font-mono);
  color: var(--teal-dim);
  font-size: 0.78rem;
  font-weight: normal;
}
.movie-card p {
  color: var(--cream-dim);
  font-size: 0.86rem;
  margin: 0;
}

/* -------------------- footer -------------------- */
footer {
  border-top: 1px solid var(--copper-dim);
  padding: 26px 24px 60px;
  text-align: center;
  color: var(--cream-dim);
  font-size: 0.85rem;
}
footer .prompt {
  font-family: var(--font-mono);
  color: var(--teal);
  display: block;
  margin-bottom: 8px;
}

/* -------------------- keyframes -------------------- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes dash { to { stroke-dashoffset: -100; } }
@keyframes rise {
  0%   { transform: translateY(0);    opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: translateY(-14px); opacity: 0; }
}
@keyframes brew-rise {
  0%   { transform: translateY(0);   opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: translateY(-4px); opacity: 0; }
}

/* -------------------- Tron-style mouse trail --------------------
   Elements below are created at runtime by js/tron-trail.js as the visitor
   moves the mouse: a glowing line segment connects each point to the last,
   then fades out and removes itself. */
.tron-trail-segment {
  position: fixed;
  left: 0; top: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(94,234,212,0), var(--teal) 15%, #eafffb 50%, var(--teal) 85%, rgba(94,234,212,0));
  box-shadow: 0 0 6px 1px var(--teal), 0 0 14px 3px rgba(94,234,212,0.55);
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 1000;
  animation: tron-fade 550ms ease-out forwards;
}
@keyframes tron-fade {
  0%   { opacity: 0.95; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art .trace, .hero-art .led, .hero-art .steam,
  .brew-icon .steam,
  .led-status .dot { animation: none !important; }
}
