/* Techamora — retro terminal styles */

@font-face {
  font-family: "VT323";
  src: url("../fonts/vt323.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --black: #000000;
  --deep: #03110a;         /* the dark green of an old phosphor tube */
  --deep-2: #072011;
  --phosphor: #3dff7a;     /* lit pixels, actions */
  --phosphor-dim: #22b552;
  --text: #c6f3d0;
  --muted: #74b386;
  --line: #1b4a2a;

  --font-display: "VT323", "Courier New", monospace;
  --font-body: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --glow: 0 0 6px rgba(61, 255, 122, .55), 0 0 18px rgba(61, 255, 122, .25);
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
}
::selection { background: var(--phosphor); color: var(--black); }

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--phosphor); color: var(--black); padding: .5rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
  background: linear-gradient(var(--black) 30%, transparent);
}
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display); font-size: 1.75rem; line-height: 1;
  color: var(--phosphor); text-shadow: var(--glow);
  text-decoration: none;
}
.brand-mark { width: 1rem; height: 1rem; fill: var(--phosphor); filter: drop-shadow(0 0 3px rgba(61,255,122,.7)); }
.site-header ul { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.site-header nav a {
  text-decoration: none; font-size: .9375rem; color: var(--muted);
  padding: .15rem .35rem;
}
.site-header nav a:hover { background: var(--phosphor); color: var(--black); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-bottom: clamp(3rem, 7vw, 6rem); border-bottom: 1px solid var(--line); }

.wall {
  position: relative; overflow: hidden;
  height: clamp(300px, 52vh, 560px);
  height: clamp(300px, 52svh, 560px); /* stable while the phone's address bar moves */
  background: var(--black);
}
/* the LED screen: a tiny canvas (one pixel per LED) scaled up on the GPU */
#led-wall, .wall-grid, .wall-glow {
  position: absolute; left: 50%; top: 50%;
  width: var(--screen-w, 100%); height: var(--screen-h, 100%);
  transform: translate(-50%, -50%);
}
#led-wall {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: pan-y;
  cursor: crosshair;
}
/* black gaps between the LEDs, drawn once by CSS */
.wall-grid {
  pointer-events: none;
  background:
    repeating-linear-gradient(to right, var(--black) 0 var(--gap, 3px), transparent var(--gap, 3px) var(--pitch, 12px)),
    repeating-linear-gradient(to bottom, var(--black) 0 var(--gap, 3px), transparent var(--gap, 3px) var(--pitch, 12px));
}
/* soft glow behind the decoded word, static once shown */
.wall-glow {
  pointer-events: none;
  filter: blur(6px);
  opacity: 0;
  transition: opacity .8s ease;
}
.wall.is-decoded .wall-glow { opacity: .45; }
/* scanlines over the wall */
.wall::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.28) 0 1px, transparent 1px 3px);
}
.wall-hint {
  position: absolute; right: var(--gutter); bottom: .75rem; z-index: 1;
  font-size: .8125rem; color: var(--muted); background: var(--black); padding: .1rem .4rem;
  pointer-events: none; transition: opacity .6s ease;
}
.wall-hint.is-hidden { opacity: 0; }

.hero-copy {
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  margin-top: clamp(1.5rem, 4vw, 3rem);
  display: grid; gap: 2rem 4rem;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.5rem, 4.4vw, 4rem);
  line-height: .98;
  color: var(--phosphor); text-shadow: var(--glow);
  max-width: 22ch;
  text-wrap: balance;
}
.cursor {
  display: inline-block; width: .5em; height: .8em; margin-left: .12em;
  background: var(--phosphor); box-shadow: var(--glow);
  vertical-align: -.04em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.hero-side p { color: var(--text); max-width: 46ch; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: .55rem 1.2rem;
  font-family: var(--font-body); font-weight: 600; font-size: .9375rem;
  text-decoration: none;
  border: 2px solid var(--phosphor);
}
.btn-signal { background: var(--phosphor); color: var(--black); box-shadow: 0 0 16px rgba(61,255,122,.35); }
.btn-signal:hover { background: var(--black); color: var(--phosphor); }
.btn-ghost { color: var(--phosphor); }
.btn-ghost:hover { background: var(--phosphor); color: var(--black); }

/* ---------- Services: green room meets black box ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.half { padding-block: clamp(3.5rem, 8vw, 7rem); }
.half-inner { max-width: calc(var(--max) / 2); padding-inline: var(--gutter); }
.half-stage { background: var(--deep-2); }
.half-stage .half-inner { margin-left: auto; }
.half-paper { background: var(--black); border-left: 1px solid var(--line); }

.services h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: var(--phosphor); text-shadow: var(--glow); }
.lede { margin-top: .6rem; color: var(--muted); }

.offer { margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.9rem; }
.offer h3 {
  display: flex; align-items: center; gap: .75rem;
  font-size: 1.0625rem; font-weight: 600; line-height: 1.4; color: var(--text);
}
.offer p { margin-top: .35rem; padding-left: 1.5rem; max-width: 48ch; color: var(--muted); }

/* a lit pixel for art work, an empty solder pad for tech work */
.led {
  flex: none; width: .75rem; height: .75rem;
  background: var(--phosphor);
  box-shadow: 0 0 6px rgba(61,255,122,.9), 0 0 16px rgba(61,255,122,.45);
}
.pad {
  flex: none; width: .75rem; height: .75rem;
  border: 2px solid var(--phosphor-dim);
  background: linear-gradient(var(--phosphor-dim), var(--phosphor-dim)) center / 2px 2px no-repeat;
}

/* ---------- Why ---------- */
.why { background: var(--deep); padding-block: clamp(3.5rem, 8vw, 6.5rem); border-bottom: 1px solid var(--line); }
.why-grid { display: grid; gap: 1.5rem 4rem; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
.why h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.4rem, 4.4vw, 3.8rem); line-height: 1; color: var(--phosphor); text-shadow: var(--glow); max-width: 16ch; text-wrap: balance; }
.why p { color: var(--text); max-width: 50ch; padding-top: .35rem; }

/* ---------- Process ---------- */
.process { padding-block: clamp(3.5rem, 8vw, 7rem); }
.process h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: var(--phosphor); text-shadow: var(--glow); }
.steps { margin-top: clamp(2rem, 4vw, 3.5rem); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { position: relative; padding-top: 3.75rem; }
/* dashed line joining the steps, like a cable run between nodes */
.steps li::before {
  content: ""; position: absolute; top: 1.15rem; left: 2.9rem; right: -1.7rem; height: 0;
  border-top: 2px dashed var(--line);
}
.steps li:last-child::before { display: none; }
.step-n {
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border: 2px solid var(--phosphor); color: var(--phosphor);
  font-family: var(--font-display); font-size: 1.75rem; line-height: 1;
  text-shadow: var(--glow);
}
.steps h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.steps p { margin-top: .35rem; color: var(--muted); max-width: 32ch; }

/* ---------- Contact ---------- */
.contact { background: var(--deep-2); padding-block: clamp(4rem, 10vw, 8rem); }
.contact h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 5.4vw, 4.75rem); line-height: .98; color: var(--phosphor); text-shadow: var(--glow); max-width: 18ch; text-wrap: balance; }
.contact-lede { margin-top: 1rem; color: var(--text); max-width: 54ch; }
.mail {
  display: inline-block; margin-top: 2rem; padding: .2rem .6rem;
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.1;
  color: var(--black); background: var(--phosphor);
  box-shadow: 0 0 24px rgba(61,255,122,.35);
  text-decoration: none; overflow-wrap: anywhere;
}
.mail:hover { background: var(--black); color: var(--phosphor); box-shadow: inset 0 0 0 2px var(--phosphor); }
.contact-meta { margin-top: 1.5rem; color: var(--muted); font-size: .9375rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--muted); border-top: 1px solid var(--line); padding-block: 1.4rem; font-size: .875rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-row ul { display: flex; gap: 1.5rem; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--phosphor); text-decoration: underline; }

/* ---------- Legal pages ---------- */
.legal-header { position: static; border-bottom: 1px solid var(--line); }
.legal { padding-block: clamp(3rem, 7vw, 5rem); }
.legal .container { max-width: 50rem; }
.legal h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; color: var(--phosphor); text-shadow: var(--glow); margin-bottom: 2rem; }
.legal h2 { font-size: 1.0625rem; font-weight: 600; color: var(--phosphor); margin: 2.25rem 0 .5rem; }
.legal p + p { margin-top: .75rem; }
.legal ul { list-style: square; padding-left: 1.25rem; margin-top: .5rem; }
.legal a { color: var(--phosphor); }
.legal .note { border: 2px dashed #e8d65a; color: #f0e38a; padding: .9rem 1.1rem; margin-bottom: 2rem; font-size: .9375rem; }
.legal .stand { margin-top: 2.5rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.75rem; }
  .steps li:nth-child(2)::before { display: none; }
}
@media (max-width: 820px) {
  .hero-copy, .why-grid, .services { grid-template-columns: 1fr; }
  .half-inner { max-width: none; }
  .half-stage .half-inner { margin-left: 0; }
  .half-paper { border-left: 0; }
}
@media (max-width: 560px) {
  body { font-size: .9375rem; }
  .site-header ul { gap: .6rem; }
  .site-header nav a { font-size: .875rem; padding-inline: .2rem; }
  .brand span { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps li::before { display: none; }
  .offer p { padding-left: 0; }
  .wall-hint { left: var(--gutter); right: auto; }
  .wall { height: clamp(260px, 46vh, 400px); height: clamp(260px, 46svh, 400px); }
}
