/* Rising Sun: farewell gig. Palette: ink #080A09, crimson #922429, sand #DFCEA0. */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Shippori Mincho";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/shippori-mincho-jp-subset.woff2") format("woff2");
  unicode-range: U+305F, U+306D-306E, U+307E, U+51FA, U+65E5, U+672C;
}

:root {
  --ink: #080a09;
  --crimson: #922429;
  --sand: #dfcea0;

  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-jp: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark is the default (the page is a night out); light follows the system or the toggle. */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--ink);
  --fg: var(--sand);
  --muted: rgb(223 206 160 / 0.7);
  --faint: rgb(223 206 160 / 0.45);
  --line: rgb(223 206 160 / 0.16);
  --line-strong: rgb(223 206 160 / 0.32);
  --surface: rgb(223 206 160 / 0.045);
  --surface-strong: rgb(223 206 160 / 0.08);
  --sun: var(--crimson);
  --sun-glow: rgb(146 36 41 / 0.55);
  --accent-text: #d9636a; /* crimson lifted for text on ink (5.6:1) */
  --btn-bg: var(--crimson);
  --btn-fg: var(--sand);
  --btn-hover: #a92c32;
  --field-bg: rgb(223 206 160 / 0.06);
  --error: #ec8c90;
  --grain-opacity: 0.07;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: var(--sand);
  --fg: var(--ink);
  --muted: rgb(8 10 9 / 0.72);
  --faint: rgb(8 10 9 / 0.5);
  --line: rgb(8 10 9 / 0.16);
  --line-strong: rgb(8 10 9 / 0.34);
  --surface: rgb(255 250 235 / 0.32);
  --surface-strong: rgb(255 250 235 / 0.55);
  --sun: var(--crimson);
  --sun-glow: rgb(146 36 41 / 0.25);
  --accent-text: var(--crimson); /* 5.4:1 on sand */
  --btn-bg: var(--crimson);
  --btn-fg: var(--sand);
  --btn-hover: #7b1d22;
  --field-bg: rgb(255 250 235 / 0.5);
  --error: #7b1d22;
  --grain-opacity: 0.1;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

/* Film grain over everything, very subtle. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--crimson);
  color: var(--sand);
}

.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: -4rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.5s ease;
}
.topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.brand-mark {
  position: relative;
  width: 22px;
  height: 11px;
  overflow: hidden;
  border-bottom: 1.5px solid currentColor;
}
.brand-mark::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sun);
}

.topnav {
  margin-left: auto;
  display: flex;
  gap: 1.6rem;
}
.topnav a {
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}
.topnav a:hover {
  color: var(--fg);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.4s var(--ease-out);
}
.theme-toggle:hover {
  background: var(--surface-strong);
}
.theme-toggle:active {
  transform: rotate(25deg) scale(0.94);
}
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  transition: opacity 0.3s ease, transform 0.5s var(--ease-out);
}
.theme-toggle .icon-moon {
  fill: currentColor;
  stroke: none;
}
[data-theme="dark"] .theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-60deg) scale(0.6);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 0.95rem/1.1 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.btn-primary:hover {
  background: var(--btn-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--surface-strong);
  border-color: var(--fg);
}
.btn-small {
  min-height: 40px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}
.btn-block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: calc(100svh - 70px);
  padding: clamp(1.5rem, 5vh, 3.5rem) var(--gutter) clamp(2.5rem, 6vh, 4rem);
}

.kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker-sep {
  margin: 0 0.4em;
  color: var(--accent-text);
}

.sunrise {
  --size: clamp(220px, 46vw, 480px);
  position: relative;
  width: var(--size);
  height: calc(var(--size) * 0.56);
  margin-top: clamp(1.25rem, 4vh, 2.75rem);
  overflow: hidden;
}
.sun {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--sun) 88%, #ffb38a) 0%, var(--sun) 58%);
  /* Bands across the lower half: a sun coming up through the horizon. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0 34%, transparent 34% 36.5%, #000 36.5% 42%, transparent 42% 45.5%, #000 45.5% 50%, transparent 50% 54.5%, #000 54.5%);
  mask-image: linear-gradient(to bottom, #000 0 34%, transparent 34% 36.5%, #000 36.5% 42%, transparent 42% 45.5%, #000 45.5% 50%, transparent 50% 54.5%, #000 54.5%);
  animation: rise 2.6s var(--ease-out) 0.15s both;
  /* scroll: the sun sets behind the horizon as the page moves on (set by app.js) */
  translate: 0 calc(var(--sink, 0) * 62%);
}
.sunrise::before {
  /* glow */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 140%;
  height: 140%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--sun-glow), transparent 70%);
  filter: blur(10px);
  animation: glow 3.2s ease 0.2s both, breathe 6s ease-in-out 3.4s infinite alternate;
}

.jp-vertical {
  position: absolute;
  right: -0.15em;
  top: 0.4rem;
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
  letter-spacing: 0.35em;
  color: var(--fg);
  opacity: 0;
  animation: fade-in 1.2s ease 1.4s forwards;
}

.horizon {
  width: min(100%, 760px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fg) 18%, var(--fg) 82%, transparent);
  opacity: 0.6;
  transform-origin: center;
  animation: draw 1.6s var(--ease-out) both;
}

.title {
  margin: clamp(0.75rem, 2.4vh, 1.5rem) 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4.2rem, 15.5vw, 11.5rem);
  line-height: 0.86;
  letter-spacing: -0.025em;
}
.title-art {
  display: inline-block;
}
/* each word is a window; its letters rise into it one by one, like the sun */
.title .word {
  display: inline-block;
  overflow: hidden;
  padding: 0.02em 0.07em 0.17em;
  margin: -0.02em -0.07em -0.17em;
  vertical-align: top;
}
.title .ch {
  display: inline-block;
  animation: ch-rise 1.2s var(--ease-out) both;
}
.title .word:first-child .ch:nth-child(1) { animation-delay: 0.45s; }
.title .word:first-child .ch:nth-child(2) { animation-delay: 0.51s; }
.title .word:first-child .ch:nth-child(3) { animation-delay: 0.57s; }
.title .word:first-child .ch:nth-child(4) { animation-delay: 0.63s; }
.title .word:first-child .ch:nth-child(5) { animation-delay: 0.69s; }
.title .word:first-child .ch:nth-child(6) { animation-delay: 0.75s; }
.title em.word .ch:nth-child(1) { animation-delay: 0.9s; }
.title em.word .ch:nth-child(2) { animation-delay: 0.97s; }
.title em.word .ch:nth-child(3) { animation-delay: 1.04s; }
.title em {
  font-style: italic;
  color: var(--accent-text);
  padding-right: 0.04em;
}

.lede {
  max-width: 36ch;
  margin: clamp(1rem, 2.6vh, 1.6rem) auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  animation: up 1.2s var(--ease-out) 0.5s both;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: clamp(1.5rem, 3.6vh, 2.25rem) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  animation: up 1.2s var(--ease-out) 0.62s both;
}
.facts li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem clamp(0.9rem, 2.2vw, 1.6rem);
  line-height: 1.25;
}
.facts li + li {
  border-left: 1px solid var(--line);
}
.fact-label {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
.fact-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: clamp(1.5rem, 3.6vh, 2.25rem);
  animation: up 1.2s var(--ease-out) 0.74s both;
}

.countdown {
  min-height: 1.6em;
  margin: 1.1rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.countdown strong {
  color: var(--accent-text);
  font-weight: 600;
}

/* ---------------------------------------------------------------- sections */

.section {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(4rem, 10vw, 7.5rem);
  border-top: 1px solid var(--line);
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--accent-text);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.015em;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- story */

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.story-quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.7vw, 2.15rem);
  line-height: 1.32;
}
.story-quote p {
  margin: 0 0 0.9em;
}
.story-open {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.015em;
}
.story-quote em {
  color: var(--accent-text);
}
.story-sign {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1.6rem;
  font-style: italic;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
}
.story-sign::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--line-strong);
  align-self: center;
}
.story-sign-jp {
  font-family: var(--font-jp);
  font-style: normal;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-text);
}

/* Ticket */
.ticket {
  --notch: 13px;
  position: relative;
  padding: 1.6rem 1.6rem 1.4rem;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  transform: rotate(1.5deg);
  transition: transform 0.6s var(--ease-out);
  overflow: hidden;
}
.ticket:hover {
  transform: rotate(0deg) translateY(-4px);
}
.ticket-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1.4rem;
}
.ticket-place {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.ticket-place-end {
  align-items: flex-end;
  text-align: right;
}
.ticket-label {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.ticket-code {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
}
.ticket-code:lang(ja) {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.27;
  color: var(--accent-text);
}
.ticket-city {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.ticket-arc {
  flex: 1;
  max-width: 120px;
  margin-bottom: 1.9rem;
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.4;
  stroke-dasharray: 3 4;
  overflow: visible;
}
.ticket-arc circle {
  fill: var(--sun);
  stroke: none;
}
.ticket-rows {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
  margin: 0;
  padding-top: 1.3rem;
  border-top: 1.5px dashed var(--line-strong);
}
.ticket-rows::before,
.ticket-rows::after {
  content: "";
  position: absolute;
  top: calc(-1 * var(--notch) - 1px);
  width: calc(2 * var(--notch));
  height: calc(2 * var(--notch));
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: background-color 0.5s ease;
}
.ticket-rows::before {
  left: calc(-1.6rem - var(--notch) - 1px);
}
.ticket-rows::after {
  right: calc(-1.6rem - var(--notch) - 1px);
}
.ticket-rows dt {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
.ticket-rows dd {
  margin: 0.1rem 0 0;
  font-weight: 500;
}
.ticket-barcode {
  height: 38px;
  margin-top: 1.3rem;
  opacity: 0.75;
  background: repeating-linear-gradient(90deg, var(--fg) 0 2px, transparent 2px 4px, var(--fg) 4px 5px, transparent 5px 9px, var(--fg) 9px 12px, transparent 12px 14px, var(--fg) 14px 15px, transparent 15px 19px);
}

/* ---------------------------------------------------------------- line-up */

.acts {
  margin: 0;
  padding: 0;
  list-style: none;
}
.act {
  display: grid;
  grid-template-columns: clamp(3.5rem, 9vw, 7rem) 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
}
.act:first-child {
  border-top: 1px solid var(--line);
}
.act-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  color: var(--accent-text);
}
.act-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 6.6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  transition: transform 0.6s var(--ease-out);
}
.act:hover .act-name {
  transform: translateX(0.6rem);
}
.act-feat {
  font-style: italic;
  font-size: 0.55em;
  color: var(--muted);
  padding: 0 0.1em;
}
.act-meta {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- venue */

.venue-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
}

.essentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.essential {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 170px;
  padding: clamp(1.2rem, 2.5vw, 1.75rem);
  background: var(--bg);
  transition: background-color 0.5s ease;
}
.essential dt {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.essential dd {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.essential-main {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.05;
}
.essential-sub {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.map-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.map-frame {
  position: relative;
  flex: 1;
  min-height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
[data-theme="dark"] .map-frame iframe {
  filter: grayscale(0.4) invert(0.9) hue-rotate(180deg) contrast(0.9);
}
.map-placeholder {
  position: absolute;
  inset: 0;
}
.map-streets {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  background:
    linear-gradient(104deg, transparent 47.6%, var(--line-strong) 47.6% 49.6%, transparent 49.6%) 0 0 / 100% 100%,
    linear-gradient(8deg, transparent 54%, var(--line-strong) 54% 56.5%, transparent 56.5%) 0 0 / 100% 100%,
    linear-gradient(172deg, transparent 30%, var(--line) 30% 31%, transparent 31%) 0 0 / 100% 100%,
    linear-gradient(80deg, transparent 72%, var(--line) 72% 73%, transparent 73%) 0 0 / 100% 100%,
    repeating-linear-gradient(0deg, transparent 0 46px, var(--line) 46px 47px),
    repeating-linear-gradient(90deg, transparent 0 46px, var(--line) 46px 47px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
}
.map-pin {
  position: absolute;
  left: 50%;
  top: 36%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg) 70%, transparent);
}
.map-pin span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--sun);
  animation: ping 2.4s ease-out infinite;
}
.map-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.5rem;
  background: linear-gradient(to top, var(--bg) 35%, transparent);
}
.map-caption strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1;
}
.map-caption span {
  max-width: 38ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.map-caption .btn {
  margin-top: 0.6rem;
}
.map-caption small {
  font-size: 0.72rem;
  color: var(--faint);
}
.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.map-actions .btn {
  flex: 1 1 200px;
}

/* ---------------------------------------------------------------- calendar */

.calendar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}
.cal-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.cal-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.3s var(--ease-out);
}
.cal-btn:hover {
  border-color: var(--accent-text);
  background: var(--surface-strong);
  transform: translateY(-2px);
}
.cal-btn svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- RSVP */

.rsvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.rsvp-intro p {
  max-width: 42ch;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}
.rsvp-intro .privacy-note {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
  font-size: 0.98rem;
  line-height: 1.5;
}
.privacy-note svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.7;
  stroke-linecap: round;
}
.privacy-note strong {
  font-weight: 600;
}

.rsvp-card {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}
.rsvp-card::before {
  /* a sliver of sun peeking over the card */
  content: "";
  position: absolute;
  top: -1px;
  right: clamp(1.5rem, 4vw, 2.5rem);
  width: 64px;
  height: 32px;
  border-radius: 0 0 64px 64px;
  background: var(--sun);
}

.field {
  margin-bottom: 1.35rem;
}
.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  min-height: 54px;
  padding: 0.8rem 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--fg);
  font: 400 1.05rem/1.3 var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field input::placeholder {
  color: var(--faint);
}
.field input:focus {
  outline: none;
  border-color: var(--accent-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crimson) 35%, transparent);
}
.field input[aria-invalid="true"] {
  border-color: var(--error);
}
.field-error {
  min-height: 0;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--error);
}
.field-error:empty {
  display: none;
}
.field-hint {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--field-bg);
}
.stepper:focus-within {
  border-color: var(--accent-text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--crimson) 35%, transparent);
}
.stepper-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-strong);
  color: var(--fg);
  font: 500 1.4rem/1 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.stepper-btn:hover:not(.is-limit) {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.stepper-btn:active:not(.is-limit) {
  transform: scale(0.92);
}
.stepper-btn.is-limit {
  opacity: 0.35;
  cursor: not-allowed;
}
.stepper input {
  width: 3.2rem;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-align: center;
  font: 400 1.9rem/1 var(--font-display);
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input:focus {
  outline: none;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rsvp-form .btn-block {
  margin-top: 0.4rem;
  min-height: 56px;
  font-size: 1.02rem;
}
.form-status {
  min-height: 1.5em;
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.form-status.is-error {
  color: var(--error);
}
.fineprint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--faint);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}

.rsvp-done,
.rsvp-closed {
  text-align: center;
  padding: 1.5rem 0.5rem 0.5rem;
}
.rsvp-done:focus {
  outline: none;
}
.done-sun {
  width: 96px;
  height: 48px;
  margin: 0 auto 1.5rem;
  border-radius: 96px 96px 0 0;
  background: var(--sun);
  border-bottom: 2px solid var(--fg);
  animation: rise-small 1.4s var(--ease-out) both;
}
.done-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.05;
}
.rsvp-done p,
.rsvp-closed p {
  max-width: 36ch;
  margin: 0.9rem auto 1.5rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) 3rem;
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer-jp {
  margin: 0;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  line-height: 1.1;
  color: var(--accent-text);
}
.footer-line {
  margin: 0.6rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.footer-privacy {
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
  color: var(--faint);
}
.footer-meta {
  margin: 2.5rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------------------------------------------------------------- dialog */

.cancel-dialog {
  width: min(100% - 2rem, 460px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
}
.cancel-dialog::backdrop {
  background: rgb(8 10 9 / 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cancel-body {
  padding: 2rem;
}
.cancel-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1.05;
}
.cancel-body p {
  margin: 0.9rem 0 0;
  color: var(--muted);
}
.cancel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.cancel-actions .btn {
  flex: 1 1 180px;
}

/* ---------------------------------------------------------------- motion */

@keyframes rise {
  from {
    transform: translateY(58%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes ch-rise {
  from {
    transform: translateY(110%) rotate(4deg);
  }
  to {
    transform: none;
  }
}
@keyframes breathe {
  from {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  to {
    opacity: 0.68;
    transform: translateX(-50%) scale(1.07);
  }
}
@keyframes rise-small {
  from {
    transform: translateY(40%);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes glow {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade-in {
  to {
    opacity: 0.85;
  }
}
@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  80%,
  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .sun {
    translate: none;
  }
  .jp-vertical {
    opacity: 0.85;
  }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .story-grid,
  .venue-grid,
  .calendar-grid,
  .rsvp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ticket {
    max-width: 420px;
    transform: rotate(-1deg);
  }
}

@media (max-width: 720px) {
  .topnav {
    display: none;
  }
  .topbar {
    justify-content: space-between;
  }
  .facts {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    width: min(100%, 420px);
    border-radius: 22px;
    overflow: hidden;
    background: var(--line);
  }
  .facts li {
    grid-column: span 2;
    background: var(--bg);
    transition: background-color 0.5s ease;
  }
  .facts li:nth-child(n + 4) {
    grid-column: span 3;
  }
  .facts li + li {
    border-left: 0;
  }
  .actions .btn {
    flex: 1 1 100%;
  }
  .act-name {
    font-size: clamp(2rem, 9vw, 3rem);
  }
}

@media (max-width: 520px) {
  .essentials {
    grid-template-columns: 1fr;
  }
  .essential {
    min-height: 0;
  }
  .cal-buttons {
    grid-template-columns: 1fr;
  }
  .jp-vertical {
    right: -0.35em;
  }
}
