/* Zephyr Boards - shared styles */
:root {
  --bg: #e8e8e6;
  --fg: #0a0a0a;
  --fg-muted: #5a5a5a;
  --line: #c0c0bc;
  --line-strong: #0a0a0a;
  --pink: #ff2d87;
  --pink-soft: #ffe1ee;
  --pink-deep: #d10068;
  --card: #f5f5f3;
  --grid-line: rgba(10, 10, 10, 0.08);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #c8c8c6;
  --fg-muted: #8a8a86;
  --line: #2a2a2a;
  --line-strong: #c8c8c6;
  --pink: #ff2d87;
  --pink-soft: #3a1023;
  --pink-deep: #ff5ea3;
  --card: #141414;
  --grid-line: rgba(200, 200, 198, 0.06);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  min-height: 100vh;
  width: 100%;
  position: relative;
}

* {
  max-width: 100%;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
}

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--pink);
  border-radius: 50%;
  display: inline-block;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 32px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 60px;
}

.nav-logo .logo-mark {
  width: 60px !important;
  height: 60px !important;
  object-fit: contain;
  background: transparent !important;
}

.nav-logo .logo-word {
  height: 70px !important;
  width: auto;
  object-fit: cover;
  object-position: center;
  background: transparent !important;
  transform: scale(2.8);
  margin-left: 40px;
  margin-right: 40px;
}

.nav-logo-mark {
  width: 22px;
  height: 22px;
  position: relative;
  display: inline-block;
}
.nav-logo-mark::before, .nav-logo-mark::after {
  content: '';
  position: absolute;
  background: var(--pink);
}
.nav-logo-mark::before {
  inset: 0 0 0 0;
  width: 22px; height: 4px;
  top: 9px;
  transform: skewX(-20deg);
}
.nav-logo-mark::after {
  width: 4px; height: 22px;
  left: 9px;
  background: var(--fg);
  transform: skewX(-20deg);
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.nav-link:hover { color: var(--pink); }

.nav-link.active {
  background: var(--fg);
  color: var(--bg);
}

.nav-cta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  background: var(--pink);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s;
}
.nav-cta:hover { background: var(--pink-deep); transform: translateY(-1px); }

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

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}
.theme-toggle:hover { border-color: var(--fg); }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}

.mobile-menu-btn span {
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  border-color: var(--fg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 4px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.mobile-menu-link:hover {
  background: var(--line);
  color: var(--pink);
}

.mobile-menu-link.active {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- LAYOUT ---------- */
.page {
  padding-top: 70px;
}

.section {
  padding: 100px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-tight { padding: 60px 32px; }

.grid-bg {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--pink);
  color: #fff;
}
.btn-primary:hover { background: var(--pink-deep); transform: translateY(-2px); }

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

.btn-arrow {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.btn:hover .btn-arrow { transform: rotate(45deg) translate(2px, -2px); }

/* ---------- TYPE SCALE ---------- */
.h-display {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(48px, 8vw, 128px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.h-1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.h-2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.h-3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.body-lg {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 56ch;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 60px 32px 32px;
  margin-top: 80px;
}
.footer-logo {
  max-width: 300px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  clip-path: inset(15% 0);
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.footer-brand-pink { color: var(--pink); }
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 14px; }
.footer-col a:hover { color: var(--pink); }
.footer-bottom {
  max-width: 1400px;
  margin: 60px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- UTIL ---------- */
.pink { color: var(--pink); }
.flex { display: flex; }
.center { display: grid; place-items: center; }

/* Marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--fg);
  color: var(--bg);
}
.marquee-track {
  display: flex;
  gap: 60px;
  padding: 18px 0;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 60px; }
.marquee-track .dot { width: 6px; height: 6px; background: var(--pink); border-radius: 50%; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* fancy noise */
.noise::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Range Slider Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 2px 8px rgba(255, 45, 135, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 45, 135, 0.6);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
  border: 3px solid var(--bg);
  box-shadow: 0 2px 8px rgba(255, 45, 135, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(255, 45, 135, 0.6);
}

/* ---------- TABLET / NON-FULLSCREEN ---------- */
/* ---------- DESKTOP LARGE SCREENS ---------- */
@media (min-width: 769px) {
  .hero > div:last-child {
    max-width: none !important;
  }
}

@media (max-width: 1200px) {
  /* Reduce padding when not fullscreen */
  .section {
    padding: 60px 24px;
  }

  /* Reduce heading sizes for better fit */
  .h-display {
    font-size: clamp(36px, 8vw, 56px) !important;
  }

  .body-lg {
    font-size: 17px !important;
  }

  /* Tighter footer */
  .footer-inner {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px;
  }
}

/* ---------- MOBILE RESPONSIVE ---------- */
@media (max-width: 768px) {
  /* Prevent any overflow */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  body *:not(.hero):not(.hero *) {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  /* Navigation fixes */
  .nav {
    padding: 8px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-logo {
    gap: 8px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }

  .nav-logo .logo-mark {
    width: 45px !important;
    height: 45px !important;
  }

  .nav-logo .logo-word {
    height: 50px !important;
    transform: scale(1.5) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
  }

  .nav-links {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .nav-right {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .nav-cta {
    padding: 6px 10px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  .theme-toggle {
    width: 32px !important;
    height: 32px !important;
  }

  /* Hero section */
  .hero {
    grid-template-columns: 1fr !important;
    padding: 30px 0 20px !important;
    gap: 20px !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    overflow-x: hidden !important;
  }

  .hero > div:first-child {
    padding: 0 16px !important;
  }

  /* Fix 3D board viewer on mobile */
  .hero > div:last-child {
    min-height: 450px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px 0 !important;
    margin: 0 !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .hero > div:last-child > div {
    transform: scale(0.7) !important;
    transform-origin: center center !important;
  }

  .hero canvas {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
  }

  /* Footer */
  .footer {
    padding: 40px 16px 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    width: 100% !important;
  }

  .footer-logo {
    max-width: 180px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 8px !important;
    text-align: center !important;
  }

  /* Sections */
  .section {
    padding: 40px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Force single column layouts on mobile */
  [style*="gridTemplateColumns"],
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Buttons */
  .btn {
    padding: 12px 20px !important;
    font-size: 12px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Flex containers should wrap */
  [style*="display: flex"],
  [style*="display:flex"] {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  /* Type scale */
  .h-display {
    font-size: clamp(28px, 9vw, 48px) !important;
    line-height: 1.1 !important;
  }

  .h-1 {
    font-size: clamp(24px, 7vw, 40px) !important;
    line-height: 1.2 !important;
  }

  .h-2 {
    font-size: clamp(20px, 5vw, 32px) !important;
    line-height: 1.2 !important;
  }

  .h-3 {
    font-size: clamp(16px, 4vw, 24px) !important;
  }

  .body-lg {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  /* Constrain everything */
  .page {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Fix any absolute/fixed positioning overflow */
  [style*="position: absolute"],
  [style*="position:absolute"],
  [style*="position: fixed"],
  [style*="position:fixed"] {
    max-width: calc(100vw - 32px) !important;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .nav {
    padding: 6px 10px !important;
  }

  .nav-logo .logo-word {
    height: 40px !important;
    transform: scale(1.3) !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
  }

  .nav-logo .logo-mark {
    width: 30px !important;
    height: 30px !important;
  }

  .nav-cta {
    padding: 5px 8px !important;
    font-size: 9px !important;
  }

  .footer-logo {
    max-width: 180px !important;
  }

  .section {
    padding: 30px 12px !important;
  }

  .h-display {
    font-size: clamp(24px, 8vw, 36px) !important;
  }

  .h-1 {
    font-size: clamp(20px, 6vw, 32px) !important;
  }
}
