/* Echo Radio Tech — site styles */
:root {
  --bg: #0b1020;
  --bg-alt: #101731;
  --surface: #151d3a;
  --border: #26315c;
  --text: #e8ecf8;
  --muted: #9aa5c9;
  --accent: #4fd1ff;
  --accent-2: #7c6bff;
  --radius: 14px;
  --max: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--accent);
  color: #0b1020;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; margin-bottom: 2rem; }
h3 { font-size: 1.08rem; font-weight: 650; margin-bottom: 0.5rem; }

p { color: var(--muted); }
a { color: var(--accent); text-decoration: none; }

.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 750;
  color: var(--text);
  font-size: 1.05rem;
}
.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px var(--accent);
}
.nav nav { display: flex; align-items: center; gap: 1.4rem; }
.nav nav a { color: var(--muted); font-size: 0.95rem; }
.nav nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #0b1020;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(79, 209, 255, 0.35); }
.btn-small { padding: 0.45rem 1.1rem; font-size: 0.9rem; color: #0b1020 !important; }
.btn-large { font-size: 1.15rem; padding: 1rem 2.2rem; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { box-shadow: none; border-color: var(--accent); }

/* Hero */
.hero {
  padding: 7rem 0 5rem;
  background:
    radial-gradient(ellipse 60% 50% at 70% 10%, rgba(124, 107, 255, 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(79, 209, 255, 0.12), transparent);
}
.hero .lede { max-width: 620px; margin: 1.4rem 0 2.2rem; font-size: 1.15rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  list-style: none;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.3rem; }
.hero-stats span { color: var(--muted); font-size: 0.9rem; }

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-alt); }

.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-icon { font-size: 1.6rem; margin-bottom: 0.8rem; }
.card p, .work-item p, .why p { font-size: 0.95rem; }

.work-item {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem;
}

/* Stack */
.stack-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Contact */
.contact { text-align: center; }
.contact .lede { max-width: 520px; margin: 0 auto 2.2rem; font-size: 1.1rem; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 1.6rem 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Language switcher */
.nav nav a.lang {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
}
.nav nav a.lang:hover { border-color: var(--accent); }

/* Work-item case study link */
a.more { font-weight: 650; font-size: 0.92rem; }
.work-item p + p { margin-top: 0.6rem; }

/* Prose (case studies, privacy, 404) */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.45rem; margin: 2.4rem 0 0.8rem; }
.prose h3 { font-size: 1.1rem; margin: 1.6rem 0 0.5rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { color: var(--muted); margin: 0 0 1rem 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--text); }
.prose .cta { margin-top: 2.5rem; }

/* Terminal (homepage and 404). Flat console: no radius, shadow, gradient,
   glow, or font smoothing; system monospace only (CSP has no font-src). */
.term-page {
  --t-bg: #0c0c0c;
  --t-fg: #c8c8c8;
  --t-bright: #f0f0f0;
  --t-dim: #7a7a7a;
  --t-green: #74c35d;
  --t-blue: #6e9fdb;
  --t-red: #e5605d;
  --t-yellow: #d9b85f;
  --t-cyan: #5fb8c4;
  --t-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--t-bg);
  color: var(--t-fg);
  font-family: var(--t-mono);
  -webkit-font-smoothing: auto;
}
.term-page ::selection { background: var(--t-fg); color: var(--t-bg); }
.term-page .skip-link { background: var(--t-fg); color: var(--t-bg); border-radius: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.term-main { flex: 1; min-height: 0; min-width: 0; display: flex; }
.term-app {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--t-bg);
}
.term-app:fullscreen { width: 100%; height: 100%; }
.term-body {
  font-family: var(--t-mono);
  font-size: 15px;
  line-height: 1.4;
  color: var(--t-fg);
  font-variant-ligatures: none;
  tab-size: 8;
}
.term-screen {
  flex: 1;
  min-height: 0;
  padding: 10px 14px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a var(--t-bg);
}
.term-screen:focus { outline: none; }
.term-screen:focus-visible { outline: 1px dotted var(--t-dim); outline-offset: -2px; }
.term-body pre { font: inherit; margin: 0; white-space: pre-wrap; word-break: break-word; }
.t-line { white-space: pre-wrap; word-break: break-word; min-height: 1.4em; }

/* ANSI-style roles */
.term-body .t-dim { color: var(--t-dim); }
.term-body .t-dim2 { color: #5a5a5a; }
.term-body .t-err { color: var(--t-red); }
.term-body .t-ok { color: var(--t-green); }
.term-body .t-warn { color: var(--t-yellow); }
.term-body .t-head { color: var(--t-bright); font-weight: 700; }
.term-body .t-cmd { color: var(--t-bright); }
.term-body a { color: var(--t-cyan); text-decoration: underline; text-underline-offset: 0.15em; }
.term-body a:hover { color: var(--t-bright); }
.term-body a:focus-visible { outline: 1px solid var(--t-cyan); outline-offset: 1px; }

/* bash-style prompt: bold green user@host, blue path */
.term-body .t-prompt { color: var(--t-fg); }
.t-ps-user { color: var(--t-green); font-weight: 700; }
.t-ps-path { color: var(--t-blue); font-weight: 700; }

.t-inline { display: flex; align-items: baseline; }
.t-inline label { white-space: pre; cursor: text; }
#t-in {
  flex: 1;
  min-width: 4ch;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  color: var(--t-bright);
  font: inherit;
  letter-spacing: inherit;
  caret-color: var(--t-fg);
  caret-shape: block;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
#t-in:focus-visible { outline: none; }
#t-stop {
  font: inherit;
  color: var(--t-dim);
  border: 0;
  background: transparent;
  padding: 0 0 0 1ch;
  cursor: pointer;
}
#t-stop:hover, #t-stop:focus-visible { color: var(--t-bright); outline: none; text-decoration: underline; }

/* Static block cursor (404 page, no JS) */
.t-cursor {
  display: inline-block;
  width: 1ch;
  height: 1.15em;
  background: var(--t-fg);
  vertical-align: text-bottom;
}
@media (prefers-reduced-motion: no-preference) {
  .t-cursor { animation: t-blink 1.06s steps(1) infinite; }
}
@keyframes t-blink { 50% { opacity: 0; } }

@media (max-width: 640px) {
  .term-body { font-size: 13px; }
  .term-screen { padding: 8px 10px 12px; }
  .t-prompt-host { display: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .stack-groups { grid-template-columns: 1fr; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 0.6rem 1.5rem; row-gap: 0.4rem; }
  .nav nav { flex-wrap: wrap; gap: 0.8rem; }
  .nav nav a { font-size: 0.88rem; }
  .hero { padding: 4.5rem 0 3.5rem; }
  .hero-stats { gap: 1.8rem; }
}
