:root {
  color-scheme: dark;
  --bg: #000;
  --ink: #f2f0ea;
  --muted: #9a9892;
  --quiet: #5d5b56;
  --line: rgba(242, 240, 234, 0.18);
  --line-strong: rgba(242, 240, 234, 0.42);
  --surface: rgba(255, 255, 255, 0.03);
  --poster-serif: Didot, "Bodoni 72", "Bodoni 72 Oldstyle", "Times New Roman", "AppleMyungjo", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SF Mono", "Roboto Mono", "Cascadia Code", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--poster-serif);
}

body.is-preloading-mask .site-header,
body.is-preloading-mask main {
  opacity: 0;
  visibility: hidden;
}

.site-header,
main {
  transition: opacity 420ms ease, visibility 420ms ease;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(18px, 4vw, 56px);
  mix-blend-mode: difference;
}

.admin-header {
  justify-content: flex-start;
}

.brand,
.nav-links a,
.language-toggle,
.section-label,
.event-line,
.viewer-note,
.rsvp-form span,
.admin-access-form span,
.admin-button,
.submit-button,
.form-status {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.brand,
.nav-links a,
.language-toggle {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  width: clamp(76px, 6.8vw, 112px);
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 48px);
  margin-left: auto;
  margin-right: clamp(18px, 3vw, 40px);
}

.language-toggle {
  position: relative;
  display: inline-flex;
  min-height: 1.5em;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
}

.language-toggle::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
}

.language-toggle[aria-pressed="true"]::after {
  opacity: 1;
}

[data-i18n],
[data-i18n-html],
.language-toggle {
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
}

body.is-language-changing [data-i18n],
body.is-language-changing [data-i18n-html],
body.is-language-changing .language-toggle {
  opacity: 0.16;
  filter: blur(3px);
  transform: translateY(2px);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(280px, 0.48fr) minmax(420px, 0.52fr);
  grid-template-rows: 1fr auto;
  gap: clamp(34px, 5vw, 88px);
  align-items: center;
  padding: clamp(94px, 13vh, 150px) clamp(18px, 4vw, 56px) 30px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 520px;
  align-self: end;
  padding-bottom: clamp(34px, 7vh, 88px);
}

.section-label {
  margin: 0 0 22px;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--poster-serif);
  font-weight: 400;
  letter-spacing: 0.015em;
}

h1 {
  max-width: 760px;
  font-size: clamp(58px, 7.6vw, 112px);
  line-height: 0.86;
}

h2 {
  max-width: 840px;
  font-size: clamp(42px, 5.8vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.section-heading h2,
.venue-copy h2 {
  max-width: 620px;
  font-size: clamp(38px, 5.3vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

html[lang="en"] .section-heading h2,
html[lang="en"] .venue-copy h2 {
  max-width: 440px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.012em;
}

html[lang="en"] .venue-copy h2 {
  max-width: 520px;
}

.hero-copy p:not(.section-label),
.venue-section p:not(.section-label) {
  max-width: 520px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.55;
}

strong {
  color: var(--ink);
  font-weight: 500;
}

.viewer-shell {
  position: relative;
  width: min(100%, 690px);
  min-height: clamp(430px, 70vh, 780px);
  align-self: stretch;
  justify-self: end;
  margin-left: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.08), transparent 42%);
  cursor: grab;
}

.viewer-shell:active {
  cursor: grabbing;
}

#mask-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.viewer-note,
.viewer-shell .scroll-cue {
  position: absolute;
  color: var(--quiet);
}

.viewer-note {
  left: 0;
  right: 0;
  top: clamp(40px, 7vh, 72px);
  text-align: center;
  pointer-events: none;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.viewer-shell .scroll-cue {
  right: 50%;
  bottom: clamp(8px, 1.8vh, 20px);
  transform: translateX(50%);
}

.scroll-cue::after {
  width: 42px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.event-line {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.rsvp-section,
.venue-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 76px);
  padding: clamp(70px, 11vw, 150px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.section-heading {
  position: sticky;
  top: 96px;
  height: fit-content;
}

.rsvp-form {
  align-self: start;
  padding-top: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 28px;
}

label {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.rsvp-form span {
  color: var(--quiet);
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 18px/1.35 var(--poster-serif);
  outline: none;
}

input,
select {
  min-height: 48px;
}

textarea {
  min-height: 94px;
  padding-top: 12px;
  resize: vertical;
}

select option {
  background: #050505;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
}

.message-field {
  margin-top: 34px;
}

.plus-one-field {
  display: none;
}

.plus-one-field.is-visible {
  display: grid;
}

.submit-button {
  width: 100%;
  min-height: 54px;
  margin-top: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: transparent;
  color: var(--ink);
}

.form-status {
  min-height: 22px;
  margin: 20px 0 0;
  color: var(--muted);
  text-transform: none;
}

.venue-section {
  grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1fr);
  min-height: 58vh;
}

.venue-copy {
  align-self: start;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.map-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line-strong);
  padding: 0 18px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.map-actions a:hover,
.map-actions a:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.map-frame {
  min-height: clamp(320px, 48vw, 560px);
  border: 1px solid var(--line);
  background: var(--surface);
  filter: grayscale(1) invert(0.92) contrast(0.92);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}

.admin-page {
  min-height: 100svh;
}

.admin-shell {
  min-height: 100svh;
  padding: clamp(110px, 16vh, 170px) clamp(18px, 4vw, 56px) 56px;
}

.admin-login {
  max-width: 520px;
}

.admin-login h1,
.admin-heading h1 {
  font-size: clamp(52px, 7vw, 104px);
  line-height: 0.9;
}

.admin-access-form {
  display: grid;
  gap: 30px;
  margin-top: 48px;
}

.admin-access-form span {
  color: var(--quiet);
}

.admin-dashboard {
  display: grid;
  gap: clamp(34px, 5vw, 70px);
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.admin-button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  padding: 0 16px;
  color: var(--ink);
  cursor: pointer;
}

.admin-button:hover,
.admin-button:focus-visible {
  background: var(--ink);
  color: var(--bg);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.admin-metrics article {
  min-height: 150px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px;
}

.admin-metrics span,
.admin-panel th {
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.admin-metrics strong {
  display: block;
  margin-top: 24px;
  color: var(--ink);
  font-family: var(--poster-serif);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 400;
  line-height: 0.9;
}

.admin-grid {
  display: grid;
  gap: 34px;
}

.admin-panel {
  min-width: 0;
}

.admin-panel h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
}

.admin-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 14px 16px 0;
  text-align: left;
  vertical-align: top;
}

td {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.35;
}

@media (max-width: 840px) {
  .site-header {
    padding: 18px;
  }

  .nav-links {
    gap: 16px;
    margin-right: 14px;
  }

  .hero,
  .rsvp-section,
  .venue-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 92px;
    gap: 32px;
  }

  .hero-copy {
    align-self: start;
    padding-bottom: 0;
  }

  .viewer-shell {
    width: 100%;
    min-height: 56vh;
    margin-left: 0;
  }

  .event-line {
    grid-template-columns: 1fr;
  }

  .scroll-cue {
    position: static;
    grid-column: 1 / -1;
    width: fit-content;
    margin: 0 auto;
    transform: none;
  }

  .viewer-shell .scroll-cue {
    position: absolute;
    right: 50%;
    bottom: clamp(8px, 1.8vh, 20px);
    transform: translateX(50%);
  }

  .section-heading {
    position: static;
  }

  .admin-heading {
    display: grid;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 18px;
    padding: 20px 18px 14px;
  }

  .nav-links {
    flex: 1;
    justify-content: flex-end;
    gap: clamp(13px, 4vw, 20px);
    margin-right: 10px;
  }

  .brand,
  .nav-links a,
  .language-toggle,
  .section-label,
  .event-line,
  .viewer-note,
  .rsvp-form span,
  .admin-access-form span,
  .admin-button,
  .submit-button,
  .form-status {
    font-size: 10px;
  }

  .language-toggle {
    font-size: 11px;
  }

  .brand,
  .nav-links a,
  .language-toggle {
    letter-spacing: 0.12em;
  }

  .brand {
    width: 84px;
  }

  .hero {
    min-height: 100svh;
    align-content: start;
    gap: 24px;
    padding: 102px 18px 24px;
  }

  .hero-copy p:not(.section-label),
  .venue-section p:not(.section-label) {
    max-width: 100%;
    margin-top: 22px;
    font-size: 18px;
    line-height: 1.5;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(54px, 16vw, 68px);
    line-height: 0.9;
  }

  .section-heading h2,
  .venue-copy h2 {
    max-width: 100%;
    font-size: clamp(42px, 12vw, 56px);
    line-height: 1.04;
    letter-spacing: -0.01em;
  }

  html[lang="en"] .section-heading h2,
  html[lang="en"] .venue-copy h2 {
    max-width: 310px;
    font-size: clamp(32px, 8.4vw, 38px);
    line-height: 1.08;
  }

  html[lang="en"] .venue-copy h2 {
    max-width: 340px;
  }

  .section-label {
    margin-bottom: 18px;
  }

  .viewer-shell {
    min-height: 43svh;
    max-height: 430px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.075), transparent 48%);
  }

  .viewer-note {
    top: 36px;
  }

  .event-line {
    gap: 10px;
    padding-top: 16px;
  }

  .rsvp-section,
  .venue-section {
    gap: 34px;
    padding: 88px 18px;
    scroll-margin-top: 110px;
  }

  .form-grid {
    gap: 30px;
  }

  input,
  select {
    min-height: 58px;
  }

  input,
  select,
  textarea {
    font-size: 28px;
    line-height: 1.24;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .submit-button {
    min-height: 66px;
    margin-top: 28px;
  }

  .map-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .map-actions a {
    justify-content: center;
    min-height: 58px;
    padding: 0 12px;
  }

  .map-frame {
    min-height: 390px;
  }

  .admin-shell {
    padding: 106px 18px 46px;
  }

  .admin-login h1,
  .admin-heading h1 {
    font-size: clamp(54px, 16vw, 72px);
  }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-button {
    min-height: 50px;
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-metrics article {
    min-height: 120px;
  }
}
