:root {
  --bg: #faf7f2;
  --paper: #ffffff;
  --ink: #3a2f2a;
  --muted: #8a7d74;
  --wine: #7a1f2b;
  --wine-soft: #f3e6e6;
  --gold: #b89a5e;
  --line: #e8dfd4;
  --serif: "Cormorant Garamond", "Zen Kaku Gothic New", serif;
  --sans: "Zen Kaku Gothic New", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.9;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% center;
  animation: zoom 18s ease-out forwards;
}
@keyframes zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(40,15,15,.55) 100%);
}
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 18%;
  text-align: center;
  animation: fadeUp 1.4s .3s both;
}
.hero-sub {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(18px, 4vw, 26px); letter-spacing: .12em;
}
.hero-names {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 10vw, 84px); line-height: 1.2;
}
.hero-names span { font-style: italic; color: #f1d9a6; }
.hero-date { font-family: var(--serif); font-size: clamp(20px, 5vw, 30px); letter-spacing: .2em; }
.hero-date small { font-size: .6em; }
.hero-ja { display: inline-block; margin-top: 14px; padding: 4px 18px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; font-size: clamp(13px, 3.4vw, 15px); letter-spacing: .2em; }
.scroll {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  font-family: var(--serif); font-size: 13px; letter-spacing: .3em; text-decoration: none;
  padding-bottom: 44px;
}
.scroll::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 36px;
  background: #fff; animation: line 2s infinite;
}
@keyframes line { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- SECTIONS ---------- */
.section { max-width: 720px; margin: 0 auto; padding: 96px 20px; text-align: center; }
.en {
  font-family: var(--serif); font-style: italic;
  color: var(--gold); font-size: 22px; letter-spacing: .12em;
}
h2 { font-size: 15px; font-weight: 500; letter-spacing: .3em; margin-bottom: 40px; }
h2::after { content: ""; display: block; width: 32px; height: 1px; background: var(--gold); margin: 14px auto 0; }
.lead { font-size: 14px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.lead.small { font-size: 14px; color: var(--muted); margin-top: -16px; margin-bottom: 40px; }
.lead b { color: var(--wine); }
.pc { display: none; }
@media (min-width: 640px) { .pc { display: inline; } }

.couple { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 440px; margin: 56px auto 0; }
.couple img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 50% 50% 8px 8px / 26% 26% 8px 8px; }
.couple figure:first-child img { object-position: center top; }
.couple figure:last-child img { object-position: center top; }
.couple figcaption { margin-top: 14px; font-size: 15px; }
.en-s { display: block; font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 16px; }

/* ---------- COUNTDOWN ---------- */
.countdown-wrap { position: relative; height: 460px; overflow: hidden; color: #fff; }
@media (min-width: 720px) { .countdown-wrap { height: clamp(420px, 50vw, 640px); } }
.cd-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 64% 30%; }
.countdown-wrap::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,20,15,0) 45%, rgba(30,20,15,.75) 100%); z-index: 1; }
.cd-inner { position: relative; z-index: 2; height: 100%; display: grid; place-content: end center; padding-bottom: 28px; text-align: center; }
.cd-inner .en { color: #f1d9a6; }
.countdown { display: flex; gap: clamp(12px, 4vw, 32px); margin-top: 10px; }
.countdown div { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.countdown b { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 9vw, 56px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; letter-spacing: .2em; }

/* ---------- INFO ---------- */
.date-big { font-family: var(--serif); display: flex; flex-direction: column; line-height: 1.1; margin-bottom: 36px; }
.date-big .y { font-size: 20px; letter-spacing: .3em; color: var(--muted); }
.date-big .md { font-size: 72px; color: var(--wine); }
.date-big .w { font-size: 16px; letter-spacing: .4em; margin-top: 10px; }

.timeline { max-width: 320px; margin: 0 auto 48px; text-align: left; }
.timeline div { display: flex; gap: 24px; padding: 12px 4px; border-bottom: 1px dashed var(--line); }
.timeline dt { font-family: var(--serif); font-size: 22px; color: var(--wine); width: 64px; line-height: 1.3; }
.timeline dd { align-self: center; }

.card {
  background: var(--paper); border-radius: 16px; padding: 36px 24px;
  box-shadow: 0 6px 30px rgba(90,60,40,.06); margin-bottom: 24px;
}
.card h3 { font-size: 14px; font-weight: 500; letter-spacing: .3em; color: var(--muted); margin-bottom: 16px; }
.fee-row { display: flex; justify-content: center; gap: 40px; }
.fee-row div { display: flex; flex-direction: column; }
.lbl { font-size: 13px; color: var(--muted); }
.yen { font-family: var(--serif); font-size: 40px; color: var(--wine); line-height: 1.2; }
.yen small { font-family: var(--sans); font-size: 14px; margin-left: 2px; }
.note { font-size: 12px; color: var(--muted); margin-top: 16px; }

.venue-name { font-family: var(--serif); font-size: 36px; font-weight: 600; letter-spacing: .15em; line-height: 1.2; }
.venue-desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.addr { font-size: 14px; }
.access { list-style: none; font-size: 13px; color: var(--muted); margin: 12px 0 20px; }
.map { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; }
.btns { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

.photo-band img { width: 100%; height: clamp(260px, 50vw, 520px); object-fit: cover; object-position: center 35%; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; border: 1px solid var(--wine); border-radius: 999px;
  padding: 12px 28px; font: inherit; font-size: 14px; letter-spacing: .1em;
  text-decoration: none; cursor: pointer; transition: .2s;
}
.btn.ghost { color: var(--wine); background: transparent; }
.btn.ghost:hover { background: var(--wine-soft); }
.btn.primary { background: var(--wine); color: #fff; width: 100%; padding: 16px; font-size: 16px; }
.btn.primary:hover { opacity: .88; }
.btn.primary:disabled { opacity: .5; cursor: wait; }

/* ---------- FORM ---------- */
.form { text-align: left; background: var(--paper); border-radius: 16px; padding: 32px 20px; box-shadow: 0 6px 30px rgba(90,60,40,.06); }
.field { display: block; margin-bottom: 24px; }
.label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.hint { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.label i { font-style: normal; font-size: 10px; color: #fff; background: var(--wine); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.row2 { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .form { padding: 40px 36px; } }

input[type=text], input[type=email], textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fdfbf8;
  transition: border-color .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.invalid input[type=text], .invalid input[type=email] { border-color: #c0392b; }
.invalid .attend span, .invalid .seg span { border-color: #c0392b; }

.attend, .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.attend input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.attend span, .seg span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: .2s;
  background: #fdfbf8; text-align: center;
}
.attend span { padding: 18px 8px; font-size: 18px; }
.attend em { font-family: var(--serif); font-size: 14px; color: var(--muted); }
.seg span { padding: 12px 8px; font-size: 14px; }
.attend input:checked + span, .seg input:checked + span { border-color: var(--wine); background: var(--wine-soft); color: var(--wine); }
.attend input:checked + span em { color: var(--wine); }
.attend input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.fee-preview { text-align: center; background: var(--wine-soft); border-radius: 10px; padding: 12px; margin-bottom: 20px; font-size: 14px; }
.fee-preview b { color: var(--wine); font-size: 18px; }
.form-error { color: #c0392b; font-size: 13px; text-align: center; min-height: 1.5em; margin-bottom: 8px; }
.is-absent .attend-only { display: none; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 72px 20px 56px; background: #2f2522; color: #e9e0d6; font-size: 13px; }
.footer .en { color: #f1d9a6; font-size: 30px; }
.footer .contact { margin-top: 16px; color: #a99c90; font-size: 12px; }

/* ---------- THANKS PAGE ---------- */
.thanks-hero { position: relative; height: clamp(260px, 42vw, 440px); overflow: hidden; color: #fff; }
.thanks-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.thanks-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30,20,15,.1) 30%, rgba(30,20,15,.6) 100%); z-index: 1; }
.thanks-hero .inner { position: relative; z-index: 2; height: 100%; display: grid; place-content: end center; padding-bottom: 32px; text-align: center; }
.thanks-hero .big { font-family: var(--serif); font-style: italic; font-size: clamp(44px, 11vw, 72px); line-height: 1.1; }
.thanks-hero .inner p:last-child { font-size: 13px; letter-spacing: .3em; }
.thanks-main { max-width: 640px; margin: 0 auto; padding: 56px 20px 80px; text-align: center; }
.thanks-main h1 { font-size: clamp(18px, 4.6vw, 22px); font-weight: 500; line-height: 1.7; margin: 8px 0 20px; text-wrap: balance; }
.thanks-main .lead { color: var(--ink); }
.mail-note { font-size: 12px; color: var(--muted); margin-top: 16px; }
.summary { text-align: left; margin-top: 40px; }
.summary dl { margin: 0; }
.summary dl > div { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.summary dt { width: 72px; flex-shrink: 0; font-size: 13px; color: var(--muted); }
.summary dd { font-size: 14px; min-width: 0; }
.summary dd b { color: var(--wine); font-weight: 500; }
.thanks-actions { margin-top: 40px; display: grid; gap: 12px; }
.thanks-actions .btn.primary { text-decoration: none; text-align: center; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s, transform 1s; }
.reveal.on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
