/* Tech in the AM — shared styles for every page.
   Layout: header with page nav, page hero, stacked sections split by hairlines, footer with links. */
:root {
  --bg: #eef1f1;
  --surface: #fbfcfc;
  --fg: #161c1e;
  --muted: #566266;
  --line: #cfd8d9;
  --accent: #25a36f;
  --accent-ink: #17774f;
  --accent-fg: #06201e;
  --tag: #e2eee7;
  --good: #1a7f4b;
  --ph-bg: #fff1bf;
  --ph-fg: #5a4300;
  --ph-line: #d9b44a;
  --font-display: "Chakra Petch", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101516;
    --surface: #171e20;
    --fg: #e8eeee;
    --muted: #93a2a5;
    --line: #2a3538;
    --accent-ink: #3cc488;
    --tag: #1c2b24;
    --good: #58c98b;
    --ph-bg: #3a3115;
    --ph-fg: #f3dc8a;
    --ph-line: #8a7230;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  padding-inline: 16px;
  padding-block: 0 40px;
}
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin-inline: auto; }
a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.05; }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Placeholder text Alec still needs to fill in */
.ph {
  background: var(--ph-bg);
  color: var(--ph-fg);
  outline: 1px dashed var(--ph-line);
  padding: 0 4px;
  border-radius: 2px;
  font-style: normal;
}

/* header */
.top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 18px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 22px; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
.brand span { color: var(--accent); }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.top nav a { color: var(--fg); text-decoration: none; font-weight: 600; font-size: 15px; padding-block: 4px; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--accent-ink); }
.top nav a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 56px 48px; }
.hero h1 { font-weight: 900; font-stretch: 80%; font-size: clamp(42px, 7.2vw, 84px); letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 20px; max-width: 54ch; color: var(--muted); font-size: 19px; }

/* inner page hero */
.page-hero { padding-block: 48px 40px; }
.page-hero .mono { color: var(--accent-ink); margin-bottom: 14px; }
.page-hero h1 { font-weight: 900; font-stretch: 80%; font-size: clamp(38px, 6vw, 68px); letter-spacing: -0.02em; max-width: 18ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 12px 20px; font-family: var(--font-display); font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid var(--accent); }
.btn.solid { background: var(--accent); color: var(--accent-fg); }
.btn.ghost { color: var(--accent-ink); background: transparent; }
.btn:hover { filter: brightness(1.08); }

.tagcard { background: var(--surface); border: 1px solid var(--line); padding: 20px; position: relative; }
.tagcard::before { content: ""; position: absolute; top: 14px; right: 16px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); }
.tagcard h2 { font-size: 15px; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tagcard dl { margin: 16px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-family: var(--font-mono); font-size: 14px; }
.tagcard dt { color: var(--muted); }
.tagcard dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.status { display: inline-block; padding: 2px 8px; background: var(--tag); color: var(--good); font-weight: 500; }
.tagcard .note { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12px; font-family: var(--font-mono); }

/* sections */
section { padding-block: 44px; border-top: 1px solid var(--line); }
.sec-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; margin-bottom: 28px; }
.sec-head h2 { font-weight: 800; font-stretch: 85%; font-size: clamp(30px, 4.6vw, 46px); letter-spacing: -0.015em; }
.sec-head p { color: var(--muted); max-width: 46ch; }
.fineprint { margin-top: 20px; color: var(--muted); font-size: 15px; max-width: 70ch; }

/* service cards */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.offer { background: var(--surface); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.offer h3 { font-size: 24px; font-weight: 800; font-stretch: 90%; }
.offer p { color: var(--muted); }
.offer a { margin-top: auto; padding-top: 8px; font-weight: 600; }

/* device lists */
.repairs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.rep { position: relative; border-top: 3px solid var(--accent); background: var(--surface); padding: 18px 18px 20px; min-width: 0; }
.rep h3 { font-size: 22px; font-weight: 800; font-stretch: 90%; margin-bottom: 10px; }
.rep ul { margin: 0; padding-left: 18px; color: var(--muted); }
.rep li { margin-block: 3px; }

/* numbered steps */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.steps li { counter-increment: s; border: 1px dashed var(--line); padding: 16px; min-width: 0; }
.steps li::before { content: "Step " counter(s); display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.steps strong { font-family: var(--font-display); font-size: 18px; display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }

/* two columns: text + list */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.split > p, .split > div > p { color: var(--muted); }
.dash-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.dash-list li { padding-left: 22px; position: relative; }
.dash-list li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 10px; height: 2px; background: var(--accent); }
.split h3 { font-size: 22px; font-weight: 800; font-stretch: 90%; margin-bottom: 12px; }

/* price table */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--font-mono); font-size: 15px; }
td .dev { display: block; color: var(--muted); font-size: 14px; }

/* tiers / packages */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tier { background: var(--surface); border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tier .mono { color: var(--muted); }
.tier h3 { font-size: 26px; font-weight: 800; font-stretch: 88%; }
.tier p { color: var(--muted); }
.tier ul { margin: 0; padding-left: 18px; color: var(--muted); }
.tier li { margin-block: 3px; }
.tier .from { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.tier .from b { font-family: var(--font-display); font-size: 22px; color: var(--fg); font-weight: 800; }
.tier.featured { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq > div { padding-block: 18px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px 32px; }
.faq dt { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.faq dd { margin: 0; color: var(--muted); }

/* contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cbox { background: var(--surface); border: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cbox .val { font-family: var(--font-mono); font-size: 16px; overflow-wrap: anywhere; }
.cbox .sub { color: var(--muted); font-size: 15px; }
.copy { align-self: flex-start; font: inherit; font-weight: 600; font-size: 14px; padding: 6px 12px; background: transparent; color: var(--accent-ink); border: 1px solid var(--accent); cursor: pointer; }
.copy:hover { background: var(--tag); }

/* closing call to action */
.cta-band { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-weight: 800; font-stretch: 85%; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.015em; max-width: 20ch; }
.cta-band .reach { font-family: var(--font-mono); font-size: 15px; color: var(--muted); margin-top: 10px; }
.cta-band .cta-row { margin-top: 0; }

/* footer */
footer { padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer nav a { color: var(--muted); }
footer nav a:hover { color: var(--accent-ink); }

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 32px; gap: 28px; }
  .page-hero { padding-block: 32px 28px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .faq > div { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .copy { transition: background 0.15s, filter 0.15s; }
}

/* Command-prompt reveal: only active when script.js turns it on (motion allowed, observer supported).
   Headings type out with a block cursor; everything else prints in line by line with a CRT flicker. */
.rv-on .rv { opacity: 0; }
.rv-on .in .rv { animation: term-print 0.36s steps(4, end) var(--d, 0s) both; }
@keyframes term-print {
  0%   { opacity: 0; }
  25%  { opacity: 1; filter: brightness(1.6); }
  50%  { opacity: 0.35; }
  75%  { opacity: 1; }
  100% { opacity: 1; filter: none; }
}
.typing::after, .cursor-hold::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  margin-left: 0.08em;
  vertical-align: -0.04em;
  background: var(--accent);
  animation: term-blink 1s steps(1) infinite;
}
@keyframes term-blink { 50% { opacity: 0; } }

/* Contact page: falling matrix code behind the content */
#matrix { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0.2; }
@media (prefers-color-scheme: dark) { #matrix { opacity: 0.35; } }
.matrix-page .wrap { position: relative; z-index: 1; }
.matrix-page .page-hero h1, .matrix-page .page-hero .lead, .matrix-page .sec-head { text-shadow: 0 0 12px var(--bg), 0 0 4px var(--bg); }
.rv-on .rv.in-now { animation: term-print 0.36s steps(4, end) 0s both; }
