/* ═══════════════════════════════════════════════════════
   DESTROLA — LAYOUT
   Nav · Footer · Grid · Hero · Sections
═══════════════════════════════════════════════════════ */

/* ─── ANNOUNCEMENT BANNER ────────────────────────────── */
.announce-bar {
  background: var(--accent);
  border-bottom: none;
  padding: 10px var(--gutter);
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.announce-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: #fff;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms, color 200ms, transform 150ms;
}
.announce-btn:hover { background: var(--fg-primary); transform: translateY(-1px); }

/* ─── NAVIGATION ─────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(17,38,21,0.6);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: backdrop-filter 300ms, border-color 300ms, background 300ms;
}
.nav.scrolled {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(17,38,21,0.88);
  border-color: var(--border-subtle);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-primary);
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 300ms var(--ease-smooth);
}
.nav.scrolled .nav-logo { transform: scale(0.93); transform-origin: left center; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  list-style: none;
}
.nav-item { position: relative; }
.nav-link {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: color 200ms;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-link:hover, .nav-item:hover > .nav-link { color: var(--fg-primary); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.95);
  transform-origin: top center;
  opacity: 0;
  pointer-events: none;
  transition: transform 250ms var(--ease-smooth), opacity 200ms var(--ease-smooth);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: var(--sp-2);
  min-width: 210px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--fg-secondary);
  transition: background 150ms, color 150ms;
}
.nav-dropdown a:hover {
  background: rgba(242,229,225,0.05);
  color: var(--fg-primary);
}
.nav-dropdown .dropdown-label {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 8px 14px 4px;
  display: block;
}
.nav-caret { opacity: 0.5; font-size: 0.7em; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}
.nav-login {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--fg-muted);
  transition: color 200ms;
}
.nav-login:hover { color: var(--fg-primary); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg-primary);
  border-radius: 1px;
  transition: transform 300ms var(--ease-smooth), opacity 200ms;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  transform: translateX(-100%);
  transition: transform 400ms var(--ease-smooth);
  padding: calc(var(--nav-h) + var(--sp-6)) var(--sp-6) var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
/* Film-grain texture so the open menu matches the rest of the site */
.mobile-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.mobile-menu > *:not(.mobile-menu-close) { position: relative; z-index: 1; }
.mobile-menu.open { transform: translateX(0); }

/* Nav links */
.mobile-menu a {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--fg-primary);
  padding: var(--sp-3) var(--sp-1);
  border-bottom: 1px solid var(--border-subtle);
  display: block;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 300ms var(--ease-smooth), transform 300ms var(--ease-smooth), color 200ms;
}
.mobile-menu.open a { opacity: 1; transform: translateX(0); }
.mobile-menu.open a:nth-child(1) { transition-delay: 40ms; }
.mobile-menu.open a:nth-child(2) { transition-delay: 80ms; }
.mobile-menu.open a:nth-child(3) { transition-delay: 120ms; }
.mobile-menu.open a:nth-child(4) { transition-delay: 160ms; }
.mobile-menu.open a:nth-child(5) { transition-delay: 200ms; }
.mobile-menu.open a:nth-child(6) { transition-delay: 240ms; }
.mobile-menu a:hover { color: var(--accent); }

/* Sign In — pulled out of the nav-link list into its own button at the bottom */
.mobile-menu a[href="/account/"] {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--fg-secondary);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: var(--sp-3);
  margin-top: auto;
}
.mobile-menu a[href="/account/"]:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer CTA — full width, never overflows the screen */
.mobile-menu-footer {
  margin-top: var(--sp-3);
  padding-top: 0;
}
.mobile-menu-footer .btn {
  display: flex !important;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  white-space: normal;
  font-size: var(--text-base);
}

/* Close button (injected by main.js) */
.mobile-menu-close {
  position: absolute;
  top: max(var(--sp-4), calc((var(--nav-h) - 40px) / 2));
  right: var(--sp-6);
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  color: var(--fg-primary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 180ms, color 180ms;
}
.mobile-menu-close:hover { border-color: var(--accent); color: var(--accent); }

/* Lock background scroll while the menu is open (incl. iOS) */
html.menu-open,
html.menu-open body { overflow: hidden; }

/* ─── HERO SECTION ───────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  align-items: center;
  padding-top: clamp(60px, 8vw, 100px);
  padding-bottom: clamp(60px, 8vw, 100px);
  overflow: hidden;
}
.hero-left { display: flex; flex-direction: column; gap: var(--sp-8); }
.hero-right {
  position: relative;
  height: clamp(540px, 72vh, 740px);
}

/* Full-width hero (single column) */
.hero-full {
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--sp-8);
}

.hero-eyebrow { margin-bottom: 0; }
.hero-heading { margin: 0; }
.hero-sub {
  color: var(--fg-secondary);
  font-size: var(--text-lg);
  max-width: 52ch;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ─── MARQUEE STRIPS ─────────────────────────────────── */
.marquee-section {
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  background: var(--bg-surface);
  position: relative;
}
.marquee-section::before,
.marquee-section::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.marquee-section::before { left: 0; background: linear-gradient(90deg, var(--bg-surface) 0%, transparent 100%); }
.marquee-section::after  { right: 0; background: linear-gradient(270deg, var(--bg-surface) 0%, transparent 100%); }

/* Orange marquee variant */
.marquee-orange {
  background: var(--accent);
  border-color: var(--accent-hover);
}
.marquee-orange::before { background: linear-gradient(90deg, var(--accent) 0%, transparent 100%); }
.marquee-orange::after  { background: linear-gradient(270deg, var(--accent) 0%, transparent 100%); }

/* Dark marquee variant */
.marquee-dark {
  background: var(--bg-surface);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
  will-change: transform;
}
.marquee-section:hover .marquee-track { animation-play-state: paused; }

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

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-6);
  padding: 0 var(--sp-6);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}
.marquee-item .sep { color: var(--accent); opacity: 0.6; }

.marquee-orange .marquee-item { color: var(--bg-primary); }
.marquee-dark .marquee-item { color: var(--fg-secondary); }

/* ─── SECTION GRIDS ──────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--col-gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--col-gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--col-gap); }
.grid-doctrine { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-6); }

/* ─── DARK SECTION ───────────────────────────────────── */
.section-dark {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(24px, 3vw, 40px);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--sp-12);
  padding-bottom: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(32px, 5vw, 48px);
  border-bottom: 1px solid var(--border-subtle);
}
.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-primary);
  display: block;
  margin-bottom: var(--sp-3);
}
.footer-brand .footer-tagline {
  font-size: var(--text-base);
  color: var(--fg-muted);
  max-width: 24ch;
  line-height: 1.65;
}
.footer-col h5 {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: var(--sp-5);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col ul li a {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--fg-secondary);
  transition: color 150ms;
}
.footer-col ul li a:hover { color: var(--fg-primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  flex-wrap: wrap;
}
.footer-copy {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}
.footer-legal {
  display: flex;
  gap: var(--sp-6);
  list-style: none;
}
.footer-legal li a {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  transition: color 150ms;
}
.footer-legal li a:hover { color: var(--accent); }

/* ─── MOBILE RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}

@media (max-width: 600px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; direction: ltr; gap: var(--sp-8); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-login  { display: none; }
  .nav-actions .btn { display: none; }
  .nav-actions .nav-signin { display: none; }
  .hamburger { display: flex; }

  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 40px; }
  .hero-right { height: 540px; margin-top: var(--sp-8); }
  .grid-2, .grid-3, .grid-doctrine { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
