:root {
  --ink: #0b1c24;
  --ink-soft: #14303b;
  --foam: #f3efe6;
  --foam-deep: #e7e1d4;
  --brass: #c4a35a;
  --brass-deep: #6e5420;
  --text: #1a2428;
  --muted: #3d5159;
  --line: rgba(243, 239, 230, 0.18);
  --header-h: 4.75rem;
  --measure: 68ch;
  --space: clamp(1.25rem, 2vw, 2rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--foam);
  color: var(--text);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 40;
  transform: translateY(-120%);
  background: var(--brass);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: var(--header-h);
  padding: 0.6rem 1.25rem;
  background: var(--ink);
  color: var(--foam);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--foam);
  text-decoration: none;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-mark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  line-height: 1;
}

.brand-name {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  color: var(--foam);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background-color 200ms ease, color 200ms ease;
}

.has-tip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 0.45rem);
  z-index: 30;
  width: max-content;
  max-width: 14rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: var(--foam);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%) translateY(0.2rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.has-tip[data-tip]::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 0.15rem);
  z-index: 31;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-bottom-color: var(--foam);
  transform: translateX(-50%) translateY(0.2rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.has-tip[data-tip]:hover::after,
.has-tip[data-tip]:focus-visible::after,
.has-tip[data-tip]:hover::before,
.has-tip[data-tip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.site-nav a:hover {
  background: rgba(243, 239, 230, 0.08);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--brass);
  border-radius: 0;
}

.site-nav a.nav-join[aria-current="page"] {
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--ink);
}

.nav-join {
  margin-left: 0.35rem;
  background: var(--brass);
  color: var(--ink) !important;
  font-weight: 600;
}

.nav-join:hover {
  background: #d4b56e;
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(88vh, 52rem);
  color: var(--foam);
  background: var(--ink);
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 28, 36, 0.78) 0%, rgba(11, 28, 36, 0.28) 55%, rgba(11, 28, 36, 0.45) 100%),
    linear-gradient(180deg, rgba(11, 28, 36, 0.15) 0%, rgba(11, 28, 36, 0.88) 78%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 2.5rem));
  margin: 0;
  padding: clamp(4.5rem, 12vh, 8rem) 0 clamp(2.5rem, 6vh, 4rem) 1.25rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--brass);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.7rem, 6.4vw, 5.4rem);
}

.lede {
  max-width: 42rem;
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--foam);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  background: var(--brass);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 200ms ease, transform 200ms ease;
}

.button:hover {
  background: #d4b56e;
}

.button-ghost {
  background: transparent;
  color: var(--foam);
  box-shadow: inset 0 0 0 1px rgba(243, 239, 230, 0.55);
}

.button-ghost:hover {
  background: rgba(243, 239, 230, 0.1);
}

.records {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink);
  color: var(--foam);
  border-top: 1px solid var(--line);
}

.records div {
  padding: 1.5rem 1.25rem 1.6rem;
  border-left: 1px solid var(--line);
}

.records div:first-child {
  border-left: 0;
}

.stat {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
  color: var(--brass);
}

.records p:last-child {
  margin: 0.35rem 0 0;
  color: var(--foam);
  max-width: 28ch;
}

.section {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.prose {
  max-width: var(--measure);
}

.prose p,
.story p {
  margin: 0 0 1.1rem;
}

.prose a,
.story a,
.contact-card a {
  color: var(--brass-deep);
  text-underline-offset: 0.18em;
}

.prose a:hover,
.story a:hover,
.contact-card a:hover {
  color: var(--ink);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.frame {
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  border-radius: 2px;
}

.frame img {
  width: 100%;
  height: auto;
}

.frame figcaption {
  padding: 0.75rem 0.1rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  background: var(--foam);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.join-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--ink);
  color: var(--foam);
  border-radius: 2px;
}

.join-panel h2,
.join-panel p {
  color: var(--foam);
}

.join-panel p {
  max-width: 48ch;
  margin: 0 0 1.4rem;
}

.page-hero {
  background: var(--ink);
  color: var(--foam);
  padding: clamp(3.5rem, 8vw, 6rem) 1.25rem clamp(2.5rem, 5vw, 3.5rem);
}

.page-hero-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 14ch;
}

.page-hero p {
  max-width: 42rem;
  margin: 0;
  color: var(--foam);
  font-size: 1.125rem;
}

.story {
  width: min(760px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 0 1rem;
}

.story h2 {
  margin: 2rem 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.story-photo {
  width: min(640px, calc(100% - 2.5rem));
  margin: 0.5rem auto;
}

.story-photo img {
  width: 100%;
  height: auto;
}

.story-photo figcaption {
  padding-top: 0.7rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-card {
  margin: 0;
  padding: 0;
}

.contact-card div {
  padding: 1.15rem 0;
  border-top: 1px solid var(--foam-deep);
}

.contact-card div:first-child {
  border-top: 0;
  padding-top: 0;
}

.contact-card dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.contact-card dd {
  margin: 0.25rem 0 0;
  font-size: 1.125rem;
}

.contact-card ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.contact-card li + li {
  margin-top: 0.35rem;
}

.map-frame {
  min-height: 420px;
  background: var(--ink);
  overflow: hidden;
}

.map-frame iframe {
  width: 100%;
  height: 420px;
  border: 0;
}

.site-footer {
  background: var(--ink);
  color: var(--foam);
  padding: 2.5rem 1.25rem;
}

.site-footer-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.site-footer a,
.site-footer .mail-link {
  color: var(--brass);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer .mail-link:hover {
  text-decoration: underline;
}

.mail-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  min-height: 44px;
  text-align: left;
}

.contact-card .mail-link {
  color: var(--brass-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.contact-card .mail-link:hover {
  color: var(--ink);
}

.site-credit {
  width: min(1120px, 100%);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.footer-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
}

@media (max-width: 900px) {
  .records,
  .split,
  .join-panel,
  .contact-layout,
  .gallery {
    grid-template-columns: 1fr;
  }

  .records div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .records div:first-child {
    border-top: 0;
  }

  .hero-content {
    width: min(100% - 2.5rem, 760px);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-inline: 1rem;
  }

  .brand-name {
    display: none;
  }

  .hero {
    min-height: 92vh;
  }

  .hero-content {
    padding-left: 1rem;
    width: calc(100% - 2rem);
  }

  .section,
  .story,
  .story-photo {
    width: calc(100% - 2rem);
  }
}

.gallery-section {
  padding-top: 2rem;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.gallery-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}

.photo-tile {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ink);
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
  min-width: 0;
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: transform 220ms ease;
}

.photo-tile:hover img,
.photo-tile:focus-visible img {
  transform: scale(1.04);
}

.gallery-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(11, 28, 36, 0.94);
  color: var(--foam);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: calc(100vh - 7rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
}

.lightbox-figure figcaption {
  font-size: 0.95rem;
  color: var(--brass);
}

.lightbox-close,
.lightbox-nav {
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(243, 239, 230, 0.35);
  background: rgba(11, 28, 36, 0.85);
  color: var(--foam);
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--brass);
  color: var(--ink);
  border-color: var(--brass);
}

.lightbox-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.lightbox-prev {
  grid-column: 1;
  grid-row: 2;
}

.lightbox-next {
  grid-column: 3;
  grid-row: 2;
}

@media (max-width: 700px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .lightbox-figure {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .lightbox-close {
    grid-column: 2;
    grid-row: 1;
  }

  .lightbox-prev {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }

  .lightbox-next {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }

}
