/* Pattah Development - shared styles (tokens, reset, nav, footer, shared reveal) */
/* Extracted byte-identical from all 8 pages; page-specific styles remain inline. */

:root {
  --gold:         #D4A73A;
  --gold-dark:    #B8860B;
  --gold-deep:    #8B6914;
  --gold-light:   #EAD68C;
  --charcoal:     #1A1A1A;
  --charcoal-mid: #242420;
  --ivory:        #F7F5F0;
  --warm-gray:    #E8E4DC;
  --stone:        #C9C3B8;
  --body-gray:    #6B6560;
  --muted:        #9E9890;
  --white:        #FFFFFF;

  --font-serif:     'Cormorant Garamond', Georgia, serif;
  --font-serif-alt: 'EB Garamond', Georgia, serif;
  --font-sans:      'Inter', system-ui, sans-serif;

  --content-w: 1280px;
  --pad-x:     clamp(24px, 5vw, 80px);

  --doc-rule:    rgba(26,26,26,0.10);
  --doc-rule-dk: rgba(255,255,255,0.07);
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--charcoal);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
address { font-style: inherit; } /* HQ <address> on home + contact: semantic only, keeps the former <p> rendering */

button { font: inherit; border: none; background: none; cursor: pointer; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

.has-grain { position: relative; }

.has-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 320px 320px;
  mix-blend-mode: overlay;
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 20px;
  pointer-events: none;
}

.nav-inner, .nav-inner * { pointer-events: auto; }

.site-logo {
  position: fixed;
  top: 16px;
  left: 32px;
  z-index: 102;
  display: block;
  line-height: 0;
  background: rgba(20, 19, 16, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--gold);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: border-color 250ms var(--ease-out);
}

.site-logo:hover { border-color: rgba(212,167,58,0.65); }

.site-logo-img {
  height: 100px;
  width: 100px;
  display: block;
  object-fit: contain;
}

.nav-inner {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 52px;
  padding: 0 40px;
  background: rgba(20, 19, 16, 0.76);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.10);
  white-space: nowrap;
}

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

.nav-links a {
  position: relative;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 200ms;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 250ms var(--ease-out);
}

.nav-links a:hover { color: var(--white); }

.nav-links a:hover::after { width: 100%; }

.nav-links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 18px;
  background: transparent;
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid rgba(212,167,58,0.45);
  white-space: nowrap;
  transition: background 200ms, border-color 200ms, color 200ms;
  flex-shrink: 0;
}

.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--charcoal); }

.nav-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-mobile-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--white);
  transition: transform 250ms var(--ease-out), opacity 200ms;
}

.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}

.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ── Condensed nav pill (1500px–1101px) ──
   Fixed logo occupies x=32..184; full 1100px pill collides below 1468px
   (measured sweep, phase 1.5). Condense until the hamburger cutover.
   CTA stays in the pill: it is the nav's only route to contact.html. */
@media (max-width: 1500px) and (min-width: 1101px) {
  .nav-inner { gap: 24px; padding: 0 22px; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 10px; letter-spacing: 1px; }
  .nav-cta { height: 30px; padding: 0 12px; font-size: 10px; letter-spacing: 1px; }
  /* Mid-size logo: full 152px box still collides with the 822px condensed
     pill below 1180px; a 60px mark clears it down to the 1100px cutover. */
  .site-logo { padding: 14px; }
  .site-logo-img { height: 60px; width: 60px; }
}

/* ── Mobile nav — canonical implementation, shared by all pages.
   Cutover at 1100px (not 760px): below 1101px even the condensed pill
   cannot clear the fixed logo without overflowing the viewport. ── */
@media (max-width: 1100px) {
  .nav-links, .nav-cta { display: none; }
  /* Charcoal chip (echoes the boxed logo) so the white lines stay
     legible over light sections like the ivory news band */
  .nav-mobile-toggle {
    display: flex;
    background: rgba(20, 19, 16, 0.76);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.10);
    padding: 12px 11px;
  }
  .nav-mobile-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

  /* Right-align hamburger — make nav a flex row */
  .nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 20px;
  }

  /* Reset desktop centered pill */
  .nav-inner {
    position: static;
    transform: none;
    left: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 4px;
    height: auto;
    gap: 0;
  }

  /* Logo: shrink on mobile; absolute (not fixed) so it scrolls away with
     the page instead of overlapping section content — only the hamburger
     stays pinned (orchestrator edit E2) */
  .site-logo { position: absolute; top: 12px; left: 16px; padding: 12px; }
  .site-logo-img { height: 44px; width: 44px; }

  /* Open: expand to full-width dropdown column */
  .nav.nav-open {
    flex-direction: column;
    align-items: stretch;
    pointer-events: auto;
    padding: 0;
    background: rgba(22, 21, 19, 0.97);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .nav.nav-open .nav-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    padding: 12px 20px 28px;
    gap: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    height: auto;
  }
  /* Hamburger moves to top via order */
  .nav.nav-open .nav-mobile-toggle {
    order: -1;
    margin-bottom: 8px;
  }
  .nav.nav-open .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    order: 0;
    width: 100%;
  }
  .nav.nav-open .nav-links li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: right;
  }
  .nav.nav-open .nav-links li:last-child { border-bottom: none; }
  .nav.nav-open .nav-links a {
    display: block;
    padding: 15px 0;
    font-size: 12px;
    letter-spacing: 1.8px;
    color: rgba(255,255,255,0.55);
  }
  .nav.nav-open .nav-links a:hover { color: var(--white); }
  .nav.nav-open .nav-cta {
    display: flex !important;
    order: 1;
    margin-top: 20px;
    align-self: center;
  }
}

.footer {
  background: var(--charcoal-mid);
  padding: clamp(56px, 7vw, 96px) var(--pad-x) 0;
  border-top: 1px solid var(--doc-rule-dk);
}

.footer-inner { max-width: var(--content-w); margin: 0 auto; }

.footer-wordmark {
  display: block;
  height: 60px;
  width: auto;
  margin-bottom: 16px;
  opacity: 0.85;
}

.footer-nav-group { display: flex; gap: clamp(40px, 5vw, 72px); }

.footer-nav-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.footer-links a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--white);
  transition: color 200ms;
  letter-spacing: 0.3px;
}

.footer-links a:hover { color: rgba(201,195,184,0.65); }

.footer-links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.footer-copy {
  font-family: var(--font-sans);
  font-size: 11px;
  /* was rgba(201,195,184,0.55) = 3.71:1 on charcoal-mid; fails WCAG AA.
     0.75 alpha matches .footer-tagline and clears AA at 5.64:1. */
  color: rgba(201,195,184,0.75);
  letter-spacing: 0.3px;
}

.footer-gold-mark {
  width: 44px; height: 1.5px;
  background: linear-gradient(to right, var(--gold), var(--gold-dark));
}

@media (prefers-reduced-motion: no-preference) {
  .footer-gold-mark {
    transform: scaleX(0);
    transform-origin: right;
    opacity: 0;
    transition: transform 900ms var(--ease-out) 200ms, opacity 400ms var(--ease-out) 200ms;
  }
  .footer-gold-mark.visible {
    transform: scaleX(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-gold-mark { opacity: 0.6; }
}

.nav-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
