/* ============================================
   DATA GOVERNANCE LAB — styles.css
   © 2025 Donald Williams
   ============================================ */

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

:root {
  --ink: #0F0F0E;
  --ink-mid: #3A3832;
  --ink-soft: #7A7670;
  --paper: #F9F7F2;
  --paper-mid: #EDEAE2;
  --paper-deep: #DDD9CF;
  --signal: #C84B31;
  --signal-soft: #F5E8E4;
  --active: #2D6A4F;
  --active-soft: #E8F2ED;
  --mono-accent: #4A6FA5;
  --mono-accent-soft: #EAF0F8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: rgba(249, 247, 242, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-deep);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo-mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.nav-logo-mark::before {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--signal);
  border-radius: 1px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.nav-logo-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.03em;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--signal); }

/* Mobile Drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: var(--paper);
  padding: 5rem 2rem 2rem;
  flex-direction: column;
  gap: 0;
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--paper-deep);
  display: block;
  transition: color 0.2s;
}

.nav-drawer a:hover { color: var(--signal); }

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--paper-mid) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-mid) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
  opacity: 0.6;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--active);
  background: var(--active-soft);
  border: 1px solid rgba(45, 106, 79, 0.2);
  padding: 5px 12px;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--active);
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

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

h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--signal);
}

.hero-rumelt {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--paper-deep);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.rumelt-block {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--paper-deep);
}

.rumelt-block:last-child { border-bottom: none; }

.rumelt-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.3rem;
}

.rumelt-text {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.55;
}

.hero-desc {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-mid);
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--ink);
  padding: 1rem 1.75rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.2s;
  width: 100%;
}

.hero-cta:hover { background: var(--signal); }
.hero-cta-arrow { font-size: 1rem; }

/* ============================================
   SHARED SECTION STYLES
   ============================================ */

section { padding: 4rem 1.5rem; }

.mono-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.75rem;
}

h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.section-sub {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-mid);
  margin-bottom: 2.5rem;
}

/* ============================================
   DIAGNOSIS BAND
   ============================================ */

.diagnosis {
  background: var(--ink);
  padding: 3rem 1.5rem;
}

.diagnosis .mono-label {
  color: var(--signal);
  margin-bottom: 1.25rem;
}

.diagnosis-quote {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.3rem, 5vw, 2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  color: var(--paper);
  margin-bottom: 1rem;
}

.diagnosis-body {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(249, 247, 242, 0.6);
}

/* ============================================
   SANDBOXES
   ============================================ */

.sandboxes { background: var(--paper); }

.sandbox-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--paper-deep);
  border: 1px solid var(--paper-deep);
  border-radius: 4px;
  overflow: hidden;
}

.sandbox-card {
  background: var(--paper);
  padding: 1.5rem;
  position: relative;
  transition: background 0.2s;
}

.sandbox-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.sandbox-card.ai::before    { background: var(--signal); }
.sandbox-card.analytics::before { background: var(--active); }
.sandbox-card.arch::before  { background: var(--mono-accent); }
.sandbox-card.general::before { background: var(--ink-soft); }

.sandbox-card.ai { cursor: pointer; }
.sandbox-card.ai:active { background: var(--signal-soft); }

.sandbox-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sandbox-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.sandbox-icon {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sandbox-card.ai .sandbox-icon       { background: var(--signal-soft); }
.sandbox-card.analytics .sandbox-icon { background: var(--active-soft); }
.sandbox-card.arch .sandbox-icon     { background: var(--mono-accent-soft); }
.sandbox-card.general .sandbox-icon  { background: var(--paper-mid); border: 1px solid var(--paper-deep); }

.sandbox-icon svg { width: 16px; height: 16px; stroke-width: 1.5; fill: none; }
.sandbox-card.ai .sandbox-icon svg       { stroke: var(--signal); }
.sandbox-card.analytics .sandbox-icon svg { stroke: var(--active); }
.sandbox-card.arch .sandbox-icon svg     { stroke: var(--mono-accent); }
.sandbox-card.general .sandbox-icon svg  { stroke: var(--ink-mid); }

.sandbox-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.sandbox-card p {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-mid);
  margin-bottom: 1.25rem;
}

.sandbox-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--paper-deep);
}

.sandbox-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}

.badge-active   { background: var(--active-soft); color: var(--active); }
.badge-building { background: var(--mono-accent-soft); color: var(--mono-accent); }
.badge-live     { background: var(--signal-soft); color: var(--signal); }

.sandbox-arrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.sandbox-link-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  color: var(--signal);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

/* ============================================
   ABOUT
   ============================================ */

.about { background: var(--paper-mid); }

.about-meta {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--paper-deep);
}

.about-meta h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.about-meta .role-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--signal);
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.about-stat { margin-bottom: 0.875rem; }

.about-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.about-stat-val {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-mid);
}

.about-body p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--ink-mid);
  margin-bottom: 1rem;
}

.about-body p:last-child { margin-bottom: 0; }

/* ============================================
   CONTACT
   ============================================ */

.contact { background: var(--ink); }
.contact .mono-label { color: var(--signal); }
.contact h2 { color: var(--paper); }
.contact .section-sub { color: rgba(249, 247, 242, 0.55); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(249, 247, 242, 0.4);
}

.form-field input,
.form-field textarea,
.form-field select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(249, 247, 242, 0.12);
  border-radius: 2px;
  padding: 0.85rem 0.9rem;
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  width: 100%;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(249, 247, 242, 0.2); }

.form-field input:focus,
.form-field textarea:focus { border-color: var(--signal); }

.form-field textarea { resize: vertical; min-height: 110px; }
.form-field select { color: rgba(249, 247, 242, 0.5); }
.form-field select option { background: #0F0F0E; color: var(--paper); }

.btn-send {
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--signal);
  border: none;
  border-radius: 2px;
  padding: 1rem 1.75rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.25rem;
}

.btn-send:hover { background: #A83A22; }
.btn-send:disabled { background: var(--ink-soft); cursor: not-allowed; }

.form-success {
  display: none;
  padding: 1.5rem;
  border: 1px solid rgba(45, 106, 79, 0.3);
  border-radius: 3px;
  background: rgba(45, 106, 79, 0.08);
}

.form-success.visible { display: block; }

.form-success p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--active-soft);
  line-height: 1.6;
}

.form-error {
  display: none;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(200, 75, 49, 0.3);
  border-radius: 3px;
  background: rgba(200, 75, 49, 0.08);
  margin-top: 0.5rem;
}

.form-error.visible { display: block; }

.form-error p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--signal-soft);
  line-height: 1.5;
}

.contact-aside h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 300;
  font-style: italic;
  color: var(--paper);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.contact-line-icon {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--signal);
  padding-top: 0.1rem;
  flex-shrink: 0;
}

.contact-line-text {
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(249, 247, 242, 0.55);
  line-height: 1.6;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--ink);
  border-top: 1px solid rgba(249, 247, 242, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-left {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--paper);
  letter-spacing: 0.04em;
}

.footer-left span { color: var(--signal); }

footer p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  color: rgba(249, 247, 242, 0.25);
  letter-spacing: 0.04em;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-status  { animation: fadeUp 0.6s 0.10s ease both; }
h1            { animation: fadeUp 0.7s 0.20s ease both; }
.hero-rumelt  { animation: fadeUp 0.7s 0.35s ease both; }
.hero-desc    { animation: fadeUp 0.7s 0.45s ease both; }
.hero-cta     { animation: fadeUp 0.7s 0.55s ease both; }

/* ============================================
   RESPONSIVE — MOBILE ONLY
   ============================================ */

@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-links  { display: none; }
}

/* ============================================
   RESPONSIVE — DESKTOP (768px+)
   ============================================ */

@media (min-width: 768px) {
  nav { padding: 1rem 3rem; }

  .nav-toggle  { display: none !important; }
  .nav-links   { display: flex !important; }
  .nav-drawer  { display: none !important; }

  .hero { padding: 8rem 3rem 5rem; }
  .hero-cta { width: auto; justify-content: flex-start; }

  .hero-rumelt { flex-direction: row; }
  .rumelt-block {
    border-bottom: none;
    border-right: 1px solid var(--paper-deep);
    flex: 1;
  }
  .rumelt-block:last-child { border-right: none; }

  section { padding: 6rem 3rem; }

  .diagnosis { padding: 4rem 3rem; }
  .diagnosis-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    max-width: 900px;
  }

  .sandbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    flex-direction: unset;
  }

  .sandbox-card-top { flex-direction: column; gap: 0.75rem; }
  .sandbox-card { padding: 2rem; }
  .sandbox-card.ai:hover { background: var(--signal-soft); }
  .sandbox-card.analytics:hover,
  .sandbox-card.arch:hover,
  .sandbox-card.general:hover { background: var(--paper-mid); }

  .about-meta { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
  .about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
    max-width: 900px;
  }

  .contact-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: start;
    max-width: 900px;
  }

  .btn-send { width: auto; }
  .contact-form { margin-bottom: 0; }

  footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 3rem;
  }
}
