/*
Theme Name:  DecaWatt
Theme URI:   https://decawatt.tech
Description: Custom theme for The DecaWatt Project — dark MVDC infrastructure branding.
Author:      Mikko Summala
Author URI:  https://summala.com
Version:     1.0.0
License:     Proprietary
Text Domain: decawatt
*/

/* ─── RESET & ROOT ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #06080C;
  --surface:    #0D1117;
  --border:     rgba(255,255,255,0.07);
  --div:        #1D9E75;
  --accent:     #00E5A0;
  --accent-dim: rgba(0,229,160,0.12);
  --accent-mid: rgba(0,229,160,0.4);
  --text:       #F0F2F0;
  --muted:      rgba(240,242,240,0.48);
  --coral:      #D85A30;
  --purple:     #534AB7;
  --pink:       #993556;
  --amber:      #BA7517;
  --blue:       #185FA5;
  --mono:       'DM Mono', monospace;
  --display:    'Barlow Condensed', sans-serif;
  --body:       'Barlow', sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grid background */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,229,160,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
body::after {
  content: '';
  position: fixed; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px;
  pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse, rgba(0,229,160,0.06) 0%, transparent 70%);
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.site-wrap {
  position: relative; z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── NAVIGATION ─────────────────────────────────────────────────────────── */
.site-header {
  position: relative; z-index: 10;
  border-bottom: 1px solid var(--border);
}
.site-header .site-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}
.site-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 28px; height: 28px;
  border: 1.5px solid var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg {
  width: 16px; height: 16px;
  stroke: var(--accent); fill: none;
  stroke-width: 2; stroke-linecap: round;
}
.status-pill {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
  display: flex; align-items: center; gap: 6px;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(.7); }
}

/* Primary nav */
.primary-nav ul { list-style: none; display: flex; gap: 2rem; }
.primary-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.primary-nav a:hover,
.primary-nav .current-menu-item a { color: var(--accent); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none; border: none;
  color: var(--text); cursor: pointer;
  font-size: 1.4rem; line-height: 1;
}
@media (max-width: 680px) {
  .primary-nav { display: none; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 1rem; padding: 1rem 0; }
  .nav-toggle { display: block; }
}

/* ─── DIVIDERS ───────────────────────────────────────────────────────────── */
.dw-divider {
  border: none;
  border-top: 1px solid var(--div);
  opacity: 0.5;
  margin: 0;
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero { padding: 6rem 0 4rem; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin-bottom: 1.75rem;
  color: #ffffff;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 2.5rem;
}
.cta-row {
  display: flex; align-items: center;
  gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.hint { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #06080C;
  font-family: var(--mono); font-size: 0.75rem;
  font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 26px; border-radius: 6px;
  border: none; cursor: pointer; text-decoration: none;
  transition: opacity .15s, transform .15s;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary svg {
  width: 14px; height: 14px;
  stroke: #06080C; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: none;
  border: 1px solid var(--accent-mid);
  color: var(--accent);
  font-family: var(--mono); font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 6px;
  cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.btn-ghost:hover { background: var(--accent-dim); }

/* ─── PILLARS ────────────────────────────────────────────────────────────── */
.pillars { padding: 4rem 0; }
.section-eyebrow {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.pillar { background: var(--surface); padding: 1.75rem; }
.pillar-num {
  font-family: var(--mono);
  font-size: 0.63rem; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.pillar-title {
  font-family: var(--display);
  font-size: 1.15rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.65rem;
  letter-spacing: 0.01em; line-height: 1.25;
}
.pillar-body { font-size: 0.88rem; line-height: 1.7; color: var(--muted); }

/* ─── SPECS ──────────────────────────────────────────────────────────────── */
.specs { padding: 3.5rem 0; }
.specs-sought {
  font-family: var(--mono);
  font-size: 0.72rem; color: var(--accent);
  margin-bottom: 2rem; letter-spacing: 0.04em;
}
.specs-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.spec-val {
  font-family: var(--display);
  font-size: 2.2rem; font-weight: 800;
  color: var(--text); line-height: 1; margin-bottom: 0.4rem;
}
.spec-val span { color: var(--accent); }
.spec-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* ─── SYSTEM DIAGRAMS ────────────────────────────────────────────────────── */
.diagrams { padding: 4rem 0; }
.diag-block { margin-bottom: 3.5rem; }
.diag-block:last-child { margin-bottom: 0; }
.diag-header-row {
  display: flex; align-items: baseline;
  justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.diag-title {
  font-family: var(--display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text); letter-spacing: 0.01em;
}
.diag-power {
  font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  background: var(--accent-dim);
  padding: 3px 10px; border-radius: 100px;
  white-space: nowrap;
}
.diag-sub { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.25rem; }
.diag-svg-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1rem;
  overflow: hidden;
}
.diag-svg-wrap svg { width: 100%; height: auto; }

/* SVG labels */
.label-main { font-family: 'Barlow', sans-serif; font-size: 13px; font-weight: 600; fill: #E8EAE8; }
.label-sub  { font-family: 'Barlow', sans-serif; font-size: 11px; fill: #9AADA0; }
.bus-label  { font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 600; fill: #5DCAA5; }

/* ─── PARTNER BAND ───────────────────────────────────────────────────────── */
.partner-section { padding: 1rem 0 3.5rem; }
.partner-band {
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.partner-text { font-size: 0.9rem; line-height: 1.7; color: var(--muted); max-width: 560px; }
.partner-text strong { color: var(--text); font-weight: 600; }

/* ─── ABOUT ──────────────────────────────────────────────────────────────── */
.about { padding: 3.5rem 0; }
.about-inner { display: flex; align-items: flex-start; gap: 2.5rem; }
.about-avatar {
  flex-shrink: 0;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid var(--accent-mid);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; font-size: 1.1rem;
  color: var(--accent);
}
.about-name {
  font-family: var(--display); font-weight: 700;
  font-size: 1.2rem; color: var(--text); margin-bottom: 0.3rem;
}
.about-role {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--accent); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 0.85rem;
}
.about-bio { font-size: 0.9rem; line-height: 1.75; color: var(--muted); margin-bottom: 1rem; max-width: 560px; }
.links-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.link-pill {
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  background: var(--accent-dim);
  padding: 5px 14px; border-radius: 100px;
  text-decoration: none;
  transition: background .15s;
}
.link-pill:hover { background: rgba(0,229,160,0.22); }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.site-footer .site-wrap {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--accent); text-decoration: none;
}
.footer-links a:hover { opacity: .75; }

/* ─── MODAL ──────────────────────────────────────────────────────────────── */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6,8,12,0.9);
  z-index: 1000;
  align-items: flex-start; justify-content: center;
  padding-top: 10vh;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--accent-mid);
  border-radius: 12px;
  padding: 2.25rem;
  width: 90%; max-width: 440px;
  position: relative;
}
.modal h2 {
  font-family: var(--display); font-size: 1.5rem; font-weight: 700;
  margin-bottom: 0.6rem; color: var(--text);
}
.modal p { font-size: 0.88rem; line-height: 1.7; color: var(--muted); margin-bottom: 1.4rem; }
.modal input, .modal textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 13px;
  font-family: var(--mono); font-size: 0.8rem;
  color: var(--text); outline: none;
  margin-bottom: 0.75rem;
  transition: border-color .15s;
  resize: vertical;
}
.modal input::placeholder,
.modal textarea::placeholder { color: var(--muted); }
.modal input:focus,
.modal textarea:focus { border-color: var(--accent-mid); }
.modal-submit {
  width: 100%;
  background: var(--accent); color: #06080C;
  font-family: var(--mono); font-size: 0.78rem;
  font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px; border-radius: 6px;
  border: none; cursor: pointer;
  transition: opacity .15s;
}
.modal-submit:hover { opacity: .88; }
.modal-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: none;
  color: var(--muted); font-size: 1.4rem;
  cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-notice {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--accent); text-align: center;
  padding: 1.5rem 0; display: none;
}
.modal-error {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--coral); margin-bottom: 0.75rem; display: none;
}

/* ─── CONTACT PAGE ───────────────────────────────────────────────────────── */
.contact-section { padding: 5rem 0; }
.contact-section h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: #ffffff; margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}
.contact-section .lead { font-size: 1rem; color: var(--muted); line-height: 1.75; max-width: 540px; margin-bottom: 3rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-form-wrap { }
.contact-details h3 {
  font-family: var(--display); font-size: 1.1rem; font-weight: 700;
  color: var(--text); margin-bottom: 1.25rem;
}
.contact-item { margin-bottom: 1.25rem; }
.contact-item span {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 0.25rem;
}
.contact-item a {
  font-size: 0.9rem; color: var(--accent); text-decoration: none;
}
.contact-item a:hover { opacity: .75; }
.contact-form label {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 0.35rem;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 13px;
  font-family: var(--body); font-size: 0.9rem;
  color: var(--text); outline: none;
  margin-bottom: 1.25rem;
  transition: border-color .15s;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent-mid); }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--muted); }
.form-notice {
  font-family: var(--mono); font-size: 0.78rem;
  padding: 1rem 1.25rem; border-radius: 6px;
  margin-bottom: 1rem; display: none;
}
.form-notice.success { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-mid); }
.form-notice.error   { background: rgba(216,90,48,0.12); color: var(--coral); border: 1px solid rgba(216,90,48,0.4); }

/* ─── NEWS / BLOG ────────────────────────────────────────────────────────── */
.news-section { padding: 5rem 0; }
.news-section h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: #ffffff; margin-bottom: 3rem; letter-spacing: 0.01em;
}
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 1.75rem;
  text-decoration: none;
  transition: border-color .2s;
  display: block;
}
.news-card:hover { border-color: var(--accent-mid); }
.news-date {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.75rem;
}
.news-card h2 {
  font-family: var(--display); font-size: 1.15rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.65rem; line-height: 1.3;
}
.news-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }
.news-more {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--accent); margin-top: 0.85rem;
  display: inline-block;
}
.single-post { padding: 5rem 0; }
.single-post .post-meta {
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.5rem;
}
.single-post h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #ffffff; margin-bottom: 2rem; letter-spacing: 0.01em;
}
.post-content { max-width: 680px; }
.post-content p { font-size: 0.95rem; line-height: 1.8; color: var(--muted); margin-bottom: 1.25rem; }
.post-content h2 {
  font-family: var(--display); font-size: 1.4rem; font-weight: 700;
  color: var(--text); margin: 2rem 0 0.75rem; letter-spacing: 0.01em;
}
.post-content h3 {
  font-family: var(--display); font-size: 1.1rem; font-weight: 700;
  color: var(--text); margin: 1.5rem 0 0.5rem;
}
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  margin-bottom: 2.5rem;
  transition: color .15s;
}
.back-link:hover { color: var(--accent); }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .pillars-grid      { grid-template-columns: 1fr; }
  .specs-row         { grid-template-columns: 1fr 1fr; }
  .contact-grid      { grid-template-columns: 1fr; }
  .news-grid         { grid-template-columns: 1fr; }
  .hero h1           { font-size: 2.8rem; }
  .about-inner       { flex-direction: column; gap: 1.25rem; }
  .partner-band      { flex-direction: column; }
}
