/* ─────────────────────────────────────────────────────────────────────────────
   0) Reset + mobile tap
   ───────────────────────────────────────────────────────────────────────────── */

*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }

/* Mobile tap highlight off (prevents blue flash on tap) */
*{ -webkit-tap-highlight-color: transparent; }
a,button{ -webkit-tap-highlight-color: transparent; -webkit-touch-callout:none; }

/* ─────────────────────────────────────────────────────────────────────────────
   1) Tokens
   ───────────────────────────────────────────────────────────────────────────── */

:root{
  --bg:#1a1a1a;
  --fg:#0b0c10;

  /* motion */
  --motion-fast: 140ms;
  --motion-normal: 240ms;
  --motion-slow: 360ms;
  --ease-soft: cubic-bezier(.16, .84, .44, 1);
  --ease-smooth: cubic-bezier(.33, 1, .68, 1);

  /* layout */
  --wrap-max:1200px;
  --wrap-pad:20px;
  --vh: 1vh;

  /* safe-area for site-core.js (read via getComputedStyle) */
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);

  /* nav glass */
  --nav-text:#1a1917;
  --nav-text-hover:#111111;
  --nav-shadow:0 8px 26px rgba(0,0,0,.20);
  --nav-glass: rgba(255,255,255,.15);
  --nav-border: rgba(255,255,255,.18);

  /* global scrollbar */
  --scrollbar-thumb: rgba(255,255,255,.44);
  --scrollbar-thumb-hover: rgba(255,255,255,.75);
  --scrollbar-track: #3a3a3abb;
  --scrollbar-width: 7px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2) Background system
   ───────────────────────────────────────────────────────────────────────────── */

html{ background: var(--bg); }

body::before{
  content: "";
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--bg-h, calc(var(--vh, 1vh) * 100 + 50px));
  z-index: 0;
  pointer-events: none;

  background:
    var(--page-bg-desktop) center / cover no-repeat,
    radial-gradient(1200px 600px at 50% 0%, rgba(255,205,90,.14), transparent 60%);
  background-attachment: fixed;

  transform: translateZ(0);
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

body{
  position: relative;
  z-index: 1;

  min-height: 100vh;
  min-height: 100dvh;

  background: transparent;
  color: var(--fg);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial;

  opacity: 0;
  transition: opacity var(--motion-normal) var(--ease-soft);
}

body.is-active{ opacity: 1; }

.wrap{
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: var(--wrap-pad);
}

/* ─────────────────────────────────────────────────────────────────────────────
   3) Navigation
   ───────────────────────────────────────────────────────────────────────────── */

.nav{
  position: relative;
  z-index: 20;
  display:flex;
  justify-content:center;
  align-items:center;
  margin: 10px 0 4px;
}

.nav .menu{
  display:flex;
  align-items:center;
  gap: clamp(14px,2.6vw,28px);
  padding: clamp(6px,1vw,10px) clamp(12px,2.4vw,22px);
  border-radius: 999px;

  background: var(--nav-glass);
  border: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);

  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}

.nav .menu a{
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: .12em;
  font-weight: 700;
  font-family: "Garamond","Times New Roman",serif;
  text-decoration: none;
  color: var(--nav-text);
  opacity: .95;
  text-shadow: 0 1px 0 rgba(255,255,255,.25);

  transition:
    color var(--motion-fast) var(--ease-soft),
    opacity var(--motion-fast) var(--ease-soft),
    transform var(--motion-fast) var(--ease-soft);
}

.nav .menu a:hover{ color: var(--nav-text-hover); opacity: 1; transform: translateY(-1px); }

.nav .menu a[aria-current="page"]{
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Screen reader only utility */
.sr-only{
  position:absolute!important;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   4) About / Mission section (index)
   ───────────────────────────────────────────────────────────────────────────── */

.about{ margin: 30px 0 60px; }

.about-title{
  margin: 6px 0 4px;
  font-family: Garamond,"Times New Roman",serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 900;
  color: #383731;
  text-align: center;
}

.about-lead{
  color: #3a392f;
  text-align:center;
  margin: 8px auto 12px;
  max-width: 720px;
  line-height: 1.6;
}

.about-quote{
  background: var(--nav-glass);
  border: 1px solid var(--nav-border);
  border-left: 3px solid rgba(255,215,0,.35);
  border-radius: 12px;
  box-shadow: var(--nav-shadow);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  padding: 12px 18px;
  max-width: 700px;
  margin: 24px auto 0;
  text-align:center;
  font-style: italic;
  font-size: 1.2rem;

  transition: opacity .7s ease, transform .7s ease;
}

.about-quote.animate-on-scroll{
  opacity: 0;
  transform: translateY(6px);
}

.about-quote.animate-on-scroll.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────────────────────
   5) Scrollbars + focus
   ───────────────────────────────────────────────────────────────────────────── */

html,body{
  scrollbar-width: auto;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html{ scroll-behavior: smooth; }

html::-webkit-scrollbar,
body::-webkit-scrollbar{
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track{ background: var(--scrollbar-track); }

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb{
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover{ background: var(--scrollbar-thumb-hover); }

img{ max-width: 100%; height: auto; display: block; }

:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,209,60,0.25), 0 10px 30px rgba(0,0,0,0.12);
  border-radius: 10px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   6) Reduced motion
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px), (pointer: coarse){
  .nav .menu,
  .about-quote
  {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background:
      radial-gradient(120% 80% at 30% 20%, rgba(255,255,255,.16), rgba(255,255,255,0) 55%),
      linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03)),
      rgba(255, 214, 140, 0.30);
    box-shadow: 0 10px 26px rgba(0,0,0,.14), inset 0 1px 8px rgba(255,255,255,.18);
  }
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   7) Mobile/tablet
   ───────────────────────────────────────────────────────────────────────────── */

/* General mobile: lighter blur + thinner scrollbar */
@media (max-width:1024px){
  :root{ --scrollbar-width: 6px; }

  .nav .menu{
    -webkit-backdrop-filter: blur(8px) saturate(1.12);
    backdrop-filter: blur(8px) saturate(1.12);
  }

  html::-webkit-scrollbar-thumb,
  body::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,.22);
  }
}

/* Very small phones (≤ 399px) */
@media (max-width:399px){
  :root{ --wrap-pad: 14px; }

  .nav{ margin: 0 0 20px; }

  .nav .menu{ gap: 8px; padding: 7px 14px; }
  .nav .menu a{ font-size: .9rem; letter-spacing: .10em; }

  body::before{
    background:
      var(--page-bg-mobile) center / cover no-repeat,
      radial-gradient(1200px 600px at 50% 0%, rgba(255,205,90,.14), transparent 60%);
    background-color: #fff;
  }

  .about-quote{ font-size: .9rem; }
  .about .about-lead,
  .about .about-quote{ text-align:center; margin-left:auto; margin-right:auto; }
}

/* Phones (400px – 767px) */
@media (min-width:400px) and (max-width:767px){
  :root{ --wrap-pad: 14px; }

  .nav{ margin: 10px 0 33px; }

  .nav .menu{ gap: 11px; padding: 7px 21px; }
  .nav .menu a{ font-size: 1.0rem; letter-spacing: .10em; }

  .about{ margin: 20px 0 40px; }
  .about-quote{ padding: 10px 14px; margin-top: 16px; }

  body::before{
    background:
      var(--page-bg-mobile) center / cover no-repeat,
      radial-gradient(1200px 600px at 50% 0%, rgba(255,205,90,.14), transparent 60%);
    background-color: #fff;
  }

  .about-quote{ font-size: 1.0rem; }
  .about .about-lead,
  .about .about-quote{ text-align:center; margin-left:auto; margin-right:auto; }
}

/* Tablets (768px – 1024px) */
@media (min-width:768px) and (max-width:1024px){
  :root{ --wrap-pad: 18px; }

  .nav{ margin: 10px 0 30px; }

  .nav .menu{ gap: clamp(12px, 2.6vw, 18px); padding: 12px 20px; }
  .nav .menu a{ font-size: 1.3rem; letter-spacing: .10em; }

  body::before{
    background:
      var(--page-bg-mobile) center / cover no-repeat,
      radial-gradient(1200px 600px at 50% 0%, rgba(255,205,90,.14), transparent 60%);
    background-color: #fff;
  }

  .about-quote{ font-size: 1.5rem; }
  .about .about-lead,
  .about .about-quote{ text-align:center; margin-left:auto; margin-right:auto; }
}
