@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Noto+Serif+KR:wght@400;500;600&family=Manrope:wght@400;500;600&display=swap');

:root {
  --page-bg: #eae6dd;
  --surface: #fbfaf6;
  --surface-soft: #f3f0e8;
  --text-primary: #282722;
  --text-secondary: #777269;
  --accent-gold: #9e8b61;
  --accent-dark: #5e594d;
  --line: rgba(40, 39, 34, .15);
  --line-strong: rgba(40, 39, 34, .28);
  --serif: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --display: 'DM Serif Display', 'Times New Roman', serif;
  --sans: 'Manrope', 'Apple SD Gothic Neo', sans-serif;
  --gutter: clamp(20px, 6vw, 30px);
  --content: 460px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page-bg); }
body { margin: 0; color: var(--text-primary); background: var(--page-bg); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; background: var(--text-primary); color: #fff; transform: translateY(-140%); transition: transform .2s; }
.skip-link:focus { transform: translateY(0); }
.page-shell { width: min(100%, var(--content)); margin: 0 auto; background: var(--surface); box-shadow: 0 0 60px rgba(58, 52, 40, .12); overflow: hidden; }
.invitation { overflow: hidden; }
.section-reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s ease, transform .55s ease; }
.section-reveal.is-visible { opacity: 1; transform: none; }

.hero { display: grid; grid-template-columns: 48% 52%; aspect-ratio: 4 / 3; min-height: 0; background: #eeebe3; }
.hero-copy { padding: 26px 8px 15px var(--gutter); position: relative; z-index: 1; }
.eyebrow, .section-kicker, dt, .label, .footer-mark { font-family: var(--sans); letter-spacing: .18em; font-size: 10px; color: var(--text-secondary); }
.eyebrow { white-space: nowrap; transform: rotate(-90deg); transform-origin: left top; position: absolute; top: 66px; left: 12px; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 9vw, 43px); line-height: .94; letter-spacing: -.045em; margin: 0; white-space: nowrap; }
h1 span { display: block; }
.hero-title { font-size: 16px; font-weight: 500; margin: 18px 0 0; white-space: nowrap; letter-spacing: -.05em; }
.hero-rule { width: 25px; border-top: 1px solid var(--accent-gold); margin: 18px 0 15px; }
.hero-date { font-family: var(--sans); font-size: 10px; line-height: 1.9; letter-spacing: .16em; color: var(--text-secondary); }
.hero-date span { color: var(--accent-dark); }
.hero-invitation-copy { margin: 16px 0 0; font-size: 12px; line-height: 1.55; letter-spacing: -.12em; word-break: keep-all; }
.hero-photo { position: relative; margin: 0; height: 100%; min-height: 0; overflow: hidden; }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(238,235,227,.22), transparent 24%); pointer-events: none; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero-photo figcaption { position: absolute; z-index: 1; bottom: 17px; right: 13px; font-family: var(--sans); font-size: 8px; letter-spacing: .18em; color: rgba(255,255,255,.83); writing-mode: vertical-rl; }

.invitation-intro { text-align: center; padding: 52px var(--gutter) 46px; background: var(--surface); }
.section-kicker { margin: 0 0 14px; color: var(--accent-gold); }
h2 { margin: 0; font-size: 25px; font-weight: 500; letter-spacing: -.08em; }
.family-line { color: var(--text-secondary); font-size: 13px; margin: 16px 0 0; }
.family-line b { color: var(--text-primary); font-weight: 500; }
.invitation-copy { font-size: 14px; line-height: 2.25; letter-spacing: -.08em; margin: 0; }

.event-section { padding: 0 var(--gutter) 72px; }
.section-heading { text-align: center; margin-bottom: 24px; }
.event-card { border: 1px solid var(--line); background: rgba(255,255,255,.42); }
.event-date-display { text-align: center; padding: 25px 14px 23px; border-bottom: 1px solid var(--line); }
.event-date-display .label { display: block; color: var(--accent-gold); margin-bottom: 6px; }
.event-date-display strong { display: block; font-family: var(--serif); font-size: clamp(16px, 5.4vw, 26px); font-weight: 500; color: var(--text-primary); letter-spacing: -.075em; white-space: nowrap; }
.dday-block .label { display: block; color: var(--accent-gold); margin-bottom: 3px; }
.dday-block strong { display: block; font-family: var(--display); font-size: 42px; line-height: 1.15; font-weight: 400; color: var(--accent-gold); }
.dday-block #dday-caption { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: .03em; color: var(--text-secondary); margin-top: 4px; }
.event-details { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.48fr); margin: 0; padding: 24px 15px; }
.event-details > div { min-width: 0; padding: 0 16px; border-left: 1px solid var(--line); }
.event-details > div:first-child { border-left: 0; }
dt { margin-bottom: 10px; color: var(--accent-gold); }
dd { margin: 0; font-size: 14px; line-height: 1.65; letter-spacing: -.06em; }
dd span { color: var(--text-secondary); font-size: 12px; word-break: keep-all; }
dd strong { display: block; font-family: var(--display); font-size: 38px; line-height: 1.15; font-weight: 400; color: var(--accent-gold); letter-spacing: .02em; }
dd small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 10px; line-height: 1.4; color: var(--text-secondary); letter-spacing: -.02em; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.outline-button { min-height: 44px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-family: var(--sans); font-size: 9px; cursor: pointer; transition: background .2s, border .2s; }
.outline-button:hover, .outline-button:focus-visible { background: var(--surface-soft); border-color: var(--accent-gold); outline: none; }
.button-icon { width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; fill: none; stroke: var(--accent-gold); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.status-message { min-height: 18px; margin: 10px 0 -8px; text-align: center; font-family: var(--sans); font-size: 11px; color: var(--accent-dark); }

.directions-section, .gallery-section, .guestbook-section { padding: 0 var(--gutter) 80px; }
.with-lines { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.with-lines > span { height: 1px; background: var(--line); }
.with-lines .section-kicker { margin-bottom: 8px; }
.with-lines h2 { font-family: var(--display); font-size: 25px; letter-spacing: .14em; }
.map-card { position: relative; height: 190px; overflow: hidden; border: 1px solid var(--line); background: #e3e1d8; isolation: isolate; }
.map-card > .map-fallback { position: absolute; inset: 0; overflow: hidden; }
.map-card > .map-error { display: none; position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; padding: 7px 9px; background: rgba(251,250,246,.9); text-align: center; font-family: var(--sans); font-size: 10px; color: var(--text-secondary); }
.map-grid { position: absolute; inset: -30px; opacity: .55; background-image: linear-gradient(32deg, transparent 45%, rgba(255,255,255,.9) 46%, rgba(255,255,255,.9) 49%, transparent 50%), linear-gradient(148deg, transparent 42%, rgba(255,255,255,.85) 43%, rgba(255,255,255,.85) 46%, transparent 47%), linear-gradient(90deg, rgba(122,128,112,.08) 1px, transparent 1px), linear-gradient(rgba(122,128,112,.08) 1px, transparent 1px); background-size: 74px 60px, 90px 68px, 25px 25px, 25px 25px; transform: rotate(-4deg) scale(1.2); }
.map-road { position: absolute; height: 11px; background: rgba(255,255,255,.83); transform: rotate(-19deg); box-shadow: 0 1px rgba(155,154,143,.22); }
.map-road-one { width: 125%; top: 74%; left: -11%; }
.map-road-two { width: 115%; top: 18%; left: 3%; transform: rotate(24deg); height: 7px; }
.map-water { position: absolute; width: 24%; height: 130%; top: -15%; right: 14%; background: rgba(174,197,191,.55); transform: rotate(18deg); }
.map-pin { position: absolute; left: 54%; top: 47%; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent-gold); color: #fff; font-size: 15px; box-shadow: 0 3px 8px rgba(74,64,45,.18); }
.map-pin::first-letter { transform: rotate(45deg); }
.map-label { position: absolute; left: calc(54% + 28px); top: calc(47% - 13px); color: var(--text-primary); font-size: 12px; line-height: 1.35; background: rgba(251,250,246,.84); padding: 4px 6px; }
.map-label small { font-family: var(--sans); font-size: 9px; letter-spacing: .04em; color: var(--text-secondary); }
.map-note { position: absolute; left: 13px; bottom: 10px; margin: 0; font-family: var(--sans); font-size: 9px; line-height: 1.55; color: var(--text-secondary); }
.place-summary { padding-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.place-summary b, .place-summary span { display: block; }
.place-summary b { font-size: 14px; letter-spacing: -.06em; margin-bottom: 5px; }
.place-summary > div > span { font-size: 12px; color: var(--text-secondary); line-height: 1.55; letter-spacing: -.05em; }
.map-links { display: grid; gap: 6px; }
.map-link { display: flex; align-items: center; justify-content: space-between; min-height: 35px; padding: 0 12px; text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--sans); font-size: 10px; transition: background .2s; }
.map-link:hover, .map-link:focus-visible { background: var(--surface-soft); outline: none; }
.map-link.primary { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.pending-note { margin: 18px 0 0; text-align: center; font-family: var(--sans); font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.gallery-item { display: block; aspect-ratio: 1; padding: 0; border: 0; overflow: hidden; background: var(--surface-soft); cursor: zoom-in; }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.04); }
.gallery-item:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
.gallery-hint { text-align: center; font-family: var(--sans); font-size: 10px; color: var(--text-secondary); margin: 14px 0 0; }

.guestbook-lead { text-align: center; font-size: 13px; color: var(--text-secondary); margin: -11px 0 21px; }
.guestbook-form { display: grid; grid-template-columns: 30% 1fr auto; gap: 8px; align-items: center; }
.guestbook-form label { position: relative; display: block; height: 40px; }
.guestbook-form label > span { position: absolute; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); overflow: hidden; }
.guestbook-form input, .guestbook-form textarea { display: block; width: 100%; height: 40px; min-height: 40px; resize: none; padding: 0 11px; border: 1px solid var(--line); border-radius: 4px; outline: none; background: rgba(255,255,255,.5); color: var(--text-primary); font-family: var(--sans); font-size: 11px; line-height: 40px; }
.guestbook-form input:focus, .guestbook-form textarea:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 2px rgba(158,139,97,.14); }
.guestbook-form button { min-height: 40px; padding: 0 15px; border: 0; border-radius: 4px; background: var(--accent-gold); color: #fff; font-family: var(--sans); font-size: 11px; cursor: pointer; }
.guestbook-form button:disabled { opacity: .5; cursor: wait; }
.guestbook-notice { margin: 12px 0 0; text-align: center; font-family: var(--sans); font-size: 10px; color: var(--text-secondary); }
.guestbook-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.guest-card { min-height: 124px; padding: 13px 11px; border: 1px solid var(--line); background: rgba(255,255,255,.32); }
.guest-card strong { display: block; font-size: 11px; font-weight: 600; letter-spacing: -.06em; }
.guest-card p { min-height: 40px; margin: 8px 0 10px; font-size: 11px; line-height: 1.55; letter-spacing: -.06em; overflow-wrap: anywhere; }
.guest-card time { font-family: var(--sans); font-size: 9px; color: var(--text-secondary); }
.empty-guestbook { grid-column: 1 / -1; text-align: center; padding: 18px 0; font-size: 11px; color: var(--text-secondary); }

.site-footer { padding: 0 var(--gutter) 38px; text-align: center; }
.footer-rule { border-top: 1px solid var(--line); margin-bottom: 36px; }
.site-footer p { margin: 0; font-size: 14px; line-height: 2; letter-spacing: -.08em; }
.footer-mark { display: block; margin-top: 28px; font-size: 8px; color: var(--accent-gold); }

.lightbox { display: none; position: fixed; inset: 0; z-index: 20; align-items: center; justify-content: center; padding: 55px 34px; background: rgba(32,30,25,.94); }
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; width: min(100%, 760px); text-align: center; }
.lightbox img { display: block; width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox figcaption { margin-top: 12px; font-family: var(--sans); font-size: 10px; color: rgba(255,255,255,.8); }
.lightbox-close, .lightbox-nav { position: absolute; border: 0; background: transparent; color: white; cursor: pointer; }
.lightbox-close { top: 12px; right: 14px; font-size: 34px; font-weight: 200; line-height: 1; padding: 8px; }
.lightbox-nav { top: 50%; width: 44px; height: 60px; margin-top: -30px; font-family: var(--display); font-size: 48px; line-height: 48px; color: rgba(255,255,255,.84); }
.lightbox-nav.prev { left: 5px; }
.lightbox-nav.next { right: 5px; }

@media (min-width: 700px) {
  .page-shell { margin: 28px auto; }
  .hero { min-height: 0; }
  .hero-photo { min-height: 0; }
}
@media (max-width: 370px) {
  .hero { min-height: 0; }
  .hero-photo { min-height: 0; }
  .hero-copy { padding-top: 24px; }
  h1 { font-size: 33px; }
  .event-details { padding-inline: 7px; }
  .event-details > div { padding-inline: 9px; }
  dd { font-size: 13px; }
  dd strong { font-size: 32px; }
  .place-summary { grid-template-columns: 1fr; }
  .map-links { grid-template-columns: repeat(3, 1fr); }
  .map-link { padding-inline: 8px; font-size: 8px; }
}
@media (min-width: 371px) and (max-width: 430px) {
  .hero { grid-template-columns: 47% 53%; min-height: 0; }
  .hero-photo { min-height: 0; }
  .hero-copy { padding: 24px 4px 15px 18px; }
  h1 { font-size: clamp(30px, 7.8vw, 36px); letter-spacing: -.065em; }
  .hero-title { font-size: 14px; margin-top: 16px; }
  .hero-rule { margin: 24px 0 17px; }
  .hero-date { font-size: 9px; letter-spacing: .11em; }
  .hero-invitation-copy { margin-top: 22px; font-size: 11px; line-height: 1.78; letter-spacing: -.13em; }
  .event-date-display { padding-inline: 10px; }
  .event-date-display strong { font-size: clamp(16px, 5vw, 21px); }
  .event-details { padding-inline: 10px; }
  .event-details > div { padding-inline: 12px; }
  dd { font-size: 13px; }
  dd span { font-size: 11px; }
  dd strong { font-size: 35px; }
  .outline-button { font-size: 10px; }
  .button-icon { width: 14px; height: 14px; }
}
@media (max-width: 430px) {
  .hero { grid-template-columns: 47% 53%; aspect-ratio: 4 / 3; min-height: 0; }
  .hero-photo { min-height: 0; }
  .hero-copy { padding: 24px 4px 15px 16px; }
  h1 { font-size: clamp(29px, 7.2vw, 34px); }
  .hero-title { font-size: 13px; margin-top: 12px; }
  .hero-rule { margin: 18px 0 14px; }
  .hero-invitation-copy { margin-top: 16px; font-size: 11px; line-height: 1.55; letter-spacing: -.13em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .section-reveal { opacity: 1; transform: none; }
}
