/* ══ Monoline Ink — kertas putih · tinta hitam · biru redup ══
   Prefix: ml- · Fonts: Instrument Serif (display) · DM Sans (body) */

:root {
  --ml-paper: #FEFCF8;
  --ml-ink: #1F1F1F;
  --ml-blue: #4F7CAC;
  --ml-blue-2: #7EA3C9;
  --ml-line: #E4E0D6;
  --ml-body: #5A564D;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--ml-line);
  color: var(--ml-body);
  -webkit-font-smoothing: antialiased;
}
body:not(.is-open) { overflow: hidden; }

/* ── page frame ── */
.ml-page {
  max-width: 480px; margin: 0 auto; background: var(--ml-paper);
  box-shadow: 0 0 60px rgba(31,31,31,.14); position: relative; overflow-x: clip;
}

/* ── cover: the line unwinds ── */
.ml-cover {
  position: fixed; inset: 0; z-index: 100;
  max-width: 480px; margin: 0 auto;
  background: var(--ml-paper);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s ease, visibility 0s .85s;
}
.ml-wreath {
  position: absolute; width: min(400px, 108%); height: auto;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.ml-wreath path { stroke: var(--ml-ink); stroke-width: 1.7; stroke-linecap: round; }
body.is-open .ml-cover { opacity: 0; visibility: hidden; pointer-events: none; }
body.is-open .ml-wreath { animation: ml-unwind 1s cubic-bezier(.6,0,.4,1) forwards; }
@keyframes ml-unwind {
  0% { stroke-dashoffset: 0; opacity: 1; }
  60% { stroke-dashoffset: 900; opacity: 1; }
  100% { stroke-dashoffset: 900; opacity: 0; transform: translate(-50%, -50%) scale(1.1); }
}
.ml-wreath path { stroke-dasharray: 900; }
.ml-cover-inner {
  position: relative; text-align: center; color: var(--ml-ink);
  padding: 32px 28px; transition: opacity .45s ease;
}
body.is-open .ml-cover-inner { opacity: 0; }

.ml-cover-kicker { font-size: 11px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--ml-blue); margin-bottom: 8px; }
.ml-cover-names {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: 50px; line-height: 1.08;
}
.ml-cover-names span { display: block; font-size: 21px; color: var(--ml-blue); margin: 4px 0; font-style: italic; }
.ml-cover-date { font-size: 14px; letter-spacing: .1em; color: var(--ml-body); }
.ml-cover-guest { margin: 44px 0 24px; font-size: 14px; color: var(--ml-body); background: rgba(254,252,248,.82); border: 1px solid var(--ml-ink); padding: 8px 16px; border-radius: 999px; }
.ml-guest-name { font-family: "Instrument Serif", serif; font-size: 22px; color: var(--ml-ink); margin: 6px 0 4px; }
.ml-guest-note { font-size: 11px; color: #9a948a; }
.ml-open-btn {
  font-family: "DM Sans", sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ml-paper); background: var(--ml-ink);
  border: none; border-radius: 999px; padding: 14px 38px; cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.ml-open-btn:hover { background: var(--ml-blue); transform: translateY(-2px); }

/* ── hero ── */
.ml-hero { text-align: center; padding: 52px 26px 0; }
.ml-hero-line { display: block; width: 100%; height: 34px; margin-bottom: 24px; }
.ml-ln2 { stroke: var(--ml-ink); stroke-width: 1.7; stroke-linecap: round; }
.ml-hero-intro { font-size: 13.5px; line-height: 1.7; color: var(--ml-body); max-width: 34ch; margin: 0 auto 14px; }
.ml-hero-names {
  font-family: "Instrument Serif", serif; font-weight: 400; font-size: 58px; line-height: 1.06;
}
.ml-hero-names em { display: block; font-size: 24px; font-style: italic; color: var(--ml-blue); margin: 6px 0; }
.ml-hero-date { margin-top: 12px; font-size: 14px; letter-spacing: .12em; color: var(--ml-body); }

.ml-cd {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 36px auto 20px; max-width: 350px;
}
.ml-cd-cell {
  border: 1.6px solid var(--ml-ink); border-radius: 50%;
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.ml-cd-cell b {
  font-family: "Instrument Serif", serif; font-weight: 400; font-size: 27px;
  color: var(--ml-ink); font-variant-numeric: tabular-nums; line-height: 1;
}
.ml-cd-cell span { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ml-blue); margin-top: 5px; }
.ml-hero-flourish { display: block; width: 120px; height: 30px; margin: 0 auto 52px; }

/* ── sections ── */
.ml-section { padding: 50px 26px; }
.ml-sec-head { text-align: center; margin-bottom: 30px; }
.ml-sec-kicker { font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--ml-blue); margin-bottom: 6px; }
.ml-sec-title { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 30px; color: var(--ml-ink); }

/* ── couple ── */
.ml-couple-card { text-align: center; }
.ml-portrait { width: 84px; height: 84px; margin: 0 auto 14px; }
.ml-portrait path, .ml-portrait circle { stroke: var(--ml-ink); stroke-width: 1.7; fill: none; stroke-linecap: round; }
.ml-couple-name { font-family: "Instrument Serif", serif; font-size: 25px; color: var(--ml-ink); }
.ml-couple-parents { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--ml-body); }
.ml-couple-ig { margin-top: 8px; font-size: 12.5px; color: var(--ml-blue); letter-spacing: .04em; }
.ml-amp { display: block; width: 56px; height: 36px; margin: 10px auto; }

/* ── events ── */
.ml-events { background: #FAF7F0; }
.ml-event {
  text-align: center; padding: 26px 22px 22px; margin-bottom: 14px;
  border: 1.6px solid var(--ml-ink); background: var(--ml-paper);
  border-radius: 18px 18px 18px 4px;
}
.ml-event-title { font-family: "Instrument Serif", serif; font-size: 23px; color: var(--ml-ink); }
.ml-event-time { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--ml-blue); }
.ml-event-date { font-size: 13px; color: #9a948a; margin-top: 2px; }
.ml-event-venue { margin-top: 12px; font-size: 15px; font-weight: 700; color: var(--ml-ink); }
.ml-event-addr { font-size: 13px; color: var(--ml-body); line-height: 1.55; margin-top: 3px; }
.ml-cal { margin-top: 14px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ml-cal a {
  font-size: 12px; font-weight: 700; text-decoration: none;
  color: var(--ml-ink); border: 1.4px solid var(--ml-ink);
  padding: 7px 13px; border-radius: 999px; transition: background .2s ease, color .2s ease;
}
.ml-cal a:hover { background: var(--ml-ink); color: var(--ml-paper); }

.ml-maps { margin-top: 8px; }
.ml-map-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1.6px solid var(--ml-ink); border-radius: 10px 10px 0 0; overflow: hidden; }
.ml-map-tab {
  appearance: none; border: none; background: var(--ml-paper); cursor: pointer;
  padding: 11px 0; font-family: "DM Sans", sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: .08em; color: var(--ml-ink);
}
.ml-map-tab.is-active { background: var(--ml-ink); color: var(--ml-paper); }
.ml-map { display: block; width: 100%; height: 230px; border: 1.6px solid var(--ml-ink); border-top: none; border-radius: 0 0 10px 10px; }

/* ── story ── */
.ml-story { list-style: none; position: relative; padding-left: 26px; }
.ml-story::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1.6px;
  background: var(--ml-ink);
}
.ml-story-item { position: relative; padding: 0 0 30px 16px; }
.ml-story-item:last-child { padding-bottom: 0; }
.ml-story-item::before {
  content: ""; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px;
  border: 1.6px solid var(--ml-ink); border-radius: 50%; background: var(--ml-paper);
}
.ml-story-item:last-child::before { background: var(--ml-blue); border-color: var(--ml-blue); }
.ml-story-year { font-family: "Instrument Serif", serif; font-size: 15px; color: var(--ml-blue); letter-spacing: .06em; }
.ml-story-title { font-family: "Instrument Serif", serif; font-size: 21px; color: var(--ml-ink); margin: 3px 0 6px; }
.ml-story-text { font-size: 14px; line-height: 1.7; color: var(--ml-body); }

/* ── gallery ── */
.ml-gallery-sec { background: #FAF7F0; }
.ml-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ml-g-item {
  border: 1.6px solid var(--ml-ink); border-radius: 4px 18px 4px 18px;
  overflow: hidden; cursor: zoom-in; background: var(--ml-paper);
  transition: box-shadow .25s ease, transform .25s ease;
 aspect-ratio: 4/3; overflow: hidden; }
.ml-g-item:hover { transform: translateY(-3px); box-shadow: -4px 4px 0 var(--ml-blue-2); }
.ml-g-item svg { display: block; width: 100%; height: auto; }
.ml-g-item img { display: block; width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; }
.ml-g-item { color: #1E1B16; }
.ml-g-item svg path, .ml-g-item svg circle, .ml-g-item svg rect { stroke: var(--ml-ink); stroke-width: 1.7; }

/* ── forms ── */
.ml-form { display: grid; gap: 18px; }
.ml-field { display: grid; gap: 7px; border: none; }
.ml-field span, .ml-field legend { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ml-ink); }
.ml-field input, .ml-field select, .ml-field textarea {
  font-family: "DM Sans", sans-serif; font-size: 15px; color: var(--ml-ink);
  background: transparent; border: none; border-bottom: 1.6px solid var(--ml-ink);
  border-radius: 0; padding: 10px 2px; outline: none; width: 100%;
  transition: border-color .2s ease;
}
.ml-field select { appearance: none; }
.ml-field select option { background: var(--ml-paper); }
.ml-field input:focus, .ml-field select:focus, .ml-field textarea:focus { border-bottom-color: var(--ml-blue); }
.ml-field textarea { resize: vertical; }
.ml-radios { display: block; }
.ml-radios label { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ml-body); padding: 6px 0; text-transform: none; letter-spacing: 0; }
.ml-radios input { accent-color: var(--ml-blue); width: 17px; height: 17px; }
.ml-submit {
  justify-self: center; appearance: none; border: 1.7px solid var(--ml-ink); cursor: pointer;
  font-family: "DM Sans", sans-serif; font-size: 13.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ml-paper); background: var(--ml-ink);
  padding: 14px 36px; border-radius: 999px;
  transition: background .2s ease, border-color .2s ease;
}
.ml-submit:hover { background: var(--ml-blue); border-color: var(--ml-blue); }
.ml-thanks {
  text-align: center; font-family: "Instrument Serif", serif; font-size: 20px;
  color: var(--ml-blue); padding: 26px 10px;
}

/* ── wishes ── */
.ml-wish-form { margin-bottom: 30px; }
.ml-wishes { display: grid; gap: 12px; margin-bottom: 18px; }
[data-wishes-list] .wish {
  background: var(--ml-paper); border: 1.4px solid var(--ml-line); border-left: 2.6px solid var(--ml-blue);
  border-radius: 0 12px 12px 0; padding: 15px 17px 13px;
}
[data-wishes-list] .wish h4 { font-family: "Instrument Serif", serif; font-size: 17px; color: var(--ml-ink); }
[data-wishes-list] .wish p { font-size: 13.5px; line-height: 1.6; color: var(--ml-body); margin-top: 4px; }
[data-wishes-list] .wish time { display: block; font-size: 11px; color: #9a948a; margin-top: 7px; letter-spacing: .04em; }
.ml-more {
  display: block; margin: 0 auto; appearance: none; cursor: pointer;
  background: none; border: 1.5px solid var(--ml-ink); color: var(--ml-ink);
  font-family: "DM Sans", sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 10px 22px; border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.ml-more:hover { background: var(--ml-ink); color: var(--ml-paper); }

/* ── amplop ── */
.ml-amplop { background: #FAF7F0; }
.ml-amplop-note { text-align: center; font-size: 13.5px; line-height: 1.7; color: var(--ml-body); max-width: 38ch; margin: 0 auto 24px; }
.ml-env {
  text-align: center; color: var(--ml-ink);
  border: 1.7px solid var(--ml-ink); background: var(--ml-paper);
  border-radius: 18px 4px 18px 4px; padding: 24px 20px 20px; margin-bottom: 14px;
}
.ml-env-bank { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--ml-blue); }
.ml-env-num { font-family: "Instrument Serif", serif; font-size: 25px; letter-spacing: .06em; margin-top: 8px; }
.ml-env-holder { font-size: 12.5px; color: var(--ml-body); margin-top: 4px; }
.ml-copy {
  margin-top: 14px; appearance: none; cursor: pointer;
  background: var(--ml-ink); color: var(--ml-paper); border: none;
  font-family: "DM Sans", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  padding: 8px 18px; border-radius: 999px; transition: background .2s ease;
}
.ml-copy:hover { background: var(--ml-blue); }

/* ── closing ── */
.ml-closing { text-align: center; color: var(--ml-ink); padding: 54px 28px 40px; }
.ml-close-heart { width: 60px; height: 40px; margin-bottom: 8px; }
.ml-closing-text { font-size: 13.5px; line-height: 1.75; color: var(--ml-body); max-width: 36ch; margin: 0 auto 22px; }
.ml-closing-names {
  font-family: "Instrument Serif", serif; font-size: 40px; line-height: 1.15;
}
.ml-closing-fam { margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ml-blue); }

/* ── music toggle ── */
.ml-music {
  position: fixed; right: 18px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ml-paper); color: var(--ml-ink);
  border: 1.7px solid var(--ml-ink); cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(31,31,31,.18);
}
.ml-music svg { width: 21px; height: 21px; }
.ml-music.is-playing { animation: ml-pulse 2.4s ease infinite; }
@keyframes ml-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(31,31,31,.18), 0 0 0 0 rgba(79,124,172,.5); }
  55% { box-shadow: 0 6px 18px rgba(31,31,31,.18), 0 0 0 12px rgba(79,124,172,0); }
}

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

/* ── draw-on-scroll for line art ── */
.ml-ln2 { stroke-dasharray: 620; }
[data-reveal].revealed .ml-ln2 { animation: ml-draw 1.6s ease forwards; }
@keyframes ml-draw { from { stroke-dashoffset: 620; } to { stroke-dashoffset: 0; } }

/* ── lightbox (theme flavor) ── */
.lb-overlay { font-family: "DM Sans", sans-serif; }
.map-open { color: var(--ml-blue); }

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