/* ===== Tokens ===== */
:root {
  --paper: #faf3e6;
  --paper-raised: #ffffff;
  --ink: #2a241c;
  --ink-soft: #5c5344;
  --muted: #948a76;
  --line: rgba(42, 36, 28, 0.12);
  --gold: #b9812a;
  --gold-soft: #e4c07a;
  --blue: #3e6b8a;
  --shadow: 0 24px 60px -30px rgba(42, 36, 28, 0.35);
  --radius: 4px;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --header-h: 74px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1b1712;
    --paper-raised: #241f18;
    --ink: #f2ead9;
    --ink-soft: #cabfa9;
    --muted: #8b8171;
    --line: rgba(242, 234, 217, 0.14);
    --gold: #dba646;
    --gold-soft: #a97b2e;
    --blue: #7fa9c4;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --paper: #1b1712;
  --paper-raised: #241f18;
  --ink: #f2ead9;
  --ink-soft: #cabfa9;
  --muted: #8b8171;
  --line: rgba(242, 234, 217, 0.14);
  --gold: #dba646;
  --gold-soft: #a97b2e;
  --blue: #7fa9c4;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.6);
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0 0 1em; }
.container { max-width: 900px; margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 600;
  display: block;
}
@media (max-width: 720px) { .container { padding: 0 22px; } }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 32px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
body.on-panel .site-header {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
body:not(.on-panel) .site-header {
  background: linear-gradient(180deg, rgba(8, 6, 4, 0.72) 0%, rgba(8, 6, 4, 0.42) 65%, rgba(8, 6, 4, 0) 100%);
}
.logotype {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
body:not(.on-panel) .logotype { color: #fdf7ea; }
.logotype em { color: var(--gold); font-style: italic; }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-home-item { display: none; }
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
body:not(.on-panel) .nav-links a { color: rgba(251, 243, 228, 0.82); }
.nav-links a:hover { color: var(--gold); }
.nav-toggle {
  display: none;
  position: relative;
  z-index: 401;
  background: none; border: none; width: 40px; height: 40px;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .25s ease, opacity .2s ease; }
body:not(.on-panel) .nav-toggle span { background: #fdf7ea; }
.nav-toggle.active span { background: var(--ink) !important; }
.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 390;
  background: rgba(15, 12, 8, 0.45);
  opacity: 0; transition: opacity .3s ease;
}
.nav-backdrop.open { opacity: 1; }
@media (max-width: 780px) {
  .nav-backdrop { display: block; pointer-events: none; }
  .nav-backdrop.open { pointer-events: auto; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 78vw); height: 100vh;
    background: var(--paper-raised); flex-direction: column; justify-content: center; gap: 26px;
    padding: 40px; transform: translateX(100%); transition: transform .35s ease; box-shadow: var(--shadow);
    z-index: 400;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { color: var(--ink-soft) !important; font-size: 18px; }
  .nav-home-item { display: block; }
  .nav-toggle { display: flex; }
  body.menu-open { overflow: hidden; }
}

/* ===== Screens ===== */
.screen { display: none; }
.screen.active { display: block; }

/* ---- Home screen ---- */
.screen-home {
  position: relative;
  height: 100svh;
  min-height: 560px;
  color: #fbf3e4;
  overflow: hidden;
}
.home-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}
.home-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,12,8,0.55) 0%, rgba(15,12,8,0.35) 30%, rgba(12,10,7,0.7) 78%, rgba(10,8,6,0.88) 100%);
}
.home-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 28px) 32px 28px;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.home-top .hero-eyebrow {
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 12px; font-weight: 600;
  color: var(--gold-soft); margin-bottom: 14px; display: block;
}
.home-top h1 {
  font-size: clamp(34px, 8vw, 52px);
  color: #fdf7ea;
}
.home-tagline {
  margin-top: 14px;
  color: #e6dcc8;
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 42ch;
  margin-left: auto; margin-right: auto;
}
.home-menu {
  list-style: none; margin: 24px 0; padding: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(251,243,228,0.2);
}
.home-menu li { border-bottom: 1px solid rgba(251,243,228,0.2); }
.home-menu a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none;
  padding: 16px 8px;
  color: #fdf7ea;
  font-family: var(--serif);
  font-size: clamp(17px, 4vw, 21px);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.home-menu a i { font-style: normal; color: var(--gold-soft); opacity: 0; transform: translateX(-4px); transition: opacity .2s ease, transform .2s ease; }
.home-menu a:hover { color: var(--gold-soft); }
.home-menu a:hover i { opacity: 1; transform: translateX(0); }
.home-caption { font-size: 12.5px; color: rgba(251,243,228,0.55); letter-spacing: 0.02em; }
.home-caption em { font-style: italic; color: rgba(251,243,228,0.75); }

/* ---- Generic panel screen ---- */
.screen-panel { padding-top: calc(var(--header-h) + 40px); min-height: 100svh; padding-bottom: 80px; }
.panel-head { max-width: 640px; margin-bottom: 40px; }
.panel-head h2 { font-size: clamp(28px, 6vw, 42px); margin-top: 8px; }
.panel-head p { margin-top: 14px; color: var(--ink-soft); font-size: 16px; }

/* ===== Horizontal carousel (one slide at a time, dot pagination) ===== */
.slider {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 32px;
}
.slider::-webkit-scrollbar { display: none; }
.slider-track {
  display: flex;
  gap: 20px;
}
@media (max-width: 720px) { .slider { padding: 0 22px; } .slider-track { gap: 14px; } }

.slide-card {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: 0 0 auto;
  width: min(420px, calc(100vw - 64px));
  cursor: pointer;
  border: none; background: none; padding: 0; text-align: left; font: inherit; color: inherit;
}
@media (max-width: 720px) { .slide-card { width: calc(100vw - 44px); } }

/* ---- Dots ---- */
.dots { display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 22px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line); border: none; padding: 0; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.dot.active { background: var(--gold); transform: scale(1.5); }
.slide-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-raised);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.slide-frame img { width: 100%; height: 100%; object-fit: cover; }
.slide-frame .multi-badge {
  position: absolute; top: 12px; right: 12px;
  background: rgba(20,16,10,0.55); color: #fbf3e4; font-size: 11px; letter-spacing: 0.04em;
  padding: 5px 9px; border-radius: 20px; backdrop-filter: blur(4px);
}
.slide-caption { padding: 14px 2px 0; }
.slide-caption h3 { font-size: 18px; }
.slide-caption .meta { margin-top: 4px; font-size: 13px; color: var(--muted); }

.award-slide { aspect-ratio: 3/4; }
.award-slide-caption .tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gold); font-weight: 600; display: block; margin-bottom: 5px; }
.award-slide-caption h3 { font-size: 16.5px; }
.award-slide-caption .place { font-size: 13px; color: var(--muted); margin-top: 3px; }

.slider-hint {
  padding: 0 32px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 10px;
  display: flex; align-items: center; gap: 6px;
}
@media (max-width: 720px) { .slider-hint { padding: 0 22px; } }

/* ===== Story screen (vertical canvas) ===== */
.screen-story { padding-top: 0; }
.story-hero { width: 100%; aspect-ratio: 4/3; overflow: hidden; margin-top: var(--header-h); }
.story-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.story-body { padding-top: 44px; }
.story-body .eyebrow { margin-bottom: 12px; }
.story-body h2 { font-size: clamp(26px, 6vw, 36px); margin-bottom: 20px; }
.story-body p { color: var(--ink-soft); font-size: 16px; }
.story-photos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin: 24px 0;
}
.story-photos img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1/1; object-fit: cover; }

/* ===== Contacts screen ===== */
.screen-contacts { display: flex; align-items: center; }
.contacts-body { padding-top: 20px; }
.contacts-body h2 { font-size: clamp(28px, 6vw, 40px); margin: 10px 0 16px; max-width: 16ch; }
.contacts-body > p { color: var(--ink-soft); font-size: 16px; max-width: 46ch; margin-bottom: 30px; }
.contact-links { display: flex; flex-direction: column; gap: 12px; margin-bottom: 50px; }
.contact-links a {
  text-decoration: none; color: var(--ink); font-size: 16.5px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.contact-links a:hover { color: var(--gold); border-color: var(--gold); }
.footer-bar {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--muted);
}

/* ===== Lightbox (shared) ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15, 12, 8, 0.92);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  background: var(--paper-raised); color: var(--ink);
  max-width: 1040px; width: 100%; max-height: 90vh;
  display: grid; grid-template-columns: 1.3fr 1fr;
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}
@media (max-width: 860px) { .lightbox-inner { grid-template-columns: 1fr; overflow-y: auto; max-height: 92vh; } }
.lightbox-media { position: relative; background: #0f0c08; display: flex; align-items: center; justify-content: center; min-height: 240px; }
.lightbox-media img { max-height: 80vh; width: 100%; object-fit: contain; transition: filter .25s ease, opacity .25s ease; }
.lightbox-media img.is-loading { filter: blur(14px) saturate(0.9); opacity: 0.85; }
@media (max-width: 860px) { .lightbox-media img { max-height: 50vh; } }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(251,243,228,0.12); border: none; color: #fbf3e4;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(251,243,228,0.24); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox-nav[hidden] { display: none; }
.lightbox-body { padding: 34px 32px; overflow-y: auto; }
.lightbox-body .eyebrow { margin-bottom: 10px; }
.lightbox-body h3 { font-size: 24px; margin-bottom: 6px; }
.lightbox-body .meta { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.lightbox-body p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; white-space: pre-line; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  background: rgba(15,12,8,0.55); color: #fbf3e4; border: none;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(15,12,8,0.8); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
