/* ═══════════════════════════════════════════════════
   DRAUPNIR CAPITAL — Shared Stylesheet
   All pages import this file.
═══════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   CSS VARIABLES
───────────────────────────────────────── */
:root {
  --bg-dark:        #0a0a0a;
  --bg-section:     #0d0d0f;
  --bg-card:        #141418;

  --bordeaux-darkest: #3a0812;
  --bordeaux-dark:    #5c1228;
  --bordeaux-mid:     #7a1a34;
  --bordeaux-light:   #8C193C;
  --bordeaux-lightest:#a82248;
  --bordeaux-rose:    #AE3D5F;   /* brand "Rose Bordeaux" — best accent for small text on dark */

  --gold-light:     #D4B76A;
  --gold-primary:   #B8964A;

  --white:          #ffffff;
  --text-primary:   rgba(255,255,255,1);
  --text-secondary: rgba(255,255,255,0.82);
  --text-muted:     rgba(255,255,255,0.72);
  --text-subtle:    rgba(255,255,255,0.55);

  /* Brand type system (per brand guidelines):
     Source Serif 4 for display/headings, Source Sans 3 for body + UI */
  --font-display:   'Source Serif 4', 'Satoshi', Georgia, serif;
  --font-ui:        'Source Sans 3', 'Satoshi', 'Open Sans', sans-serif;
  --font-body:      'Source Sans 3', 'Open Sans', sans-serif;

  --border-card:    1px solid rgba(255,255,255,0.06);
  --border-input:   1px solid rgba(255,255,255,0.1);

  --radius-card:    12px;
  --radius-btn:     8px;
  --radius-input:   8px;
  --radius-icon:    10px;

  /* Card depth — top inner highlight + soft ambient shadow */
  --card-highlight: inset 0 1px 0 rgba(255,255,255,0.05);
  --card-shadow:    0 12px 32px -16px rgba(0,0,0,0.55);

  --grad-btn:       linear-gradient(135deg, #3a0812 0%, #7a1a34 100%);

  --z-particles:    5;
  --z-content:      10;
  --z-header:       100;
  --z-mobile-menu:  99;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

/* ─────────────────────────────────────────
   PARTICLES
───────────────────────────────────────── */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-particles);
  overflow: hidden;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  50%       { transform: translateY(-20px) rotate(5deg); opacity: 0.25; }
}

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
.label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--bordeaux-rose);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--white);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--white);
}

.body-large {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.body-text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
}

.accent { color: var(--bordeaux-light); }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--grad-btn); color: var(--white); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(90,18,40,0.55);
}
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.22);
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

/* Gold CTA — reserved for premium consultation CTAs (brand guidelines §07) */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-light) 100%);
  color: #19191C;
  font-weight: 700;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(184,150,74,0.35);
}

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  position: relative;
  z-index: var(--z-content);
  padding: 80px 0;
}

.section-alt { background: var(--bg-section); }

/* ─────────────────────────────────────────
   SECTION GLOW — faint bordeaux radial light source
   Apply .section-glow to key sections (hero, stats, CTA).
───────────────────────────────────────── */
.section-glow { overflow: hidden; }
.section-glow::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 100%);
  height: 130%;
  background: radial-gradient(ellipse 55% 45% at 50% 30%, rgba(140,25,60,0.14) 0%, rgba(140,25,60,0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.section-glow > * { position: relative; z-index: 1; }

/* ─────────────────────────────────────────
   INNER PAGE HERO (used on all non-home pages)
───────────────────────────────────────── */
.page-hero {
  position: relative;
  z-index: var(--z-content);
  background: var(--bg-dark);
  padding: 150px 0 70px;
  border-bottom: var(--border-card);
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 180%;
  background: radial-gradient(ellipse 50% 40% at 60% 45%, rgba(140,25,60,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-inner {
  max-width: 680px;
}

.page-hero .label {
  margin-bottom: 16px;
}

.page-hero .page-title {
  margin-bottom: 20px;
}

.page-hero-sub {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 560px;
}

/* ─────────────────────────────────────────
   HEADER / NAV
───────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  padding: 20px 0;
  transition: background 0.35s ease, border-bottom 0.35s ease, padding 0.35s ease;
}

#header.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 32px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); }

/* Underline-grow hover on nav links (not the Contact button) */
.nav-links a:not(.btn) {
  position: relative;
  padding-bottom: 3px;
}
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--bordeaux-rose);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after { transform: scaleX(1); }
.nav-links .btn { padding: 10px 22px; }

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

/* Mobile menu */
#mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.97);
  z-index: var(--z-mobile-menu);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transition: opacity 0.3s;
}
#mobile-menu.open { display: flex; opacity: 1; }
#mobile-menu a {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
}
#mobile-menu .close-btn {
  position: absolute;
  top: 24px; right: 24px;
  background: none; border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* ─────────────────────────────────────────
   ICON BOXES (shared)
───────────────────────────────────────── */
.icon-box {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(58,8,18,0.7), rgba(122,26,52,0.2));
  border: 1px solid rgba(140,25,60,0.25);
  border-radius: var(--radius-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-box svg {
  width: 22px; height: 22px;
  stroke: var(--bordeaux-light);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─────────────────────────────────────────
   FORMS (shared)
───────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-group label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.04);
  border: var(--border-input);
  border-radius: var(--radius-btn);
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-group select option { background: var(--bg-card); color: var(--white); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(140,25,60,0.5);
  background: rgba(140,25,60,0.04);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.25); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-submit { width: 100%; justify-content: center; margin-top: 8px; }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
#footer {
  background: var(--bg-dark);
  border-top: var(--border-card);
  padding: 56px 0 36px;
  position: relative;
  z-index: var(--z-content);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 48px;
  gap: 40px;
}
.footer-brand img { height: 28px; width: auto; margin-bottom: 14px; }
.footer-tagline { font-size: 13px; color: var(--text-subtle); max-width: 240px; line-height: 1.6; }
.footer-nav h4 {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 16px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 14px; color: var(--text-muted); transition: color 0.2s; }
.footer-nav a:hover { color: var(--white); }
.footer-social { display: flex; gap: 12px; margin-top: 24px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: var(--border-card);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.social-link:hover {
  border-color: rgba(140,25,60,0.4);
  background: rgba(140,25,60,0.08);
}
.social-link svg { width: 15px; height: 15px; fill: var(--text-muted); transition: fill 0.2s; }
.social-link:hover svg { fill: var(--bordeaux-light); }
.footer-disclaimer {
  padding-top: 28px;
  border-top: var(--border-card);
  margin-bottom: 28px;
}
.footer-disclaimer h4 {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 10px;
}
.footer-disclaimer p {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-subtle);
  max-width: 980px;
  margin-bottom: 8px;
}
.footer-disclaimer p:last-child { margin-bottom: 0; }

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(184,150,74,0.22); /* slim gold divider */
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 12px; color: var(--text-subtle); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 12px; color: var(--text-subtle); transition: color 0.2s; }
.footer-legal a:hover { color: var(--text-muted); }

/* ─────────────────────────────────────────
   CTA BAND (used on solutions, case studies)
───────────────────────────────────────── */
.cta-band {
  background: var(--bg-section);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band .section-title { margin-bottom: 14px; }
.cta-band .body-text { max-width: 480px; margin: 0 auto 36px; }

/* Signet watermark behind CTA content */
.cta-band::after {
  content: '';
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 443px;
  background: url("draupnir_logo_bordeaux 2/SVG/sign_bordeaux.svg") no-repeat center / contain;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.cta-band .container { position: relative; z-index: 1; }

/* ─────────────────────────────────────────
   CARD DEPTH — shared surface treatment.
   Top inner highlight + ambient shadow so cards read as
   physical surfaces; hover lifts with an accent-border glow.
───────────────────────────────────────── */
.card-surface {
  background: var(--bg-card);
  border: var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--card-highlight), var(--card-shadow);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card-surface:hover {
  transform: translateY(-4px);
  border-color: rgba(174,61,95,0.35);
  box-shadow: var(--card-highlight), 0 18px 44px -18px rgba(0,0,0,0.65), 0 0 32px rgba(90,18,40,0.18);
}

/* ─────────────────────────────────────────
   PARTNER LOGO BAR — monochrome wordmarks.
   Swap the <span> inside .partner-logo for an official
   SVG/<img> when assets arrive; sizing will hold.
───────────────────────────────────────── */
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 12px;
  white-space: nowrap;
  opacity: 0.55;
  filter: grayscale(1);
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.partner-logo:hover { opacity: 1; filter: grayscale(0); }
.partner-logo img { height: 28px; width: auto; }
.partner-logo span {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}
.partner-logo span em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

/* ─────────────────────────────────────────
   STAT COUNT-UPS (shared)
───────────────────────────────────────── */
.stat-value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-subtle);
  margin-top: 6px;
}

/* ─────────────────────────────────────────
   KEYBOARD FOCUS — visible on all interactive elements
───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--bordeaux-rose);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 2px; }

/* ─────────────────────────────────────────
   SCROLL FADE-UP ANIMATION
───────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .section { padding: 60px 0; }
  .page-hero { padding: 124px 0 56px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-top { flex-direction: column; gap: 36px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   REDUCED MOTION — honour the visitor's OS "reduce motion" setting.
   Reveals show instantly, the ambient particle field is removed, and
   decorative animation/transition motion is neutralised. The hero
   video is paused from JS (see index.html) so its poster stays visible.
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  /* Reveal content immediately — no fade / transform */
  .fade-up { opacity: 1 !important; transform: none !important; transition: none !important; }

  /* Stop the ambient particle field entirely */
  #particles { display: none !important; }

  /* Neutralise all decorative animation + transition motion */
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
