@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Share+Tech+Mono&display=swap');

:root {
  --black: #080808;
  --dark: #0e0e0e;
  --panel: #141414;
  --border: #2a2a2a;
  --copper: #b87333;
  --copper-light: #d4955a;
  --ember: #e8621a;
  --amber: #f0a500;
  --text: #c8c2b8;
  --text-dim: #6b6560;
  --text-bright: #e8e2d8;
  --white: #f4f0ea;
  --mono: 'Share Tech Mono', 'Courier Prime', monospace;
  --serif: 'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--black);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.8;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 1000;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(8,8,8,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.nav-logo .ember-mark {
  width: 28px;
  height: 28px;
}

.nav-logo-text {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--text-bright);
  text-transform: uppercase;
}

.nav-logo-text span {
  color: var(--copper);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

nav ul a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

nav ul a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--copper);
  transition: width 0.3s;
}

nav ul a:hover {
  color: var(--copper-light);
}

nav ul a:hover::after,
nav ul a.active::after {
  width: 100%;
}

nav ul a.active {
  color: var(--copper-light);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(184,115,51,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(232,98,26,0.04) 0%, transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(42,42,42,0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,42,42,0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  max-width: 900px;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--copper);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero h1 em {
  font-style: italic;
  color: var(--copper-light);
}

.hero-sub {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 2;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.9s;
}

.btn-primary {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: transparent;
  border: 1px solid var(--copper);
  color: var(--copper-light);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--copper);
  transform: translateX(-100%);
  transition: transform 0.3s;
  opacity: 0.15;
}

.btn-primary:hover::before {
  transform: translateX(0);
}

.btn-primary:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.btn-ghost {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: var(--text-bright);
}

/* ─── SIGNAL INDICATOR ─── */
.signal-bar {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 100;
}

.signal-label {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.signal-dots {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
}

.signal-dot.active {
  background: var(--copper);
  box-shadow: 0 0 6px var(--copper);
  animation: pulse 2s ease-in-out infinite;
}

.signal-dot.active:nth-child(2) { animation-delay: 0.4s; }
.signal-dot.active:nth-child(3) { animation-delay: 0.8s; }

/* ─── SECTIONS ─── */
section {
  padding: 6rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--copper);
  text-transform: uppercase;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 200px;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
}

p {
  color: var(--text);
  line-height: 2;
  margin-bottom: 1.2rem;
}

/* ─── PANELS ─── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 2.5rem;
  position: relative;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--copper), transparent);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5px;
  background: var(--border);
}

.panel-grid .panel {
  background: var(--panel);
}

/* ─── DATA READOUT ─── */
.data-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.data-row:last-child {
  border-bottom: none;
}

.data-key {
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.data-val {
  color: var(--copper-light);
  font-family: var(--mono);
}

/* ─── REDACTED ─── */
.redacted {
  background: var(--text-dim);
  color: transparent;
  user-select: none;
  border-radius: 2px;
  position: relative;
  cursor: default;
  transition: all 0.3s;
}

.redacted:hover {
  background: var(--ember);
  color: var(--black);
  cursor: text;
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--copper-light);
}

.footer-signal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-signal::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 8px var(--copper);
  animation: pulse 3s ease-in-out infinite;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  96% { opacity: 0.6; }
  97% { opacity: 1; }
}

.flicker {
  animation: flicker 8s ease-in-out infinite;
}

/* ─── TERMINAL BLOCK ─── */
.terminal {
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 2;
  position: relative;
}

.terminal::before {
  content: '// SPARK TECHNOLOGIES — FIELD TERMINAL';
  display: block;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
}

.t-line { color: var(--text-dim); }
.t-key  { color: var(--copper); }
.t-val  { color: var(--text-bright); }
.t-em   { color: var(--ember); font-style: italic; }

/* ─── EMBER MARK SVG ─── */
.ember-mark-lg {
  width: 80px;
  height: 80px;
  opacity: 0.9;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  nav ul { gap: 1.5rem; }
  .hero { padding: 7rem 1.5rem 3rem; }
  section { padding: 4rem 1.5rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .signal-bar { display: none; }
}
