/* ============================================================
   BDE — Bour Design Engineering
   site.css — brutalist dark / chartreuse / Swiss precision blend
   ============================================================ */

:root {
  /* Brand */
  --lime:           #d8ff3c;   /* primary chartreuse accent */
  --lime-deep:      #b8e62b;
  --lime-soft:      #eaffac;

  /* Dark canvas */
  --night:          #0a0a0a;   /* page floor */
  --night-2:        #121212;   /* sections / cards */
  --night-3:        #1a1a1a;   /* elevated cards */
  --night-4:        #232323;   /* hairline strong */
  --hair:           #2a2a2a;   /* default 1px divider on dark */
  --hair-soft:      #1f1f1f;

  /* Light canvas */
  --paper:          #fafaf7;
  --paper-2:        #f3f2ec;
  --hair-light:     #e6e4dc;
  --hair-light-2:   #d2d0c6;

  /* Ink */
  --ink:            #0a0a0a;
  --on-dark:        #f6f6f3;
  --on-dark-mute:   #a6a6a1;
  --on-dark-soft:   #c8c8c2;

  /* Swiss red as stamp */
  --swiss-red:      #d8232a;

  /* Type */
  --font-sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-display: "Archivo", "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", "Source Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur-base: 280ms;
  --dur-slow: 480ms;

  /* Layout */
  --content-max: 1280px;
  --nav-h: 72px;

  /* Theme defaults — dark */
  --bg:        var(--night);
  --bg-2:      var(--night-2);
  --bg-3:      var(--night-3);
  --fg:        var(--on-dark);
  --fg-mute:   var(--on-dark-mute);
  --fg-soft:   var(--on-dark-soft);
  --line:      var(--hair);
  --line-strong: var(--night-4);
}

[data-theme="light"] {
  --bg:        var(--paper);
  --bg-2:      #ffffff;
  --bg-3:      var(--paper-2);
  --fg:        var(--ink);
  --fg-mute:   #6a6a64;
  --fg-soft:   #2a2a2a;
  --line:      var(--hair-light);
  --line-strong: var(--hair-light-2);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

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

/* ----------- Typography -------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  font-weight: 500;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.display-mega { font-size: clamp(64px, 11vw, 184px); }
.display-xl   { font-size: clamp(48px, 7.5vw, 128px); }
.display-lg   { font-size: clamp(40px, 5.5vw, 88px); }
.display-md   { font-size: clamp(28px, 3.6vw, 56px); font-weight: 700; }

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.mono { font-family: var(--font-mono); }
.spec {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  font-feature-settings: "tnum";
}

p.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-soft);
  max-width: 56ch;
}

/* ----------- Layout -------------- */

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

.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }
.section-lg { padding: 128px 0; }

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ----------- Top nav -------------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topnav-inner {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.brand-mark .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  position: relative;
  padding: 6px 2px;
  opacity: 0.85;
  transition: opacity var(--dur-base) var(--ease-out);
}

.nav-links a:hover { opacity: 1; }

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--lime);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 9999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--fg-mute);
  padding: 6px 10px;
  cursor: pointer;
  text-transform: uppercase;
  transition: color var(--dur-base), background var(--dur-base);
}

.lang-switch button.active {
  background: var(--lime);
  color: var(--ink);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--dur-base), color var(--dur-base), background var(--dur-base);
}

.theme-toggle:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* ----------- Mobile burger + dropdown ----------- */

.nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color var(--dur-base);
}
.nav-burger:hover { border-color: var(--lime); }
.nav-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 49;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 24px 24px 48px;
  overflow-y: auto;
  height: calc(100vh - var(--nav-h));
  height: calc(100dvh - var(--nav-h));
  animation: mobile-nav-in 280ms var(--ease-out) both;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-nav nav a {
  font-family: var(--font-display);
  font-size: clamp(22px, 6.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--dur-base);
}
.mobile-nav nav a::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 18px;
  opacity: 0.4;
  transition: transform var(--dur-base), opacity var(--dur-base), color var(--dur-base);
}
.mobile-nav nav a:hover,
.mobile-nav nav a.active { color: var(--lime); }
.mobile-nav nav a.active::after { color: var(--lime); opacity: 1; }
.mobile-nav nav a:hover::after { transform: translateX(4px); opacity: 1; }

@keyframes mobile-nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------- Buttons -------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-primary {
  background: var(--lime);
  color: var(--ink);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 25%, transparent);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.btn-dark {
  background: var(--ink);
  color: var(--on-dark);
  border: 1px solid var(--ink);
}

.arrow-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-base);
}
.arrow-btn:hover { transform: rotate(-12deg) scale(1.05); background: var(--lime); color: var(--ink); }

[data-theme="light"] .arrow-btn { background: var(--ink); color: var(--paper); }

/* ----------- Pill tags -------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  background: transparent;
  transition: border-color var(--dur-base), color var(--dur-base);
}
.pill:hover { border-color: var(--lime); color: var(--lime); }

.pill svg { width: 13px; height: 13px; opacity: 0.7; }

.pill-lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

/* ----------- Hero block (yellow card) -------------- */

.hero-card {
  background: var(--lime);
  color: var(--ink);
  border-radius: 24px;
  padding: 40px 44px 56px;
  position: relative;
  overflow: hidden;
}

.hero-card .display { color: var(--ink); }

/* Hero headline words — responsive, replaces the old fixed 105px inline sizes */
.hero-word {
  font-size: clamp(44px, 7.4vw, 96px);
  display: inline-block;
  line-height: 0.95;
}

/* Stats numbers — responsive, no fixed widths */
.stat-num {
  display: inline-block;
  white-space: nowrap;
}

/* Marquee */

.marquee {
  display: flex;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
  border-block: 1px solid var(--line);
  padding: 24px 0;
  position: relative;
}

[data-theme="light"] .marquee { background: var(--ink); color: var(--paper); }

.marquee-track {
  display: flex;
  gap: 56px;
  flex-shrink: 0;
  animation: marquee 28s linear infinite;
  padding-right: 56px;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-item .star {
  color: var(--lime);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----------- Card patterns -------------- */

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  transition: border-color var(--dur-base), transform var(--dur-base);
}
.card:hover { border-color: var(--lime); }

.work-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out);
}
.work-card:hover { transform: translateY(-4px); }
.work-card:hover .work-overlay { opacity: 1; }
.work-card:hover .work-img { transform: scale(1.04); }

.work-img {
  position: absolute;
  inset: 0;
  transition: transform 600ms var(--ease-out);
}

.work-overlay {
  position: absolute;
  inset: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  color: var(--on-dark);
  opacity: 0.85;
  transition: opacity var(--dur-base);
}

/* ----------- Form -------------- */

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.field input,
.field textarea,
.field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 18px;
  padding: 12px 0;
  resize: vertical;
  transition: border-color var(--dur-base);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--lime);
}

.field input::placeholder, .field textarea::placeholder {
  color: var(--fg-mute);
  opacity: 0.5;
}

/* ----------- Footer -------------- */

.footer {
  background: var(--ink);
  color: var(--on-dark);
  padding: 96px 0 32px;
  border-top: 1px solid var(--hair);
}

[data-theme="light"] .footer { background: var(--ink); color: var(--on-dark); }

.footer-cta {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.footer-cta a {
  color: var(--on-dark);
  border-bottom: 4px solid var(--lime);
  transition: color var(--dur-base);
}
.footer-cta a:hover { color: var(--lime); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-top: 96px;
  padding-top: 56px;
  border-top: 1px solid var(--hair);
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-mute);
  margin: 0 0 20px;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--on-dark);
  font-size: 15px;
  opacity: 0.75;
  transition: opacity var(--dur-base), color var(--dur-base);
}
.footer-col a:hover { opacity: 1; color: var(--lime); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-mute);
}

.swiss-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swiss-mark .cross {
  width: 14px;
  height: 14px;
  background: var(--swiss-red);
  position: relative;
  border-radius: 1px;
}
.swiss-mark .cross::before,
.swiss-mark .cross::after {
  content: "";
  position: absolute;
  background: #fff;
}
.swiss-mark .cross::before {
  top: 5px; bottom: 5px; left: 2px; right: 2px;
}
.swiss-mark .cross::after {
  left: 5px; right: 5px; top: 2px; bottom: 2px;
}

/* ----------- Reveal on scroll -------------- */

@keyframes reveal-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 1; }
.reveal.in { animation: reveal-up 700ms var(--ease-out) both; }

/* ----------- Surreal blob aesthetic -------------- */

.blob {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 30% 35%, #ff8da4 0%, transparent 60%),
    radial-gradient(50% 50% at 70% 30%, #6dd6ff 0%, transparent 60%),
    radial-gradient(70% 60% at 50% 80%, #b08cff 0%, transparent 60%),
    radial-gradient(40% 40% at 85% 70%, #ffb35a 0%, transparent 60%),
    #d8ff3c;
  filter: blur(0.5px) saturate(115%);
}

/* utility: dotted divider row */
.dot-row {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  opacity: 0.5;
}
.dot-row .d {
  width: 6px; height: 6px; background: currentColor; border-radius: 50%;
}

/* Star glyph */
.star-glyph {
  width: 20px; height: 20px; flex-shrink: 0;
}

/* Responsive */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-card { padding: 28px 24px 36px; }
}

/* ============================================================
   MOBILE OPTIMIZATIONS (≤ 720px)
   ============================================================ */
@media (max-width: 720px) {
  :root {
    --nav-h: 60px;
  }

  .container { padding: 0 18px; }
  .section { padding: 64px 0; }
  .section-lg { padding: 80px 0; }
  .section-sm { padding: 40px 0; }

  /* Top nav */
  .topnav-inner { gap: 12px; padding: 0 18px; }
  .brand-mark { font-size: 18px; }
  .brand-mark .mono { display: none; }
  .lang-switch button { padding: 5px 8px; font-size: 10px; }
  .theme-toggle { width: 32px; height: 32px; }

  /* Display type — keep punchy but not page-breakingly huge */
  .display-mega { font-size: clamp(48px, 14vw, 72px) !important; line-height: 0.95; }
  .display-xl   { font-size: clamp(40px, 11vw, 56px) !important; }
  .display-lg   { font-size: clamp(32px, 8.5vw, 44px) !important; }
  .display-md   { font-size: clamp(22px, 5.5vw, 28px) !important; }

  /* Hero */
  .hero-card { padding: 24px 22px 32px; border-radius: 20px; }
  .hero-card h1 br { display: none; }
  .hero-card h1 .hero-word,
  .hero-card h1 span[style*="font-size"] {
    font-size: clamp(40px, 12vw, 64px) !important;
    line-height: 1;
  }

  /* Stats: 2 columns on phone, no fixed widths */
  .stats { grid-template-columns: repeat(2, 1fr) !important; gap: 32px 16px !important; }
  .stat-num {
    font-size: clamp(40px, 14vw, 72px) !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Inline blob in hero — make it block-level so it doesn't fight the headline */
  .hero-card h1 > span:last-child {
    display: block !important;
    margin-top: 12px;
  }

  /* Buttons */
  .btn {
    height: 44px;
    padding: 0 18px;
    font-size: 13px;
  }
  .arrow-btn { width: 48px; height: 48px; }

  /* Marquee — smaller text */
  .marquee { padding: 16px 0; }
  .marquee-item { font-size: clamp(28px, 8vw, 44px); gap: 32px; }
  .marquee-track { gap: 32px; padding-right: 32px; }

  /* Cards */
  .card { padding: 22px; }
  .work-card { aspect-ratio: 4/3 !important; }
  .work-overlay { padding: 16px; }

  /* Footer */
  .footer { padding: 64px 0 24px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 56px;
    padding-top: 40px;
  }
  .footer-cta { font-size: clamp(40px, 13vw, 64px); }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    font-size: 10px;
  }

  /* Pills */
  .pill { height: 28px; padding: 0 12px; font-size: 11px; }

  /* Form fields */
  .field input, .field textarea, .field select { font-size: 16px; /* prevent iOS zoom */ }

  /* Disable hover transforms on touch */
  .work-card:hover, .prod-card:hover, .card:hover {
    transform: none;
  }
}

/* Tap highlight */
a, button { -webkit-tap-highlight-color: transparent; }

/* Smooth horizontal scroll containment */
body { overscroll-behavior-y: none; }

/* ----------- Page transition -------------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* main { animation: fade-up 600ms var(--ease-out); } removed — was hiding above-fold */
