/* ══ Swiss Grid — putih steril · hitam tinta · merah Swiss ══
   Prefix: sw- · Fonts: Inter Tight (display) · IBM Plex Mono (label) */

:root {
  --sw-white: #FFFFFF;
  --sw-paper: #F4F4F2;
  --sw-ink: #111111;
  --sw-red: #E63312;
  --sw-gray: #6E6E6E;
  --sw-line: #D9D9D6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter Tight", "Helvetica Neue", sans-serif;
  background: var(--sw-line);
  color: var(--sw-ink);
  -webkit-font-smoothing: antialiased;
}
body:not(.is-open) { overflow: hidden; }

/* ── page frame ── */
.sw-page {
  max-width: 480px; margin: 0 auto; background: var(--sw-white);
  border-left: 1px solid var(--sw-ink); border-right: 1px solid var(--sw-ink);
  position: relative; overflow-x: clip;
}

/* ── cover: grid collapse ── */
.sw-cover {
  position: fixed; inset: 0; z-index: 100;
  max-width: 480px; margin: 0 auto;
  background: var(--sw-white);
  display: flex; align-items: center; justify-content: center;
  transition: visibility 0s 1s;
}
.sw-half { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--sw-white); z-index: 1; }
.sw-half-top { top: 0; border-bottom: 1px solid var(--sw-ink); transition: transform .9s cubic-bezier(.8,0,.2,1); }
.sw-half-bot { bottom: 0; transition: transform .9s cubic-bezier(.8,0,.2,1); }
body.is-open .sw-cover { visibility: hidden; pointer-events: none; }
body.is-open .sw-half-top { transform: translateY(-101%); }
body.is-open .sw-half-bot { transform: translateY(101%); }
.sw-cover-inner {
  position: relative; z-index: 2; text-align: center; color: var(--sw-ink);
  width: 100%; padding: 30px 26px;
  transition: opacity .45s ease;
}
body.is-open .sw-cover-inner { opacity: 0; }

.sw-cover-meta {
  display: flex; justify-content: space-between;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .18em;
  border-bottom: 1px solid var(--sw-ink); padding-bottom: 10px; margin-bottom: 26px;
}
.sw-mark {
  font-size: 44px; font-weight: 500; color: var(--sw-red); line-height: 1;
  margin-bottom: 10px;
}
.sw-cover-names {
  font-weight: 800; font-size: clamp(34px, 14vw, 62px); line-height: .96; letter-spacing: -.03em;
  text-transform: uppercase; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; text-wrap: balance;
}
.sw-cover-names span { display: block; font-size: 26px; font-weight: 400; color: var(--sw-red); margin: 8px 0; letter-spacing: 0; }
.sw-cover-date { margin-top: 14px; font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.sw-cover-guest { margin: 28px 0 26px; }
.sw-mono-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .22em; }
.sw-guest-name { font-weight: 700; font-size: 20px; margin: 8px 0 4px; }
.sw-guest-note { font-size: 11px; color: var(--sw-gray); }
.sw-open-btn {
  font-family: "Inter Tight", sans-serif; font-size: 15px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sw-white); background: var(--sw-ink);
  border: none; padding: 15px 40px; cursor: pointer;
  transition: background .2s ease;
}
.sw-open-btn:hover { background: var(--sw-red); }
.sw-cover-foot {
  display: flex; justify-content: space-between; margin-top: 26px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .18em; color: var(--sw-gray);
  border-top: 1px solid var(--sw-ink); padding-top: 10px;
}

/* ── hero ── */
.sw-hero { padding: 40px 22px 0; }
.sw-hero-rule { border-top: 3px solid var(--sw-ink); margin: 0 4px 22px; }
.sw-hero-intro { font-size: 13px; line-height: 1.65; color: var(--sw-gray); max-width: 36ch; }
.sw-hero-names {
  font-weight: 800; font-size: clamp(36px, 16vw, 88px); line-height: .9; letter-spacing: -.04em;
  text-transform: uppercase; margin: 20px 0 8px; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; text-wrap: balance;
}
.sw-hero-names em { font-style: normal; display: block; color: var(--sw-red); font-size: 40px; }
.sw-hero-date { font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid var(--sw-ink); padding: 12px 0 14px; }
.sw-hero-date i { font-style: normal; color: var(--sw-red); margin: 0 10px; }

.sw-cd {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--sw-line); margin: 34px 0 44px;
}
.sw-cd-cell {
  border-right: 1px solid var(--sw-line); padding: 14px 8px 12px; text-align: left;
}
.sw-cd-cell b {
  display: block; font-weight: 700; font-size: 27px; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.sw-cd-cell span { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .2em; color: var(--sw-gray); }

/* ── sections ── */
.sw-section { padding: 44px 22px 52px; }
.sw-sec-head {
  display: flex; align-items: baseline; gap: 14px;
  border-top: 1px solid var(--sw-ink); padding-top: 12px; margin-bottom: 26px;
}
.sw-sec-index { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--sw-red); letter-spacing: .1em; }
.sw-sec-title { font-weight: 800; font-size: 24px; letter-spacing: -.02em; text-transform: uppercase; }

/* ── couple ── */
.sw-couple { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; }
.sw-person { }
.sw-person-name { font-weight: 700; font-size: 19px; line-height: 1.2; letter-spacing: -.01em; }
.sw-person-role { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .18em; color: var(--sw-red); margin: 6px 0 10px; }
.sw-person-parents { font-size: 12px; line-height: 1.6; color: var(--sw-gray); border-top: 1px solid var(--sw-line); padding-top: 8px; }
.sw-person-ig { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; margin-top: 8px; }
.sw-couple-amp { font-size: 22px; font-weight: 400; color: var(--sw-red); align-self: center; }

/* ── events ── */
.sw-events { background: var(--sw-paper); }
.sw-event { border-top: 1px solid var(--sw-ink); padding-top: 14px; margin-bottom: 26px; }
.sw-event-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .18em; color: var(--sw-red); }
.sw-event-title { font-weight: 800; font-size: 26px; letter-spacing: -.02em; margin: 6px 0 12px; }
.sw-event-specs { border-top: 1px solid var(--sw-line); }
.sw-event-specs div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--sw-line); }
.sw-event-specs dt { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .16em; color: var(--sw-gray); padding-top: 2px; }
.sw-event-specs dd { font-size: 13px; line-height: 1.55; }
.sw-cal { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.sw-cal a {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .08em; text-decoration: none;
  color: var(--sw-ink); border: 1px solid var(--sw-ink);
  padding: 7px 11px; transition: background .15s ease, color .15s ease;
}
.sw-cal a:hover { background: var(--sw-ink); color: var(--sw-white); }

.sw-maps { margin-top: 4px; }
.sw-map-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--sw-ink); }
.sw-map-tab {
  appearance: none; border: none; background: var(--sw-white); cursor: pointer;
  padding: 11px 0; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .14em;
  color: var(--sw-ink);
}
.sw-map-tab.is-active { background: var(--sw-red); color: var(--sw-white); }
.sw-map { display: block; width: 100%; height: 230px; border: 1px solid var(--sw-ink); border-top: none; }

/* ── story ── */
.sw-story { list-style: none; }
.sw-story-item { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--sw-line); }
.sw-story-item:last-child { border-bottom: none; }
.sw-story-num {
  font-family: "IBM Plex Mono", monospace; font-size: 30px; font-weight: 500;
  color: transparent; -webkit-text-stroke: 1.2px var(--sw-ink); line-height: 1;
}
.sw-story-title { font-weight: 700; font-size: 16px; letter-spacing: .01em; text-transform: uppercase; }
.sw-story-text { font-size: 13.5px; line-height: 1.65; color: var(--sw-gray); margin-top: 6px; }

/* ── gallery ── */
.sw-gallery-sec { background: var(--sw-paper); }
.sw-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw-g-item {
  overflow: hidden; cursor: zoom-in; background: var(--sw-white);
  outline: 1px solid var(--sw-ink); outline-offset: 0;
  transition: outline-color .2s ease;
 aspect-ratio: 4/3; overflow: hidden; }
.sw-g-item:hover { outline: 2px solid var(--sw-red); }
.sw-g-item svg { display: block; width: 100%; height: auto; }
.sw-g-item img { display: block; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.sw-g-item { color: #E63312; }

/* ── forms ── */
.sw-form { display: grid; gap: 20px; }
.sw-field { display: grid; gap: 6px; border: none; }
.sw-field span, .sw-field legend { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .2em; color: var(--sw-ink); }
.sw-field input, .sw-field select, .sw-field textarea {
  font-family: "Inter Tight", sans-serif; font-size: 15px; font-weight: 500; color: var(--sw-ink);
  background: transparent; border: none; border-bottom: 2px solid var(--sw-ink);
  border-radius: 0; padding: 9px 2px; outline: none; width: 100%;
  transition: border-color .2s ease;
}
.sw-field select { appearance: none; }
.sw-field select option { background: var(--sw-white); }
.sw-field input:focus, .sw-field select:focus, .sw-field textarea:focus { border-bottom-color: var(--sw-red); }
.sw-field textarea { resize: vertical; }
.sw-radios { display: block; }
.sw-radios label { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 6px 0; }
.sw-radios input { accent-color: var(--sw-red); width: 16px; height: 16px; }
.sw-submit {
  justify-self: start; appearance: none; cursor: pointer;
  font-family: "Inter Tight", sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sw-white); background: var(--sw-red);
  border: none; padding: 14px 34px;
  transition: background .2s ease;
}
.sw-submit:hover { background: var(--sw-ink); }
.sw-thanks {
  font-family: "IBM Plex Mono", monospace; font-size: 13px;
  border: 1px solid var(--sw-ink); padding: 18px; margin-top: 20px;
}

/* ── wishes ── */
.sw-wish-form { margin-bottom: 28px; }
.sw-wishes { display: grid; gap: 0; margin-bottom: 18px; border-top: 1px solid var(--sw-ink); }
[data-wishes-list] .wish {
  background: var(--sw-white); border-bottom: 1px solid var(--sw-line);
  padding: 14px 2px 12px;
}
[data-wishes-list] .wish h4 { font-weight: 700; font-size: 14.5px; text-transform: uppercase; letter-spacing: .02em; }
[data-wishes-list] .wish h4::before { content: "+ "; color: var(--sw-red); }
[data-wishes-list] .wish p { font-size: 13px; line-height: 1.6; color: var(--sw-gray); margin-top: 4px; }
[data-wishes-list] .wish time { display: block; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--sw-gray); margin-top: 7px; letter-spacing: .1em; }
.sw-more {
  display: block; margin: 0 auto; appearance: none; cursor: pointer;
  background: var(--sw-white); border: 1px solid var(--sw-ink); color: var(--sw-ink);
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .16em;
  padding: 10px 22px; transition: background .15s ease, color .15s ease;
}
.sw-more:hover { background: var(--sw-ink); color: var(--sw-white); }

/* ── amplop ── */
.sw-amplop-note { font-size: 13px; line-height: 1.65; color: var(--sw-gray); max-width: 40ch; margin-bottom: 22px; }
.sw-env { border: 1px solid var(--sw-ink); padding: 20px; margin-bottom: 14px; background: var(--sw-white); }
.sw-env-label { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .2em; color: var(--sw-red); }
.sw-env-bank { font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: -.01em; margin-top: 6px; }
.sw-env-num { font-family: "IBM Plex Mono", monospace; font-size: 16px; margin-top: 8px; border-top: 1px solid var(--sw-line); padding-top: 10px; }
.sw-env-holder { font-size: 12px; color: var(--sw-gray); margin-top: 4px; }
.sw-copy {
  margin-top: 14px; appearance: none; cursor: pointer;
  background: var(--sw-ink); color: var(--sw-white); border: none;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .12em;
  padding: 8px 16px; transition: background .2s ease;
}
.sw-copy:hover { background: var(--sw-red); }

/* ── closing ── */
.sw-closing { background: var(--sw-ink); color: var(--sw-white); padding: 52px 26px 40px; text-align: left; }
.sw-closing-mark { color: var(--sw-red); font-size: 40px; font-weight: 500; line-height: 1; }
.sw-closing-text { font-size: 13px; line-height: 1.7; color: #b9b9b6; max-width: 38ch; margin: 18px 0 26px; }
.sw-closing-names { font-weight: 800; font-size: clamp(30px, 12vw, 56px); line-height: 1; letter-spacing: -.03em; text-transform: uppercase; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; text-wrap: balance; padding-inline: 4px; }
.sw-closing-names i { font-style: normal; color: var(--sw-red); }
.sw-closing-fam { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .22em; margin-top: 18px; color: #b9b9b6; }

/* ── music toggle: square ── */
.sw-music {
  position: fixed; right: 18px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 0;
  background: var(--sw-white); color: var(--sw-ink);
  border: 1.5px solid var(--sw-ink); cursor: pointer;
  display: grid; place-items: center;
}
.sw-music svg { width: 20px; height: 20px; }
.sw-music.is-playing { background: var(--sw-red); color: var(--sw-white); border-color: var(--sw-red); animation: sw-blink 1.4s steps(2) infinite; }
@keyframes sw-blink { 50% { border-color: var(--sw-ink); } }

/* ── reveal (behavior-critical) ── */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ── lightbox (theme flavor) ── */
.lb-overlay { font-family: "Inter Tight", sans-serif; }
.map-open { color: var(--sw-red); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  /* cover-open end-states so content remains reachable */
  body.is-open [data-cover] { opacity: 0 !important; visibility: hidden !important; }
}
