/* ══════════════════════════════════════════════════════════════════
   MATREUM — Landing Page Styles
   Brand: Dark-first, futuristic, structured
   ══════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --carbon:        #0A1628;
  --graphite:      #1E293B;
  --slate:         #64748B;
  --lattice:       #F1F5F9;
  --white:         #FFFFFF;
  --matreum-blue:  #0D47A1;
  --signal-cyan:   #00BCD4;
  --quantum-v:     #7C4DFF;

  /* Derived */
  --carbon-90:     rgba(10, 22, 40, 0.92);
  --graphite-70:   rgba(30, 41, 59, 0.70);
  --graphite-40:   rgba(30, 41, 59, 0.40);
  --cyan-glow:     rgba(0, 188, 212, 0.25);
  --cyan-glow-lg:  rgba(0, 188, 212, 0.15);
  --blue-10:       rgba(13, 71, 161, 0.10);
  --gradient-main: linear-gradient(135deg, var(--matreum-blue), var(--signal-cyan));
  --gradient-accent: linear-gradient(135deg, var(--matreum-blue), var(--quantum-v), var(--signal-cyan));

  /* Typography */
  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-body:    'General Sans', 'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Spacing */
  --section-pad: 96px;
  --container-max: 1140px;
  --card-radius: 12px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  scroll-snap-type: y proximity;
  height: 100%;
  background: #060F1C;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--lattice);
  background: #060F1C;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body > .section:last-of-type {
  flex: 1;
}
body > .footer {
  margin-top: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ─── Typography ────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 500; }

/* ─── Scroll Reveal ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── NAVBAR ────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--carbon-90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--matreum-blue), var(--signal-cyan)) 1;
  transition: background 0.3s ease;
}

.nav-container {
  max-width: 100%;
  margin: 0;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo lockup — uses actual brand asset PNGs */
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--slate);
  letter-spacing: 0.01em;
  transition: color 0.25s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s ease;
}
.nav-links a:hover {
  color: var(--white);
}
.nav-links a:hover::after {
  width: 100%;
}

/* Nav CTA */
.nav-cta {
  padding: 8px 20px !important;
  border: 1px solid var(--signal-cyan);
  border-radius: 6px;
  color: var(--signal-cyan) !important;
  transition: all 0.3s ease !important;
}
.nav-cta:hover {
  background: var(--signal-cyan) !important;
  color: var(--white) !important;
  box-shadow: 0 0 20px var(--cyan-glow);
}
.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: all 0.3s ease;
}
.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--carbon);
  scroll-snap-align: start;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

#heroCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  padding: 0 24px;
}

.hero-title {
  font-family: 'Exo 2', 'Space Grotesk', sans-serif;
  color: var(--white);
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--white) 0%, var(--signal-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--slate);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--signal-cyan);
  color: var(--carbon);
}
.btn-primary:hover {
  background: #26C6DA;
  box-shadow: 0 0 30px var(--cyan-glow), 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--graphite-40);
}
.btn-ghost:hover {
  color: var(--white);
  border-color: var(--slate);
}

.arrow-down {
  display: inline-block;
  animation: float 2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ─── SECTIONS ──────────────────────────────────────────────────── */
.section {
  padding: var(--section-pad) 0;
  position: relative;
  scroll-snap-align: start;
  background: var(--carbon);
}
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 900px);
  height: 1px;
  background: var(--gradient-main);
  opacity: 0.25;
}
.section:first-of-type::before {
  display: none;
}
.section-alt {
  background: var(--graphite);
}
.section-title {
  color: var(--white);
  text-align: center;
  margin-bottom: 16px;
}
.section-subtitle {
  text-align: center;
  color: var(--slate);
  max-width: 600px;
  margin: 0 auto 60px;
  font-size: 17px;
}

/* ─── SERVICES CARDS ────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  background: var(--graphite-70);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(100, 116, 139, 0.15);
  border-radius: var(--card-radius);
  padding: 36px 32px 40px;
  overflow: hidden;
  transition: all 0.4s ease;
}
.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--card-radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(0, 188, 212, 0.15) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover::before {
  opacity: 1;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 188, 212, 0.3);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 0 30px var(--cyan-glow-lg);
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--signal-cyan);
}
.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-title {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 19px;
}

.card-desc {
  color: var(--slate);
  font-size: 15px;
  line-height: 1.65;
}

.card-border {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover .card-border {
  opacity: 1;
}

/* ─── APPROACH PIPELINE ─────────────────────────────────────────── */
.approach-pipeline {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.approach-step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 0 24px;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--signal-cyan);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.step-title {
  color: var(--white);
  font-size: 24px;
  margin-bottom: 14px;
}
.step-desc {
  color: var(--slate);
  font-size: 15px;
  line-height: 1.65;
}

.approach-connector {
  width: 80px;
  min-width: 40px;
  height: 2px;
  background: var(--gradient-main);
  margin-top: 42px;
  flex-shrink: 0;
  position: relative;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.approach-connector.visible {
  transform: scaleX(1);
}
.approach-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--signal-cyan);
  border-top: 2px solid var(--signal-cyan);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.3s ease 0.5s;
}
.approach-connector.visible::after {
  opacity: 1;
}

/* ─── INDUSTRIES ────────────────────────────────────────────────── */
.industries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.industry-card {
  background: var(--graphite-70);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(100, 116, 139, 0.15);
  border-radius: var(--card-radius);
  padding: 32px;
  transition: all 0.4s ease;
}
.industry-card:hover {
  border-color: rgba(0, 188, 212, 0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.industry-featured {
  grid-column: 1 / -1;
  border-color: rgba(0, 188, 212, 0.2);
  background: linear-gradient(135deg, var(--graphite-70), rgba(13, 71, 161, 0.08));
  position: relative;
}

.industry-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-cyan);
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid rgba(0, 188, 212, 0.2);
  border-radius: 4px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.industry-title {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 20px;
}

.industry-desc {
  color: var(--slate);
  font-size: 15px;
  line-height: 1.65;
}

.industry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.industry-tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lattice);
  background: var(--graphite-40);
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 4px;
  padding: 4px 12px;
}

/* ─── CASE STUDIES ─────────────────────────────────────────────── */
.case-studies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.case-card {
  display: block;
  position: relative;
  background: var(--graphite);
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: var(--card-radius);
  padding: 36px 32px 40px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: all 0.4s ease;
}
.case-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--card-radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(0, 188, 212, 0.15) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.case-card:hover::before {
  opacity: 1;
}
.case-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 188, 212, 0.3);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 0 30px var(--cyan-glow-lg);
}

.case-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 20px;
}

.case-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(100, 116, 139, 0.15);
  margin-bottom: 20px;
  overflow: hidden;
}
.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.22);
}

.case-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-cyan);
  margin-bottom: 0;
}

.case-border {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.case-card:hover .case-border {
  opacity: 1;
}

.case-back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  padding: 6px 14px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 6px;
  transition: all 0.3s ease;
}
.case-back-link:hover {
  color: var(--signal-cyan);
  border-color: rgba(0, 188, 212, 0.3);
}

/* ─── DIFFERENTIATORS ───────────────────────────────────────────── */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.diff-item {
  display: flex;
  gap: 20px;
  padding: 28px 24px;
  border-radius: var(--card-radius);
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}
.diff-item:hover {
  border-color: rgba(100, 116, 139, 0.15);
  background: rgba(30, 41, 59, 0.5);
}

.diff-accent {
  width: 3px;
  min-height: 100%;
  background: var(--gradient-main);
  border-radius: 2px;
  flex-shrink: 0;
}

.diff-title {
  color: var(--white);
  font-size: 18px;
  margin-bottom: 8px;
}

.diff-desc {
  color: var(--slate);
  font-size: 15px;
  line-height: 1.6;
}

/* ─── FOOTER ────────────────────────────────────────────────────── */
.footer {
  background: #060F1C;
  padding: 0 0 40px;
  scroll-snap-align: end;
}

.footer-gradient-line {
  height: 2px;
  background: var(--gradient-main);
  margin-bottom: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-logo {
  margin-bottom: 20px;
}
.footer-logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.footer-copy {
  font-size: 13px;
  color: var(--slate);
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-link {
  display: block;
  font-size: 15px;
  color: var(--slate);
  margin-bottom: 10px;
  transition: color 0.25s ease;
}
.footer-link:hover {
  color: var(--signal-cyan);
}

/* ─── RESPONSIVE ────────────────────────────────────────────────── */

@media (max-width: 768px) {
  :root {
    --section-pad: 80px;
  }

  /* Nav */
  .nav-hamburger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    width: 260px;
    height: calc(100vh - var(--nav-height));
    background: var(--carbon);
    flex-direction: column;
    padding: 40px 32px;
    gap: 24px;
    border-left: 1px solid var(--graphite-40);
    transition: right 0.35s ease;
  }
  .nav-links.open {
    right: 0;
  }
  .nav-links a::after { display: none; }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Approach */
  .approach-pipeline {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .approach-step {
    max-width: 100%;
  }
  .approach-connector {
    width: 2px;
    height: 40px;
    margin: 16px 0;
    transform: scaleY(0);
    transform-origin: top;
  }
  .approach-connector.visible {
    transform: scaleY(1);
  }
  .approach-connector::after {
    right: -3px;
    top: auto;
    bottom: -4px;
    transform: rotate(135deg);
  }

  /* Industries */
  .industries-grid {
    grid-template-columns: 1fr;
  }
  .industry-featured {
    grid-column: auto;
  }

  /* Case Studies */
  .case-card {
    padding: 24px 20px;
  }

  /* Differentiators */
  .diff-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 40px;
  }

  /* Shrink nav logo on tablet */
  .nav-logo-img {
    height: 48px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-pad: 60px;
    --nav-height: 64px;
  }

  .nav-logo-img {
    height: 40px;
  }

  .hero-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 28px 20px 32px;
  }

  .footer-logo-img {
    height: 80px;
  }
}
