/* ============================================
   GLADIOZ — Shared styles
   ============================================ */

:root {
  --paper: oklch(0.975 0.012 82);
  --paper-2: oklch(0.945 0.018 78);
  --paper-3: oklch(0.91 0.022 75);
  --ink: oklch(0.18 0.035 262);
  --ink-2: oklch(0.32 0.04 262);
  --ink-3: oklch(0.55 0.03 262);
  --indigo: oklch(0.42 0.13 264);
  --indigo-deep: oklch(0.28 0.11 264);
  --maroon: #7A1F2E;
  --maroon-deep: #5C141F;
  --rule: oklch(0.82 0.02 75);
  --shadow: 0 1px 0 oklch(0.82 0.02 75), 0 20px 40px -20px oklch(0.18 0.035 262 / 0.18);
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
  position: relative;
}

/* Paper texture overlay — subtle */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(ellipse at 20% 10%, oklch(0.85 0.04 60 / 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 80%, oklch(0.85 0.04 280 / 0.08), transparent 50%);
  mix-blend-mode: multiply;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.35;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.15 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

main, header, footer, section { position: relative; z-index: 3; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ========== Typography ========== */

.display {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 0.92;
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 1;
}

.serif {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 32, 'SOFT' 50, 'WONK' 1;
}

.serif-italic {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: 'opsz' 32, 'SOFT' 100, 'WONK' 1;
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
}

.mono-sm { font-size: 0.62rem; letter-spacing: 0.18em; }

/* ========== Layout ========== */

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
}

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

/* ========== Header / Nav ========== */

.nav {
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 100;
  background: oklch(0.975 0.012 82 / 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
  will-change: transform;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 64px);
  max-width: 1440px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: none;
}

.brand-name {
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 1;
}

.brand-name em {
  font-style: italic;
  color: var(--maroon);
  font-weight: 400;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
}

.nav-links a.active { color: var(--maroon); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.3s ease, background 0.3s ease;
}

.nav-cta:hover {
  background: var(--indigo);
  transform: translateY(-1px);
}

.nav-cta::after { content: '↗'; transition: transform 0.3s ease; }
.nav-cta:hover::after { transform: translate(2px, -2px); }

/* Mobile nav toggle button (animated bars) */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
  position: relative;
  z-index: 110;
}
.nav-toggle-bars {
  display: block;
  position: relative;
  width: 22px;
  height: 14px;
}
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.6px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1),
              opacity 0.25s ease,
              top 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }
.nav-toggle.active .nav-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle.active .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle.active .nav-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Mobile drawer + backdrop — hidden on desktop */
.nav-backdrop,
.nav-drawer { display: none; }

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
  /* Hide hamburger button while the drawer is open — the drawer has its own
     close button, otherwise two ✕ icons appear in the corner. */
  body.nav-open .nav-toggle { display: none; }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: oklch(0.18 0.035 262 / 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 105;
    pointer-events: none;
    transition: background 0.45s ease, backdrop-filter 0.45s ease;
  }
  .nav-backdrop.open {
    background: oklch(0.18 0.035 262 / 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto;
  }

  .nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(86vw, 380px);
    background: var(--paper);
    border-left: 1px solid var(--rule);
    box-shadow: -30px 0 60px -20px oklch(0.18 0.035 262 / 0.25);
    z-index: 108;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 18px 26px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-drawer.open { transform: translateX(0); }

  .drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--rule);
    padding-block: 6px 14px;
  }
  .drawer-head .brand { font-size: 1.2rem; }
  .drawer-head .brand-mark { width: 38px; height: 38px; }

  .drawer-close {
    background: none;
    border: 1px solid var(--rule);
    width: 38px; height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--ink);
    transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
  }
  .drawer-close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

  .drawer-eyebrow { display: block; margin-bottom: 14px; color: var(--ink-3); }

  .drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
  }
  .drawer-links li {
    border-bottom: 1px solid var(--rule);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-drawer.open .drawer-links li {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(var(--i, 0) * 0.06s + 0.12s);
  }

  .drawer-links a {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: baseline;
    gap: 14px;
    padding: 18px 4px;
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--ink);
    font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 1;
    transition: color 0.3s ease, padding-left 0.3s ease;
  }
  .drawer-links a:hover { color: var(--maroon); padding-left: 8px; }
  .drawer-links a.active { color: var(--maroon); font-style: italic; font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; }

  .drawer-links .dl-num { color: var(--ink-3); font-size: 0.6rem; align-self: center; }
  .drawer-links .dl-arrow {
    align-self: center;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink-3);
    transition: transform 0.3s ease, color 0.3s ease;
  }
  .drawer-links a:hover .dl-arrow { transform: translateX(6px); color: var(--maroon); }

  .drawer-foot {
    margin-top: auto;
    padding-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .nav-drawer.open .drawer-foot {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
  }
  .drawer-commission {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
  }
  .drawer-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 999px;
    background: #25D366;
    color: white;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.3s ease;
  }
  .drawer-wa:hover { background: #1ebe5a; transform: translateY(-1px); }
  .drawer-wa svg { fill: currentColor; }

  .drawer-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    color: var(--ink-3);
  }
  .drawer-meta a { color: inherit; }
  .drawer-meta a:hover { color: var(--maroon); }

  /* Lock body scroll while drawer is open */
  body.nav-open { overflow: hidden; }
}

/* ========== Buttons ========== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 0;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  font-family: var(--sans);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--indigo); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-maroon {
  background: var(--maroon);
  color: var(--paper);
}
.btn-maroon:hover { background: var(--maroon-deep); transform: translateY(-2px); }

.btn-wa {
  background: #25D366;
  color: white;
}
.btn-wa:hover { background: #1ebe5a; transform: translateY(-2px); }

/* ========== Footer ========== */

footer.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 28px;
  margin-top: 120px;
  position: relative;
  z-index: 4;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid oklch(1 0 0 / 0.12);
}

.foot-grid h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(1 0 0 / 0.5);
  margin-bottom: 16px;
  font-weight: 500;
}

.foot-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-grid a {
  font-size: 0.92rem;
  color: oklch(1 0 0 / 0.85);
  transition: color 0.3s;
}
.foot-grid a:hover { color: var(--maroon); }

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 16px;
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 1;
}
.foot-brand em { color: var(--maroon); font-style: italic; }
.foot-brand-mark {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.foot-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: oklch(1 0 0 / 0.7);
  max-width: 32ch;
  font-size: 1.05rem;
}

.foot-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: oklch(1 0 0 / 0.5);
  flex-wrap: wrap;
  gap: 12px;
}

.foot-socials {
  display: flex;
  gap: 14px;
}
.foot-socials a {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid oklch(1 0 0 / 0.2);
  border-radius: 50%;
  transition: all 0.3s;
}
.foot-socials a:hover { background: var(--maroon); border-color: var(--maroon); transform: translateY(-2px); }
.foot-socials svg { width: 14px; height: 14px; fill: currentColor; }

@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ========== Reveal animations ========== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
.reveal.delay-5 { transition-delay: 0.4s; }

@keyframes inkBleed {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========== Marquee ========== */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 22px 0;
}
.marquee-track {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: scroll 50s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-style: italic;
  color: var(--ink);
  font-weight: 300;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.marquee-track .dot {
  color: var(--maroon);
  font-style: normal;
  align-self: center;
}
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========== Page hero (subpages) ========== */

.page-hero {
  padding: 100px 0 60px;
  position: relative;
}
.page-hero .label {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.page-hero .label::before {
  content: ''; width: 40px; height: 1px; background: var(--maroon);
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 1;
  max-width: 16ch;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--maroon);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.page-hero .lede {
  margin-top: 32px;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
  font-weight: 300;
}
