/* ============================================================
   DataDam — design tokens
   Palette pulled from the name itself: a dam holds and releases
   water the way this platform holds and releases data.
   ============================================================ */
:root{
  --ink: #16211D;
  --ink-soft: #3B4A43;
  --muted: #5C6B62;
  --muted-2: #7C8B82;
  --paper: #F1F3EE;
  --paper-raised: #FFFFFF;
  --line: #CBD2C7;

  --teal: #1F6F63;
  --teal-deep: #0F2E29;
  --teal-mid: #17453D;
  --copper: #C87A3A;
  --copper-soft: #E3B489;

  --radius: 3px;
  --radius-lg: 8px;
  --wrap: 1160px;

  --font-display: "IBM Plex Slab", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1{ font-size: clamp(2.1rem, 4vw, 3.1rem); letter-spacing: -0.01em; }
h2{ font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -0.01em; }
h3{ font-size: 1.2rem; }
h4{ font-size: 1.02rem; margin-bottom: 0.4em; }
p{ margin: 0 0 1em; color: var(--ink-soft); }

a{ color: inherit; }

.skip-link{
  position:absolute; left:-999px; top:0;
  background: var(--teal-deep); color:#fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus{ left: 12px; top: 12px; }

.wrap{ max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

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

/* ============================================================
   Header
   ============================================================ */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: rgba(241,243,238,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand{ display:flex; align-items:center; gap: 12px; text-decoration:none; }
.brand-mark{ height: 32px; width:auto; display:block; }
.brand-emblem{ height: 40px; width:auto; display:block; }
.brand-name{ display:flex; flex-direction:column; line-height:1.15; }
.brand-name .brand-module{ font-family: var(--font-display); font-weight:600; font-size: 1.08rem; color: var(--ink); }
.brand-category{
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted-2);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px;
}
.brand-fallback{ font-family: var(--font-display); font-weight:700; font-size:1.15rem; color: var(--teal-deep); }

.main-nav{ display:flex; align-items:center; gap: 26px; }
.main-nav a{
  text-decoration:none; color: var(--ink-soft); font-size: 0.95rem;
  font-weight:500; letter-spacing: 0.01em;
}
.main-nav a:hover{ color: var(--teal-deep); }
.nav-cta{
  background: var(--teal-deep); color: #fff !important;
  padding: 9px 18px; border-radius: var(--radius);
}
.nav-cta:hover{ background: var(--teal); }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width: 38px; height: 34px; background:none; border:none; cursor:pointer;
}
.nav-toggle span{ display:block; height:2px; width:100%; background: var(--ink); border-radius: 2px; }

@media (max-width: 860px){
  .nav-toggle{ display:flex; }
  .main-nav{
    position: absolute; top: 100%; left:0; right:0;
    flex-direction: column; align-items: stretch; gap:0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open{ max-height: 480px; overflow-y:auto; }
  .main-nav a{ padding: 14px 24px; border-top: 1px solid var(--line); }
  .nav-cta{ margin: 14px 24px; text-align:center; }
}

/* Nav dropdown (Modules) */
.nav-dropdown{ position: relative; }
.nav-dropdown-toggle{
  font-family: var(--font-body); background: none; border: none; cursor: pointer;
  color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; padding: 0;
  display:flex; align-items:center; gap: 5px;
}
.nav-dropdown-toggle::after{
  content:""; width:6px; height:6px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px);
}
.nav-dropdown-toggle:hover{ color: var(--teal-deep); }
.nav-dropdown-menu{
  position:absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; min-width: 180px; display:flex; flex-direction:column; gap: 2px;
  box-shadow: 0 16px 32px -14px rgba(15,33,29,0.25);
  opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu{
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a{
  margin-left: 0 !important; padding: 9px 12px; border-radius: 4px;
  font-size: 0.92rem; white-space: nowrap; color: var(--ink-soft);
}
.nav-dropdown-menu a:hover{ background: var(--paper); color: var(--teal-deep); }

@media (max-width: 860px){
  .nav-dropdown-toggle{
    width: 100%; padding: 14px 24px; border-top: 1px solid var(--line);
    color: var(--ink-soft); justify-content: space-between;
  }
  .nav-dropdown-toggle::after{ margin-right: 4px; }
  .nav-dropdown-menu{
    position: static; transform: none !important; opacity: 1; visibility: visible;
    box-shadow: none; border: none; border-radius: 0; background: var(--paper);
    padding: 0; min-width: 0;
  }
  .nav-dropdown-menu a{ padding: 12px 24px 12px 36px; border-radius: 0; }
}

/* ============================================================
   Type helpers
   ============================================================ */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 12px; font-weight: 500;
}
.eyebrow-light{ color: var(--copper-soft); }
.h-light{ color: #fff; }
.h-small{ font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.section-lead{ max-width: 60ch; font-size: 1.08rem; color: var(--muted); }
.section-lead-light{ color: #C7D3CD; }

/* ============================================================
   Buttons
   ============================================================ */
.btn{
  display:inline-block; font-family: var(--font-body); font-weight: 600;
  font-size: 0.98rem; padding: 13px 24px; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary{ background: var(--copper); color: #fff; }
.btn-primary:hover{ background: #B36B2E; }
.btn-ghost{ border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover{ background: var(--ink); color: #fff; }
.btn-ghost-light{ border-color: rgba(255,255,255,0.5); color:#fff; }
.btn-ghost-light:hover{ background: rgba(255,255,255,0.12); }

/* ============================================================
   Hero
   ============================================================ */
.hero{ padding: 64px 0 40px; }
.hero-inner{ display:grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items:center; }
.hero-inner.single{ grid-template-columns: 1fr; max-width: 74ch; }
.hero-lead{ font-size: 1.1rem; max-width: 48ch; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-top: 8px; }

.hero-panel{ display:flex; justify-content:center; }
.panel-frame{
  width: 100%; max-width: 420px; background: var(--teal-deep); color: #E9EFEB;
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: 0 18px 40px -14px rgba(15,46,41,0.45);
}
.panel-header{
  display:flex; align-items:center; gap:8px;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: #9FB6AE;
}
.panel-dot{ width:8px; height:8px; border-radius:50%; background: #7FBF9E; box-shadow: 0 0 0 3px rgba(127,191,158,0.2); }
.panel-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.readout{ display:flex; flex-direction:column; gap:4px; }
.readout-label{ font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase; color: #8FA79E; }
.readout-value{ font-family: var(--font-mono); font-size: 1.5rem; font-weight:500; color:#fff; }
.readout-value small{ font-size: 0.85rem; font-weight:400; color: #B7C7C0; margin-left:2px; }
.readout-online{ color: #8FE0B0; }
.panel-footer{ margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.14); font-family: var(--font-mono); font-size: 0.72rem; color: #83988F; }

/* Module crest hero (module pages) */
.hero-crest{ display:flex; justify-content:center; }
.crest-frame{
  width: 100%; max-width: 320px; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; display:flex; align-items:center; justify-content:center;
  box-shadow: 0 22px 48px -26px rgba(15,33,29,0.3);
}
.crest-frame img{ width: 100%; height:auto; display:block; }

@media (max-width: 860px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-panel, .hero-crest{ order:-1; }
  .crest-frame{ max-width: 220px; margin: 0 auto; }
}

/* ============================================================
   Sections
   ============================================================ */
.section{ padding: 84px 0; }
.section-dark{ background: var(--teal-deep); color: #fff; }
.section-panel{ background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-quiet{ background: #E7EAE3; padding: 64px 0; }
.section-contact{ background: var(--ink); }
.section h2{ max-width: 22ch; }

/* ============================================================
   Cards (Available now / What's running on it)
   ============================================================ */
.card-grid{ margin-top: 44px; display:grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card{
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; display:flex; flex-direction:column;
}
.card-featured{ border-color: var(--copper); box-shadow: 0 0 0 1px var(--copper); }
.card-icon{ color: var(--teal); width: 38px; height:38px; margin-bottom: 16px; }
.card-icon svg{ width:100%; height:100%; }
.card-icon img{ width:100%; height:100%; object-fit: contain; }
.card-featured .card-icon{ color: var(--copper); }
.card h3{ margin-bottom: 8px; font-size: 1.12rem; }
.card p{ font-size: 0.95rem; }
.card ul{
  margin: 12px 0 0; padding: 0; list-style: none;
  font-size: 0.9rem; color: var(--ink-soft);
  border-top: 1px solid var(--line); padding-top: 14px;
  display:flex; flex-direction:column; gap: 9px;
}
.card ul li{ padding-left: 16px; position:relative; }
.card ul li::before{ content:""; position:absolute; left:0; top: 8px; width:6px; height:6px; background: var(--teal); border-radius:1px; }
.card-featured ul li::before{ background: var(--copper); }
.card-link{
  display:inline-flex; align-items:center; gap: 6px; margin-top: 16px;
  color: var(--teal-deep); text-decoration:none; font-size: 0.9rem; font-weight: 600;
}
.card-link:hover{ text-decoration: underline; }

@media (max-width: 1000px){ .card-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px){ .card-grid{ grid-template-columns: 1fr; } }

/* ============================================================
   Custom-build banner
   ============================================================ */
.custom-banner{
  margin-top: 40px; background: var(--paper-raised); border: 1px dashed var(--line);
  border-radius: var(--radius-lg); padding: 36px 32px;
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap: 24px;
}
.custom-banner-copy{ max-width: 56ch; }
.custom-banner h3{ margin-bottom: 6px; }
.custom-banner p{ margin:0; font-size: 0.98rem; }

/* ============================================================
   Dam diagram (signature element)
   ============================================================ */
.dam-diagram{ margin: 48px 0 8px; color: #C7D3CD; }
.dam-svg{ width:100%; height:auto; display:block; }
.dam-wall{ fill: #13332D; stroke: #2C544B; stroke-width: 1.5; }
.dam-gate{ fill: #C87A3A; opacity: 0.9; }
.dam-gate-slot{ stroke: #0B211D; stroke-width: 2; }
.dam-reservoir{ fill: #1F6F63; opacity: 0.55; }
.dam-label{ font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; fill: #9FB6AE; }
.dam-label-small{ font-size: 11px; }
.flow-line{ fill:none; stroke:#5C8C81; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 8; animation: flow 3.2s linear infinite; }
.flow-line-2{ animation-duration: 2.6s; }
@keyframes flow{ to{ stroke-dashoffset: -56; } }
@media (prefers-reduced-motion: reduce){ .flow-line{ animation: none; } }

.process-steps{
  margin-top: 56px; display:grid; grid-template-columns: repeat(4,1fr); gap: 28px;
  border-top: 1px solid rgba(255,255,255,0.16); padding-top: 36px;
}
.process-num{ display:block; font-family: var(--font-mono); font-size: 0.85rem; color: var(--copper-soft); margin-bottom: 10px; }
.process-step h4{ color: #fff; }
.process-step p{ color: #B7C7C0; font-size: 0.94rem; margin:0; }

@media (max-width: 860px){ .process-steps{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px){ .process-steps{ grid-template-columns: 1fr; } }

/* ============================================================
   Platform section
   ============================================================ */
.platform-inner{ display:grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items:center; }
.feature-list{ list-style:none; padding:0; margin: 20px 0 0; display:flex; flex-direction:column; gap:12px; }
.feature-list li{ padding-left: 22px; position:relative; color: var(--ink-soft); }
.feature-list li::before{ content:""; position:absolute; left:0; top:9px; width:9px; height:2px; background: var(--teal); }
.platform-media img{ width:100%; border-radius: var(--radius-lg); border:1px solid var(--line); box-shadow: 0 22px 50px -24px rgba(15,33,29,0.35); display:block; }
@media (max-width: 900px){ .platform-inner{ grid-template-columns: 1fr; } }

/* ============================================================
   Reliability
   ============================================================ */
.ownership-grid{ margin-top: 36px; display:grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.ownership-item{ border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; background: var(--paper-raised); }
.ownership-item h4{ color: var(--teal-deep); font-size: 0.98rem; }
.ownership-item p{ font-size: 0.9rem; margin:0; }
@media (max-width: 860px){ .ownership-grid{ grid-template-columns: 1fr; } }

/* ============================================================
   Expanding / chip list
   ============================================================ */
.chip-list{ list-style:none; margin: 28px 0 0; padding:0; display:flex; flex-wrap:wrap; gap: 10px; }
.chip-list li{
  font-family: var(--font-mono); font-size: 0.85rem;
  background: var(--paper-raised); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 999px; color: var(--ink-soft);
}

/* ============================================================
   Module pages — hero, feature grid, screenshot gallery
   ============================================================ */
.module-hero{ padding: 56px 0 8px; }
.module-hero .eyebrow{ margin-bottom: 14px; }
.module-hero .hero-lead{ max-width: 60ch; }
.module-crumb-wrap{ padding-top: 28px; }
.module-crumb{ display:inline-flex; align-items:center; gap: 8px; text-decoration:none; color: var(--muted-2); font-size: 0.85rem; margin-bottom: 22px; }
.module-crumb:hover{ color: var(--ink-soft); }

.feature-grid{ margin-top: 36px; display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card{
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; border-top: 2px solid var(--feature-accent, var(--teal));
}
.feature-card h3{ font-size: 1.04rem; color: var(--ink); margin-bottom: 8px; }
.feature-card p{ font-size: 0.92rem; margin:0; }
.feature-card.feature-roadmap{ background: transparent; border-style: dashed; border-top-style: dashed; }
.feature-card.feature-roadmap h3{ color: var(--muted); }
.feature-tag{
  display:inline-block; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper);
  border: 1px solid var(--copper-soft); border-radius: 999px; padding: 3px 10px;
  margin-bottom: 10px;
}

@media (max-width: 1100px){ .feature-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px){ .feature-grid{ grid-template-columns: 1fr; } }

.theme-toggle{ display:flex; gap:8px; margin: 8px 0 32px; }
.theme-btn{
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper-raised); color: var(--muted); font-weight: 600; font-size: 0.85rem;
  cursor: pointer; font-family: var(--font-body);
}
.theme-btn.active{ background: var(--teal-deep); color:#fff; border-color: var(--teal-deep); }

.snapshot-gallery{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.snapshot-card{
  margin:0; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 12px; box-shadow: 0 24px 48px -28px rgba(15,33,29,0.25);
}
.snapshot-card img{ border-radius: 5px; width:100%; display:none; background:#fff; }
.snapshot-gallery[data-theme="dark"] .shot-dark{ display:block; }
.snapshot-gallery[data-theme="light"] .shot-light{ display:block; }
.snapshot-card figcaption{ text-align:center; color: var(--muted); font-size: 0.85rem; margin-top: 12px; font-weight:600; }

@media (max-width: 860px){ .snapshot-gallery{ grid-template-columns: 1fr; } }

/* Screenshot slider (wraps one or more snapshot-gallery pairs as slides) */
.snapshot-slider{ margin-top: 4px; }
.snapshot-slide[hidden]{ display:none; }
.slide-caption{
  text-align:center; color: var(--muted); font-size: 0.92rem; font-style:italic;
  margin: 16px 0 0; max-width: 60ch; margin-left:auto; margin-right:auto;
}
.slider-controls{ display:flex; align-items:center; justify-content:center; gap: 18px; margin-top: 26px; }
.slider-arrow{
  display:flex; align-items:center; justify-content:center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--paper-raised); border: 1px solid var(--line); color: var(--ink);
  font-size: 1rem; line-height:1; cursor:pointer; padding:0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.slider-arrow:hover{ background: var(--paper); border-color: var(--teal); }
.slider-dots{ display:flex; align-items:center; gap: 8px; }
.slider-dot{
  width: 8px; height: 8px; border-radius: 50%; background: var(--line);
  border: none; padding:0; cursor:pointer;
}
.slider-dot.active{ background: var(--teal-deep); }

/* ============================================================
   Contact
   ============================================================ */
.section-contact{ text-align:left; }
.contact-inner{ max-width: 640px; }
.contact-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-top: 24px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer{ background: var(--ink); color: #C7D3CD; padding: 48px 0 28px; }
.footer-inner{
  display:grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.14); padding-bottom: 32px;
}
.footer-brand .brand-mark-footer{ height: 40px; margin-bottom: 12px; display:block; }
.footer-logo-plate{ display:inline-flex; align-items:center; background: var(--paper); border-radius: 6px; padding: 10px 16px; margin-bottom: 12px; }
.footer-brand .brand-fallback{ color:#fff; }
.footer-brand p{ font-family: var(--font-mono); font-size: 0.82rem; color: #8FA79E; margin:0; }
.footer-nav{ display:flex; flex-direction:column; gap:10px; }
.footer-nav a{ text-decoration:none; color:#C7D3CD; font-size:0.94rem; }
.footer-nav a:hover{ color:#fff; }
.footer-contact{ display:flex; flex-direction:column; gap:10px; font-size:0.94rem; }
.footer-contact a{ text-decoration:none; color:#C7D3CD; }
.footer-contact a:hover{ color:#fff; }
.footer-contact span{ color:#728A81; font-family: var(--font-mono); font-size:0.78rem; margin-top: 6px; }

/* Module-page footer: quiet "Powered by DataDam" strip instead of full brand block */
.site-footer.footer-quiet{ padding: 28px 0; }
.footer-powered-inner{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap: 16px;
}
.footer-powered{ display:flex; align-items:center; gap: 10px; text-decoration:none; }
.footer-powered .footer-logo-plate{ margin-bottom:0; padding: 6px 10px; }
.footer-powered .brand-mark-footer{ height: 22px; margin-bottom:0; }
.footer-powered span{ font-family: var(--font-mono); font-size: 0.8rem; color: #C7D3CD; }
.footer-powered:hover span{ color:#fff; }
.footer-powered-contact{ display:flex; gap: 18px; flex-wrap:wrap; font-size: 0.88rem; }
.footer-powered-contact a{ text-decoration:none; color:#C7D3CD; }
.footer-powered-contact a:hover{ color:#fff; }

@media (max-width: 700px){ .footer-inner{ grid-template-columns: 1fr; } }
