/* Madline Dijital — homepage styles */

:root {
  --bg: #0F1428;
  --bg-2: #1A2035;
  --panel: #232B45;
  --panel-2: #2A335A;
  --line: rgba(248, 250, 252, 0.08);
  --line-strong: rgba(248, 250, 252, 0.14);
  --ink: #F8FAFC;
  --ink-2: #C7D2E0;
  --ink-3: #94A3B8;
  --ink-4: #64748B;

  --orange: #F97316;
  --orange-soft: #FB923C;
  --purple: #8B5CF6;
  --purple-soft: #A78BFA;
  --blue: #3B82F6;
  --teal: #14B8A6;
  --coral: #F43F5E;
  --amber: #F59E0B;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  --font-display: "Outfit", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  --max-w: 1280px;
  --pad-x: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Selection */
::selection { background: rgba(249, 115, 22, 0.35); color: #fff; }

/* ─────────── Typography ─────────── */
.h-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-wrap: balance;
}
.h-section {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
  font-size: clamp(34px, 4.2vw, 56px);
}
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.7);
}
.eyebrow-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-4);
  text-transform: uppercase;
}

/* ─────────── Layout ─────────── */
.shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), background 0.22s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: #0F0A06;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 8px 22px rgba(249, 115, 22, 0.32);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 14px 30px rgba(249, 115, 22, 0.42);
  background: #FB8333;
}
.btn-ghost {
  background: rgba(248, 250, 252, 0.04);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(248, 250, 252, 0.08);
  border-color: rgba(248, 250, 252, 0.22);
  transform: translateY(-1px);
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.22s var(--ease-out);
}
.btn:hover .arrow {
  transform: translateX(3px);
}
.btn-sm {
  height: 40px;
  padding: 0 16px;
  font-size: 13.5px;
  border-radius: 10px;
}

/* ─────────── Reveal animations ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─────────── Common bits ─────────── */
.divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(248, 250, 252, 0.04);
  border: 1px solid var(--line);
}
.tag-orange { color: var(--orange-soft); border-color: rgba(249,115,22,0.28); background: rgba(249,115,22,0.07); }
.tag-purple { color: var(--purple-soft); border-color: rgba(139,92,246,0.28); background: rgba(139,92,246,0.07); }
.tag-blue { color: #93C5FD; border-color: rgba(59,130,246,0.28); background: rgba(59,130,246,0.07); }
.tag-teal { color: #5EEAD4; border-color: rgba(20,184,166,0.28); background: rgba(20,184,166,0.07); }

/* ─────────── Card surface ─────────── */
.card {
  background: linear-gradient(180deg, rgba(35, 43, 69, 0.7), rgba(26, 32, 53, 0.55));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.card-hover {
  transition: transform 0.22s var(--ease-out), border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(248, 250, 252, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ─────────── Background fields ─────────── */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(248,250,252,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(248,250,252,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}
.bg-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ─────────── Hero / atmosphere specifics ─────────── */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  will-change: transform;
}
.glow-orange { background: radial-gradient(circle, rgba(249,115,22,0.42), rgba(249,115,22,0.12) 40%, transparent 70%); }
.glow-purple { background: radial-gradient(circle, rgba(139,92,246,0.42), rgba(139,92,246,0.14) 40%, transparent 70%); }
.glow-blue   { background: radial-gradient(circle, rgba(59,130,246,0.32), rgba(59,130,246,0.10) 40%, transparent 70%); }
.glow-teal   { background: radial-gradient(circle, rgba(20,184,166,0.28), transparent 70%); }

/* CTA pulse used by hero + final CTA */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 -1px 0 rgba(0,0,0,0.18) inset, 0 8px 22px rgba(249,115,22,0.32); }
  50%      { box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 -1px 0 rgba(0,0,0,0.18) inset, 0 14px 38px rgba(249,115,22,0.55); }
}
.cta-pulse { animation: ctaPulse 3.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cta-pulse { animation: none; } }

/* Section divider that fades into the next scene */
.scene-edge {
  position: absolute;
  left: 0; right: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8,12,28,0.4));
}
.scene-edge.top { top: 0; transform: scaleY(-1); }
.scene-edge.bottom { bottom: 0; }

/* ─────────── Nav ─────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  transition: backdrop-filter 0.3s, background 0.3s, border-color 0.3s, padding 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(15, 20, 40, 0.75);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
  padding: 10px 0;
}
.nav-row {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-cta-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(248, 250, 252, 0.04);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  color: var(--ink);
}
.mobile-nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s var(--ease-out), opacity 0.22s var(--ease-out);
}
.mobile-nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-dropdown {
  padding-bottom: 18px;
  margin-bottom: -18px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.18s, background 0.18s;
  position: relative;
}
.nav-link:hover { color: var(--ink); background: rgba(248,250,252,0.04); }
.nav-link-priority {
  color: var(--ink);
  font-weight: 600;
}
.nav-link.has-caret::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0.6;
  margin-left: 2px;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 20, 40, 0.92);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  z-index: 220;
}
.nav-dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  transition: background 0.15s;
}
.nav-dropdown-link:hover {
  background: rgba(248,250,252,0.04);
}
.nav-dropdown-title {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}
.nav-dropdown-note {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link { white-space: nowrap; }
.brand-mark {
  width: 28px;
  height: 28px;
  position: relative;
  flex-shrink: 0;
}
.nav-mobile-actions { display: none; }

/* ─────────── Section spacing ─────────── */
.section {
  position: relative;
  padding: 120px 0;
}
.section-tight { padding: 90px 0; }
.section-wide { padding: 160px 0 120px; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 740px;
  margin: 0 0 56px;
}
.section-head.center {
  align-items: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head p {
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1.55;
  margin: 0;
  text-wrap: pretty;
}

/* ─────────── Utility scroll ─────────── */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
body.nav-open { overflow: hidden; }

/* ─────────── Direction badges (canvas) ─────────── */
.direction-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Print-safe */
@media (max-width: 760px) {
  .nav-row {
    justify-content: space-between;
    gap: 12px;
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .nav-cta-group {
    display: none;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: var(--pad-x);
    right: var(--pad-x);
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    justify-content: flex-start;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: rgba(15, 20, 40, 0.96);
    backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.48);
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
  .nav-links.mobile-open {
    display: flex;
  }
  .nav-item {
    width: 100%;
    display: block;
  }
  .nav-dropdown {
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 14px 10px;
    font-size: 15px;
    border-radius: 10px;
  }
  .nav-dropdown-menu {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    min-width: 100%;
    margin-top: 6px;
    padding: 8px;
    border-radius: 12px;
    box-shadow: none;
    background: rgba(248, 250, 252, 0.03);
  }
  .nav-dropdown-link {
    padding: 12px 10px;
  }
  .nav-mobile-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    list-style: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .nav-mobile-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .hero {
    padding-top: 112px !important;
    padding-bottom: 28px !important;
  }
  .hero h1 {
    font-size: clamp(40px, 13vw, 58px) !important;
    margin: 16px 0 18px !important;
  }
  .hero p {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
  }
  .hero-grid {
    gap: 18px !important;
  }
  .hero-grid > div:last-child {
    margin-left: 0 !important;
    max-width: 420px;
    margin-inline: auto;
  }
  .hero-grid > div:last-child > .reveal {
    display: none;
  }
  :root { --pad-x: 20px; }
  .section { padding: 80px 0; }
}
@media (max-width: 1180px) {
  .nav-link { padding: 7px 9px; font-size: 12.5px; }
  .nav-row { gap: 16px; }
}
@media (max-width: 980px) {
  .nav-link { padding: 6px 7px; font-size: 12px; }
}
