/* 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 (404 page) */
.term {
  max-width: 640px;
  margin: 0 auto 2.2rem;
  text-align: left;
  background: #0a0e1a;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.term-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}
.term-bar span:nth-child(2) { background: #febc2e; }
.term-bar span:nth-child(3) { background: #28c840; }
.term-bar em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: 0.5rem;
  font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.term-body {
  padding: 1rem 1.1rem 1.2rem;
  font-family: "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #c9d4f2;
  overflow-x: auto;
}
.term-body .t-prompt { color: var(--accent); }
.term-body .t-dim { color: var(--muted); }
.term-body .t-err { color: #ff6b6b; }
.term-body .t-ok { color: #28c840; }
.term-body a { color: var(--accent); text-decoration: underline; }
.t-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: #c9d4f2;
  vertical-align: text-bottom;
}
@media (prefers-reduced-motion: no-preference) {
  .t-cursor { animation: t-blink 1.1s steps(1) infinite; }
}
@keyframes t-blink { 50% { opacity: 0; } }

/* Full-page terminal (homepage) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.term-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.term-main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
}
.term-app {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--bg);
}
.term-app:fullscreen { width: 100%; height: 100%; }
#t-stop {
  font: inherit;
  color: var(--muted);
  border: 0;
  background: transparent;
  padding: 0 0.5rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
#t-stop:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.term-screen {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  font-size: 1rem;
  background-image: repeating-linear-gradient(
    0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px);
}
.t-line { white-space: pre-wrap; word-break: break-word; }
.term-body .t-dim2 { color: #59648c; }
.t-inline { display: flex; align-items: baseline; }
.t-inline label { white-space: pre; }
#t-in {
  flex: 1;
  min-width: 4ch;
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  color: #c9d4f2;
  font: inherit;
  caret-color: var(--accent);
  padding: 0;
}
@media (max-width: 640px) {
  .term-screen { padding: 0.75rem; }
  .t-prompt-host { display: none; }
}

/* 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; }
}
