/* ════════════════════════════════════════════════════════════════════════
   Cascadiaen Website Styles
   Design system based on cascadiaen_brand_reference.html
   ════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────────────────────────── */
:root {
  /* Core Colors */
  --color-deep:        #070F1C;
  --color-navy:        #1A2E45;
  --color-blue:        #2563EB;
  --color-teal:        #0D9488;
  --color-emerald:     #10B981;
  --color-slate:       #64748B;
  --color-mist:        #94A3B8;
  --color-border:      #E2E8F0;
  --color-border-dark: #2A3F5A;
  --color-light-bg:    #F8FAFC;
  --color-white:       #FFFFFF;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563EB, #0D9488, #10B981);
  --gradient-subtle:  linear-gradient(135deg, rgba(37,99,235,0.10), rgba(13,148,136,0.10));
  --gradient-text:    linear-gradient(90deg, #2563EB, #10B981);

  /* Typography */
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Spacing scale (8px base) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --ease-default: 0.18s ease;
  --ease-enter:   0.25s cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-exit:    0.18s cubic-bezier(0.4, 0.0, 1, 1);
}

/* ── Reset & Base ─────────────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: 72px; /* matches collapsed header height */
}

body {
  font-family: var(--font-sans);
  background: var(--color-deep);
  color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* ── Top bar ──────────────────────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563EB, #0D9488, #10B981);
  z-index: 999;
}

/* ── Sidebar gradient rules (wide screens only) ───────────────────────── */
@media (min-width: 1300px) {
  body::before,
  body::after {
    content: '';
    position: fixed;
    top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(37, 99, 235, 0.18) 15%,
      rgba(13, 148, 136, 0.14) 55%,
      rgba(16, 185, 129, 0.10) 80%,
      transparent 100%
    );
    pointer-events: none;
    z-index: 101;
  }
  body::before { left: calc(50% - 600px); }
  body::after  { right: calc(50% - 600px); }
}

/* ── Header / Hero ────────────────────────────────────────────────────── */
.header {
  padding: var(--space-20) 0 var(--space-24);
  background: var(--color-deep);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2563EB 25%, #0D9488 60%, #10B981 80%, transparent);
}

.logo-container {
  margin-bottom: var(--space-16);
  text-align: center;
  position: relative;
}

.logo-container::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 220px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.09) 0%, rgba(13,148,136,0.04) 35%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.logo {
  max-width: 344px;
  width: 100%;
  height: auto;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.tagline-mark {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  margin-right: 0.4em;
  position: relative;
  top: -0.05em;
}

.tagline-top {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.9em;
}

.tagline-domains {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
}

.tagline-sep {
  color: #C4511A;
}


.tagline {
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}

/* ── Builds Section ───────────────────────────────────────────────────── */
.builds {
  padding: var(--space-8) 0 var(--space-24);
}

.build {
  padding: var(--space-24) 0;
  border-bottom: 1px solid var(--color-border-dark);
}

.build:last-child {
  border-bottom: none;
}

.build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  margin-bottom: var(--space-16);
}

/* ── Left Column: Content ─────────────────────────────────────────────── */
.build-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  height: 100%;
}

.build-content .build-label + .build-title {
  margin-top: var(--space-4);
}

.build-content .build-title + .build-subtitle {
  margin-top: calc(-1 * var(--space-4));
}

.build-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-teal);
  font-weight: 500;
  border: 1px solid rgba(13, 148, 136, 0.4);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  background: rgba(13, 148, 136, 0.06);
}

.build-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 2px;
}

.build-subtitle {
  font-size: 14px;
  font-style: italic;
  color: var(--color-mist);
  margin-bottom: var(--space-6);
}

/* deffii brand color treatment — matches animation */
.deffii-de { color: var(--color-white); }
.deffii-ff {
  background: linear-gradient(90deg, #3B82F6, #10B981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.deffii-ii { color: var(--color-emerald); }

/* Acronym letter highlight in subtitle */
.acr {
  font-weight: 700;
  font-style: normal;
  color: var(--color-white);
}

.concept,
.verdict {
  margin-top: var(--space-6);
  padding-left: var(--space-5);
  border-left: 2px solid var(--color-teal);
}

.concept h3,
.verdict h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-teal);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.concept p,
.verdict p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-mist);
}

.build-actions {
  margin-top: auto;
}

/* ── Right Column: Visual ─────────────────────────────────────────────── */
.build-visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.visual-container {
  width: 100%;
  height: 830px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #080910;
}

.visual-container iframe {
  width: 100%;
  max-width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Project Embed (expandable) ───────────────────────────────────────── */
.build-embed {
  margin-top: var(--space-12);
}

.embed-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--gradient-primary);
  color: var(--color-deep);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--ease-default);
}

.embed-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.toggle-icon {
  transition: transform var(--ease-default);
  display: inline-block;
}

.embed-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

.embed-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--ease-enter);
}

.embed-container.active {
  max-height: 800px;
}

.embed-container iframe {
  width: 100%;
  height: 700px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-lg);
  background: var(--color-deep);
}

/* ── Build Video ──────────────────────────────────────────────────────── */
.build-video {
  margin-top: var(--space-12);
}

.build-video__heading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-teal);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.build-video__row {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.build-video__player {
  flex: 0 0 min(720px, 100%);
  width: min(720px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-dark);
  background: #080910;
  display: block;
}

.build-video__cta {
  flex: 1;
}

.build-video__cta-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-3);
}

.build-video__cta-sub {
  font-size: 15px;
  color: var(--color-mist);
  line-height: 1.6;
}

/* ── Build placeholder ────────────────────────────────────────────────── */
.build-title--placeholder {
  color: rgba(255, 255, 255, 0.2);
}

#build-002 .build-grid {
  align-items: start;
}

h3.build-title--placeholder {
  text-align: center;
  font-style: italic;
  color: rgba(255, 255, 255, 0.07);
}

.build-coming-soon {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.2);
  font-family: var(--font-mono);
}

.build-subtitle--placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-style: normal;
}

.build-subtitle--placeholder .acr {
  color: rgba(255, 255, 255, 0.4);
}

.visual-container--placeholder {
  height: 200px;
  border-style: dashed;
  background: transparent;
}

/* ── Footer / Contact ─────────────────────────────────────────────────── */
.footer {
  padding: 80px 0 50px;
  background: var(--color-deep);
  border-top: 1px solid var(--color-border-dark);
}

.contact-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-white);
  text-align: center;
}

.contact-link {
  color: var(--color-teal);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--ease-default);
  border-bottom: 1px solid transparent;
}

.contact-link:hover {
  color: var(--color-emerald);
  border-bottom-color: var(--color-emerald);
}

.copyright {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.18);
  text-align: center;
  margin-top: var(--space-6);
  letter-spacing: 0.08em;
}

.footer-mark {
  display: block;
  margin: var(--space-10) auto 0;
  width: 28px;
  opacity: 0.45;
}

/* ── Responsive: Tablet ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .build-grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .logo {
    max-width: 300px;
  }

  .tagline {
    font-size: clamp(13px, 2.5vw, 18px);
    white-space: normal;
    line-height: 1.6;
  }

  .build-title {
    font-size: clamp(20px, 4vw, 28px);
  }

  .build-video__row {
    flex-direction: column;
  }

  .build-video__player {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
}

/* ── Responsive: Mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root {
    --space-8:  24px;
    --space-12: 32px;
    --space-16: 48px;
    --space-20: 56px;
    --space-24: 64px;
  }

  .header {
    padding: var(--space-12) 0 var(--space-16);
  }

  .logo {
    max-width: 240px;
    transform: translateX(-8px);
  }

  .tagline {
    font-size: 12px;
    line-height: 1.7;
    white-space: normal;
    transform: none;
  }

  .tagline-mark {
    height: 1em;
  }

  .build {
    padding: var(--space-16) 0;
  }

  .build-title {
    font-size: 22px;
  }

  .concept p,
  .verdict p {
    font-size: 14px;
  }

  .visual-container {
    height: 830px;
  }

  .contact-text {
    font-size: 14px;
  }
}

/* ── Scroll reveal animations (optional enhancement) ──────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .build {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeInUp 0.6s ease forwards;
  }

  .build:nth-child(1) { animation-delay: 0.1s; }
  .build:nth-child(2) { animation-delay: 0.2s; }
  .build:nth-child(3) { animation-delay: 0.3s; }

  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
