/* ═══════════════════════════════════════════════
   BLADE & FADE — Shared Stylesheet
   Wexlar Studios
   Optimised: mobile-first, performance-tuned
═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,700;0,800;1,400;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

/* ── TOKENS ── */
:root {
  --cream:   #F7F3EC;
  --cream2:  #EDE6D8;
  --cream3:  #DDD4C0;
  --navy:    #1A2B4A;
  --navy2:   #243958;
  --gold:    #C9A84C;
  --gold2:   #B8922E;
  --charcoal:#1C1C1A;
  --mid:     #5A574F;
  --muted:   #8C8880;
  --white:   #FFFFFF;
  --rule:    rgba(26,43,74,.1);

  --fd: 'EB Garamond', Georgia, serif;
  --fb: 'DM Sans', system-ui, sans-serif;
  --fm: 'DM Mono', monospace;

  --nav-h: 72px;
  --max:   1260px;
  --pad:   52px;

  /* Performance: GPU-composited transitions only */
  --t-fast: .2s ease;
  --t-med:  .35s cubic-bezier(.76,0,.24,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  /* Prevent layout shift from scrollbar */
  scrollbar-gutter: stable;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  /* Prevent layout shift */
  content-visibility: auto;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--fb); border: none; background: none; }

/* ── CUSTOM CURSOR — desktop only ── */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  #cursor {
    position: fixed; top: 0; left: 0; z-index: 9999;
    pointer-events: none; mix-blend-mode: multiply;
  }
  .cur-ring {
    width: 36px; height: 36px;
    border: 1.5px solid var(--navy);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%,-50%);
    transition: width .35s, height .35s, border-color .25s;
    will-change: transform;
  }
  .cur-dot {
    width: 6px; height: 6px;
    background: var(--gold);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%,-50%);
    will-change: transform;
  }
  body.cur-hover .cur-ring { width: 52px; height: 52px; border-color: var(--gold); }
  body.cur-hover .cur-dot  { background: var(--navy); }
}
/* Hide cursor element on touch devices */
@media (hover: none) {
  #cursor { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
}

/* ── NAV ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(247,243,236,.97);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 2px 20px rgba(26,43,74,.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow var(--t-fast);
  /* Prevent nav from causing layout shift */
  will-change: box-shadow;
}
.site-nav.scrolled {
  box-shadow: 0 2px 32px rgba(26,43,74,.1);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; flex-shrink: 0;
}
.nav-logo-icon {
  width: 40px; height: 40px;
  object-fit: contain; flex-shrink: 0;
}
.nav-logo-text {
  display: flex; flex-direction: column; line-height: 1;
}
.nav-logo-name {
  font-family: var(--fd); font-size: 17px; font-weight: 700;
  letter-spacing: .02em; color: var(--navy);
}
.nav-logo-tag {
  font-family: var(--fm); font-size: 8px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gold); margin-top: 3px;
}
.nav-links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}
.nav-links a {
  font-family: var(--fm); font-size: 10.5px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--mid);
  position: relative; transition: color var(--t-fast);
  /* Larger tap target */
  padding: 8px 0;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 2px; left: 0; right: 0;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-fast);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* Nav CTA — slash wipe */
.nav-book {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--fm); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--navy);
  background: transparent;
  padding: 11px 22px 11px 18px;
  border: 1px solid rgba(26,43,74,.35);
  position: relative; overflow: hidden;
  transition: color var(--t-med), border-color var(--t-fast);
  z-index: 0;
  /* Minimum tap target 44px */
  min-height: 44px;
}
.nav-book::before {
  content: '/';
  font-family: var(--fd); font-style: italic; font-size: 16px;
  color: var(--gold); opacity: .8; line-height: 1;
  transition: transform .25s;
}
.nav-book::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--navy);
  transform: translateY(101%);
  transition: transform var(--t-med);
  z-index: -1;
}
.nav-book:hover { color: var(--cream); border-color: var(--navy); }
.nav-book:hover::after { transform: translateY(0); }
.nav-book:hover::before { transform: translateY(-1px); }

/* Mobile burger */
.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
  /* 44px tap target */
  min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.nav-burger span {
  width: 24px; height: 1.5px; background: var(--navy);
  transition: transform .3s, opacity .3s;
  display: block;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--cream);
  z-index: 499; flex-direction: column;
  padding: 40px var(--pad);
  gap: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.76,0,.24,1);
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0);
}
.mobile-menu a {
  font-family: var(--fd); font-size: 36px; font-weight: 400;
  color: var(--navy); padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  transition: color var(--t-fast);
  /* Full-width tap target */
  display: block; width: 100%;
}
.mobile-menu a:hover { color: var(--gold2); }
.mobile-menu .mobile-book {
  margin-top: 32px;
  font-family: var(--fm); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--white);
  background: var(--navy); padding: 18px 32px;
  text-align: center; border: none;
  display: block;
}

/* ── PAGE HEADER ── */
.page-header {
  padding-top: var(--nav-h);
  background: var(--navy);
  padding-bottom: 80px;
  position: relative; overflow: hidden;
}
.page-header::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.page-header-inner {
  max-width: var(--max); margin: 0 auto; padding: 80px var(--pad) 0;
  position: relative; z-index: 1;
}
.page-kicker {
  font-family: var(--fm); font-size: 10.5px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.page-kicker::before { content: ''; width: 32px; height: 1px; background: var(--gold); }
.page-title {
  font-family: var(--fd); font-size: clamp(40px, 6vw, 84px);
  font-weight: 800; line-height: .92; letter-spacing: -.02em;
  color: var(--cream);
}
.page-title em { font-style: italic; color: var(--gold); }
.page-sub {
  margin-top: 24px; font-size: clamp(14px, 1.8vw, 16px); font-weight: 300;
  color: rgba(237,230,216,.6); max-width: 480px; line-height: 1.8;
}

/* ── BUTTONS ── */

/* PRIMARY — left-to-right fill wipe */
.btn-primary {
  display: inline-block;
  position: relative;
  font-family: var(--fm); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--navy);
  background: transparent;
  padding: 16px 40px;
  border: 1px solid var(--navy);
  overflow: hidden;
  transition: color var(--t-med);
  z-index: 0;
  /* 44px min tap target */
  min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--navy);
  transform: translateX(-101%);
  transition: transform var(--t-med);
  z-index: -1;
}
.btn-primary:hover { color: var(--cream); }
.btn-primary:hover::before { transform: translateX(0); }

/* OUTLINE — gold fill wipe */
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  font-family: var(--fm); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--navy);
  background: transparent;
  padding: 16px 40px;
  border: 1px solid rgba(26,43,74,.3);
  overflow: hidden;
  transition: color var(--t-med), border-color var(--t-fast);
  z-index: 0;
  min-height: 44px;
}
.btn-outline::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform var(--t-med);
  z-index: -1;
}
.btn-outline:hover { color: var(--navy); border-color: var(--gold); }
.btn-outline:hover::before { transform: translateX(0); }

/* GHOST — line retracts, arrow appears */
.btn-ghost {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--fm); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--mid);
  background: none; border: none;
  position: relative; transition: color var(--t-fast);
  min-height: 44px;
  padding: 8px 0;
}
.btn-ghost .line {
  width: 28px; height: 1px; background: currentColor;
  transition: width var(--t-med);
  flex-shrink: 0;
}
.btn-ghost::after {
  content: '→'; font-size: 13px; opacity: 0;
  transform: translateX(-6px);
  transition: opacity .25s, transform .25s;
  position: absolute; right: -22px;
}
.btn-ghost:hover { color: var(--navy); }
.btn-ghost:hover .line { width: 0; }
.btn-ghost:hover::after { opacity: 1; transform: translateX(0); }

/* DARK (on gold backgrounds) */
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--fm); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--navy);
  background: transparent;
  padding: 16px 40px;
  border: 1px solid rgba(26,43,74,.4);
  position: relative; overflow: hidden;
  transition: color var(--t-med); z-index: 0;
  min-height: 44px;
}
.btn-dark::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--navy);
  transform: translateX(-101%);
  transition: transform var(--t-med);
  z-index: -1;
}
.btn-dark:hover { color: var(--cream); }
.btn-dark:hover::before { transform: translateX(0); }

/* ── SECTION UTILITIES ── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section-kicker {
  font-family: var(--fm); font-size: 10.5px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.section-kicker::before { content: ''; width: 32px; height: 1px; background: var(--gold); }
.section-title {
  font-family: var(--fd); font-size: clamp(34px, 4.5vw, 64px);
  font-weight: 700; line-height: 1.0; letter-spacing: -.01em;
  color: var(--navy);
}
.section-title em { font-style: italic; color: var(--gold2); }
.section-title.light { color: var(--cream); }
.section-title.light em { color: var(--gold); }

/* ── SCROLL REVEALS ── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.up { opacity: 1; transform: none; }
.reveal-l {
  opacity: 0; transform: translateX(-24px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal-l.up { opacity: 1; transform: none; }
.reveal-r {
  opacity: 0; transform: translateX(24px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal-r.up { opacity: 1; transform: none; }

/* ── FOOTER ── */
.site-footer {
  background: var(--navy);
  padding: 80px 0 40px;
  border-top: 3px solid var(--gold);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 56px;
}
.footer-brand-col {
  display: flex; flex-direction: column; gap: 0;
}
.footer-brand-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.footer-logo-img {
  width: 48px; height: 48px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .85; flex-shrink: 0;
}
.footer-brand-name {
  font-family: var(--fd); font-size: 20px; font-weight: 700; color: var(--cream);
}
.footer-brand-sub {
  font-family: var(--fm); font-size: 8.5px; letter-spacing: .3em;
  text-transform: uppercase; color: var(--gold); margin-top: 2px;
}
.footer-desc {
  font-size: 13px; font-weight: 300; color: rgba(237,230,216,.5);
  line-height: 1.85; max-width: 260px; margin-bottom: 28px;
}
.footer-socials { display: flex; gap: 10px; }
.footer-soc {
  width: 36px; height: 36px;
  border: 1px solid rgba(237,230,216,.15);
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--t-fast);
  /* 44px touch target with padding trick */
  padding: 4px;
}
.footer-soc svg {
  width: 16px; height: 16px;
  fill: rgba(237,230,216,.4);
  transition: fill var(--t-fast);
}
.footer-soc:hover { border-color: var(--gold); }
.footer-soc:hover svg { fill: var(--gold); }
.footer-col-h {
  font-family: var(--fm); font-size: 9.5px; letter-spacing: .25em;
  text-transform: uppercase; color: rgba(237,230,216,.35);
  margin-bottom: 22px;
}
.footer-col-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col-list a {
  font-size: 14px; font-weight: 300; color: rgba(237,230,216,.55);
  transition: color var(--t-fast);
  /* Readable tap target */
  padding: 3px 0; display: inline-block;
}
.footer-col-list a:hover { color: var(--cream); }
.footer-bottom {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-top: 32px; border-top: 1px solid rgba(237,230,216,.08);
}
.footer-copy {
  font-size: 12px; color: rgba(237,230,216,.3);
}
.footer-copy a { color: var(--gold); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a {
  font-size: 12px; color: rgba(237,230,216,.3);
  transition: color var(--t-fast); padding: 4px 0;
}
.footer-legal a:hover { color: var(--cream); }

/* ══════════════════════════════════════════════
   RESPONSIVE — Mobile First
══════════════════════════════════════════════ */

/* ── TABLET 960px ── */
@media (max-width: 960px) {
  :root { --pad: 32px; }

  .nav-links, .nav-book { display: none; }
  .nav-burger { display: flex; }

  .page-header-inner { padding: 60px var(--pad) 0; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
  .footer-legal { justify-content: center; }
}

/* ── MOBILE 640px ── */
@media (max-width: 640px) {
  :root {
    --pad: 20px;
    --nav-h: 64px;
  }

  /* Nav */
  .nav-logo-name { font-size: 15px; }
  .nav-logo-tag  { display: none; }
  .nav-logo-icon { width: 34px; height: 34px; }

  /* Page header */
  .page-header { padding-bottom: 56px; }
  .page-header-inner { padding: 48px var(--pad) 0; }
  .page-sub { max-width: 100%; }

  /* Buttons — full width on mobile */
  .btn-primary,
  .btn-outline,
  .btn-dark {
    width: 100%; text-align: center;
    padding: 16px 24px;
    justify-content: center;
  }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-desc  { max-width: 100%; }
  .footer-bottom { gap: 16px; }

  /* Mobile menu — larger type */
  .mobile-menu a { font-size: 28px; }
}

/* ── SMALL MOBILE 375px ── */
@media (max-width: 375px) {
  :root { --pad: 16px; }
  .nav-logo-name { font-size: 14px; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal, .reveal-l, .reveal-r {
    opacity: 1; transform: none;
  }
}

/* ── PRINT ── */
@media print {
  .site-nav, .nav-burger, .mobile-menu, #cursor { display: none !important; }
  body { cursor: auto; background: white; color: black; }
  a { color: black; }
}

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--rule, rgba(26,43,74,.2));
  border-radius: 100px; overflow: hidden; margin-right: 18px;
}
.lang-toggle button {
  font-family: var(--fm, inherit); font-size: 11px; letter-spacing: .12em;
  padding: 7px 12px; background: transparent; border: 0; cursor: pointer;
  color: var(--mid, #6b7280); transition: background .25s, color .25s;
}
.lang-toggle button.active {
  background: var(--navy, #1A2B4A); color: var(--cream, #F7F3EC);
}
.lang-toggle button:not(.active):hover { color: var(--navy, #1A2B4A); }
@media (max-width: 860px) {
  .lang-toggle { margin-right: 10px; }
  .lang-toggle button { padding: 6px 9px; font-size: 10px; }
}


/* ============================================================
   WEXLAR STUDIOS — demo attribution badge + ownership signature
   Fingerprint: wexlar-blade-and-fade-b2d8c1f640   © 2026 Wexlar Studios
   ============================================================ */
:root { --wx-signature: "wexlar-blade-and-fade-b2d8c1f640"; }
.wx-badge {
  position: fixed; left: 16px; bottom: 16px; z-index: 99999;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 100px;
  font: 500 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: .04em; text-decoration: none; white-space: nowrap;
  color: #fff; background: rgba(18,18,20,.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 6px 22px -10px rgba(0,0,0,.55);
  opacity: .55; transition: opacity .25s ease;
}
.wx-badge:hover, .wx-badge:focus-visible { opacity: 1; }
.wx-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #C8401A; flex: none; }
@media (max-width: 600px) { .wx-badge { font-size: 10px; padding: 6px 11px; left: 12px; bottom: 12px; } }
@media print { .wx-badge { display: none; } }
