/* ================================================================
   shared.css — base, typography, grain, nav, footer
   Aesthetic: editorial dispatch · paper + ink + signal orange
   ================================================================ */

:root {
  /* Palette */
  --paper:        #EFE6D2;   /* warm cream — primary background */
  --paper-2:      #E7DDC3;   /* deeper cream — bands, stripes */
  --paper-3:      #F6EFDD;   /* light cream — card interior */
  --ink:          #0E1A2C;   /* near-black navy — primary text */
  --ink-60:       rgba(14, 26, 44, 0.62);
  --ink-40:       rgba(14, 26, 44, 0.40);
  --ink-20:       rgba(14, 26, 44, 0.18);
  --ink-10:       rgba(14, 26, 44, 0.10);
  --signal:       #E14422;   /* emergency orange — accent */
  --signal-soft:  #F2B098;
  --gold:         #B68E3E;   /* muted ochre — numerals */
  --gold-soft:    #D6B77A;
  --verdigris:    #4A6E63;

  /* Type */
  --f-serif: "Fraunces", "Times New Roman", Georgia, serif;
  --f-sans:  "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --container:    1440px;
  --pad-x:        clamp(20px, 4.2vw, 64px);
  --nav-h:        78px;

  /* Motion */
  --ease:         cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}

/* Subtle hatched paper background (inline SVG) */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 20% -10%, rgba(225,68,34,0.07), transparent 55%),
    radial-gradient(90% 70% at 110% 110%, rgba(14,26,44,0.08), transparent 60%);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
ol, ul { list-style: none; }

/* Screen-reader-only helper */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ================================================================
   GRAIN OVERLAY
   ================================================================ */
.grain {
  position: fixed; inset: -10%;
  pointer-events: none;
  z-index: 3;
  opacity: 0.09;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.05  0 0 0 0 0.1  0 0 0 0 0.17  0 0 0 0.8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grainShift 8s steps(8) infinite;
}
@keyframes grainShift {
  0%  { transform: translate(0,0); }
  20% { transform: translate(-2%,1%); }
  40% { transform: translate(1%,-2%); }
  60% { transform: translate(-1%,2%); }
  80% { transform: translate(2%,-1%); }
  100%{ transform: translate(0,0); }
}

/* ================================================================
   NAV
   ================================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffff;
  border-bottom: 1px solid rgba(14, 26, 44, 0.12);
  box-shadow: 0 1px 24px -8px rgba(14, 26, 44, 0.10);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 16px var(--pad-x);
  min-height: var(--nav-h);
}

.nav-brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  gap: 5px;
  justify-self: start;
  margin-right: auto;
}
.nav-logo {
  height: 46px;
  width: auto;
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.nav-brand-sub {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.nav-menu {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}
.nav-menu > li { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 0;
  position: relative;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--signal); }
.nav-link.active::after { background: var(--signal); }
.chev { font-size: 10px; opacity: 0.7; transform: translateY(1px); }

/* Dropdown */
.has-panel { position: relative; }
/* Invisible hover bridge on the li itself so the cursor can cross
   the gap between the nav-link and the panel without closing it. */
.has-panel::after {
  content: "";
  position: absolute;
  left: -20px; right: -20px;
  top: 100%;
  height: 18px;
  pointer-events: auto;
}
.has-panel > .panel {
  position: absolute;
  top: 100%;
  left: -20px;
  margin-top: 12px;
  min-width: 230px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  border-radius: 2px;
  box-shadow: 0 18px 38px -18px rgba(14,26,44,0.55);
}
.has-panel:hover > .panel,
.has-panel:focus-within > .panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.panel::before {
  content: "";
  position: absolute; left: 24px; top: -6px;
  width: 12px; height: 12px;
  background: var(--ink);
  transform: rotate(45deg);
}
.panel a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.panel a:hover { background: var(--signal); }
.panel-num {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--signal);
}
.panel a:hover .panel-num { color: var(--paper); }

/* CTA button in nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--paper);
  transition: background 0.28s var(--ease), color 0.28s var(--ease);
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-cta-arrow { transition: transform 0.28s var(--ease); }
.nav-cta:hover .nav-cta-arrow { transform: translateX(3px); }

/* Hamburger */
.hamburger {
  display: none;
  width: 38px; height: 38px;
  position: relative;
}
.hamburger span {
  display: block;
  position: absolute;
  left: 7px; right: 7px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 18px; }
.hamburger span:nth-child(3) { top: 23px; }
.hamburger.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
  position: relative;
}
.btn .btn-ic { transition: transform 0.3s var(--ease); }
.btn:hover .btn-ic { transform: translate(3px,-1px); }
.btn-solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-solid:hover {
  background: var(--signal);
  border-color: var(--signal);
}
.btn-line {
  background: transparent;
  color: var(--ink);
}
.btn-line:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-lg {
  padding: 18px 30px;
  font-size: 13px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.foot {
  position: relative;
  background: #ffffff;
  color: var(--ink);
  overflow: hidden;
  margin-top: 120px;
  padding: 88px var(--pad-x) 0;
  border-top: 1px solid rgba(14, 26, 44, 0.12);
  box-shadow: 0 -1px 24px -8px rgba(14, 26, 44, 0.07);
}
.foot::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%, var(--signal) 20%, var(--gold) 50%, var(--signal) 80%, transparent 100%);
  opacity: 0.6;
}

.foot-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 56px;
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding-bottom: 72px;
}

.foot-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.foot-eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--signal);
}

/* ================================================================
   FOOTER LOGO BAND — large logo inside dark footer
   ================================================================ */
.foot-logo-band {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--pad-x) 0;
  position: relative;
  z-index: 2;
}
.foot-logo-big {
  width: clamp(280px, 48vw, 680px);
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  opacity: 0.88;
  transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}
.foot-logo-big:hover {
  opacity: 1;
  transform: scale(1.02);
}
.foot-tag {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-60);
  max-width: 320px;
}

.foot-links { display: flex; flex-direction: column; gap: 10px; }
.foot-links a {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-60);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.22s var(--ease), transform 0.22s var(--ease);
}
.foot-links a::after {
  content: "";
  position: absolute; left: 28px; right: 0; bottom: -1px;
  height: 1px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.foot-links a:hover { color: var(--ink); transform: translateX(4px); }
.foot-links a:hover::after { transform: scaleX(1); }
.foot-num {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--gold);
  font-variation-settings: "opsz" 14;
}

.foot-link-lg {
  display: inline-block;
  font-family: var(--f-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink-20);
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
  margin-bottom: 16px;
  font-variation-settings: "opsz" 40, "SOFT" 20;
}
.foot-link-lg:hover { color: var(--signal); border-color: var(--signal); }

.foot-socials {
  display: flex; gap: 8px;
  margin-top: 4px;
}
.foot-socials a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--ink-20);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-60);
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.foot-socials a:hover {
  background: var(--signal);
  border-color: var(--signal);
  color: #ffffff;
}
.foot-sc-ar { font-size: 10px; transform: translateY(-1px); }

.foot-legal {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 24px auto;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-60);
  text-align: center;
}

.foot-base {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--ink-20);
  padding: 20px 0;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-60);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: var(--container);
  margin: 0 auto;
}
.foot-base-sep { color: var(--signal); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1020px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .nav-menu { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: block; justify-self: end; }

  .nav-menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    left: 0; right: 0;
    background: var(--ink);
    padding: 26px var(--pad-x) 36px;
    gap: 4px;
    z-index: 30;
    border-bottom: 1px solid var(--signal);
  }
  .nav-menu.is-open .nav-link {
    color: var(--paper);
    font-size: 20px;
    letter-spacing: 0.08em;
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid rgba(239,230,210,0.12);
  }
  .nav-menu.is-open .nav-link::after { display: none; }
  .nav-menu.is-open .panel {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    background: transparent;
    box-shadow: none;
    padding: 0 0 10px;
  }
  .nav-menu.is-open .panel::before { display: none; }
  .nav-menu.is-open .panel a {
    padding: 8px 0 8px 24px;
    color: rgba(239,230,210,0.75);
  }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}

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

/* Language choices share the navigation's type and underline treatment. */
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.language-switch button {
  min-width: 32px;
  min-height: 44px;
  font: inherit;
  color: inherit;
  text-underline-offset: 6px;
}
.language-switch button[aria-pressed="true"] {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  font-weight: 800;
}
.language-switch button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
@media (min-width: 1021px) and (max-width: 1280px) {
  .nav { gap: 20px; }
  .nav-menu { gap: 1.1rem; }
  .nav-brand-sub { max-width: 34ch; line-height: 1.5; }
}
@media (max-width: 1020px) {
  .nav-brand { min-width: 0; }
  .nav-brand-sub { max-width: 42ch; line-height: 1.4; }
  .nav-menu.is-open .nav-language { margin-top: 12px; }
  .nav-menu.is-open .language-switch { color: var(--paper); }
  .hamburger { grid-column: 3; }
}
