*, *::before, *::after{ box-sizing: border-box; }
html, body{ width:100%; overflow-x:hidden; }

:root{
  --bg:#ffffff;
  --bg2:#f6f7f9;
  --text:#1c2b3a;
  --muted:#5b6b7b;
  --accent:#2f4f7c;
  --accent2:#274464;
  --card:#ffffff;
  --border:#e7edf4;
  --shadow: 0 12px 28px rgba(0,0,0,.08);
  --radius:16px;
  --max: 1100px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.55;
}

a{ color: inherit; }
strong{ font-weight:600; }

main{ max-width: 100vw; overflow-x: hidden; }

.container{
  max-width:var(--max);
  margin:0 auto;
  padding: 0 18px;
}

.center{ text-align:center; }
.small{ font-size: 13px; }
.muted{ color: var(--muted); }

.divider{
  width:72px;
  height:2px;
  background:#8aa0be;
  margin:14px auto 22px;
  border-radius:999px;
}

.section{
  padding: 70px 0;
}
.section.alt{
  background: var(--bg2);
}

.section-title{
  margin: 0;
  text-align:center;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: .02em;
  font-size: 46px;
  color: var(--accent);
}

@media (max-width: 900px){
  .section{ padding: 56px 0; }
  .section-title{ font-size: 38px; }
}

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner{
  max-width: calc(var(--max) + 36px);
  margin: 0 auto;
  padding: 10px 18px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nav{
  display:flex;
  align-items:center;
  gap: 16px;
  min-width: 0;
}
.brand{
  font-weight:600;
  text-decoration:none;
  color: var(--accent2);
  white-space: nowrap;
}
.brand-heart{
  font-size: 12px;
  margin-left: 6px;
  vertical-align: middle;
  color: var(--accent2);
  opacity: .9;
}
.nav-links{
  display:flex;
  gap: 14px;
  row-gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a{
  text-decoration:none;
  padding: 6px 8px;
  border-radius: 10px;
}
.nav-links a:hover{
  background: rgba(47,79,124,.08);
  color: var(--accent2);
}
@media (max-width: 980px){
  .nav-links{ display:none; }
}

.lang{
  display:flex;
  gap:8px;
  align-items:center;
}
.chip{
  border:1px solid var(--border);
  background:#fff;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  cursor:pointer;
  color:var(--muted);
}
.chip[aria-pressed="true"]{
  color:#fff;
  background:var(--accent2);
  border-color:var(--accent2);
}

/* Hero */
.hero{
  position: relative;
  min-height: 92vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 90px 0 70px;
  overflow:hidden;
}
.hero-bg{
  position:absolute;
  inset:0;
  background:
    url("assets/hero.jpg") center/cover no-repeat,
    linear-gradient(135deg, #dde6f0, #f7f8fb);
  filter: grayscale(100%);
  transform: scale(1.02);
}
.hero-overlay{
  position:absolute;
  inset:0;
  background: rgba(255,255,255,.72);
}
.hero-content{
  position: relative;
  z-index: 1;
  text-align:center;
}
.hero-title{
  margin:0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: .02em;
  font-size: 66px;
  color: var(--accent);
  letter-spacing: .03em;
}

.hero-meta{
  margin: 0 0 14px;
  color: var(--accent2);
  font-size: 15px;
}
.hero-sub{
  margin: 12px auto 26px;
  max-width: 720px;
  color: var(--accent2);
  font-size: 15px;
}

.kicker{
  margin: 0;
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--accent2);
  font-weight: 600;
}
.countdown-block{
  margin-top: 14px;
}
.countdown{
  display:flex;
  gap: 14px;
  justify-content:center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.cd-card{
  width: 118px;
  background:#fff;
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
  box-shadow: var(--shadow);
}
.cd-value{
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 34px;
  color: var(--accent2);
  line-height: 1;
}
.cd-label{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 900px){
  .hero-title{ font-size: 52px; }
}

/* Grids */
.grid{
  display:grid;
  gap: 22px;
  margin-top: 30px;
}
.grid-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1020px){
  .grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .stay-card h3{ white-space: normal; }
  .stay-addr span:last-child{ white-space: normal; }

  .grid-3{ grid-template-columns: 1fr; }
  .grid-4{ grid-template-columns: 1fr; }
}

/* Event cards */
.event-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  text-decoration:none;
  color: inherit;
  display:flex;
  flex-direction: column;
  align-items:center;
  text-align:center;
  transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease;
  min-height: 230px;
}
.event-card:hover{
  transform: translateY(-2px);
  border-color: #d6e0ee;
  box-shadow: 0 16px 34px rgba(0,0,0,.10);
}
.event-icon{
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #5e768f;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 22px;
  margin-bottom: 10px;
}
.event-time{
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 28px;
  color: var(--accent2);
  margin-top: 2px;
}
.event-title{
  font-weight: 600;
  color: var(--accent2);
  margin-top: 4px;
}
.event-place{
  margin-top: 10px;
  color: var(--muted);
  font-weight: 500;
}
.event-addr{
  margin-top: 8px;
  color: var(--accent2);
  font-size: 13px;
}

/* Menü */
.menu-list{
  margin-top: 18px;
  text-align:center;
  display:flex;
  flex-direction: column;
  gap: 26px;
}
.menu-kicker{
  font-weight: 700;
  letter-spacing: .12em;
  color: #6e8298;
  font-size: 14px;
}
.menu-text{
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: var(--accent2);
  font-size: 20px;
  margin-top: 8px;
}

/* Stay cards */
.stay-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
}
.stay-card h3{
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--accent2);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stay-tag{
  margin:0 0 14px;
  color: var(--muted);
  font-weight: 500;
}
.stay-addr{
  margin:0;
  display:flex;
  gap: 10px;
  align-items:center;
  color: var(--accent2);
}
.pin{ font-size: 18px; line-height: 1; margin-top: 2px; }
.stay-actions{
  margin-top: 14px;
}

.stay-addr span:last-child{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Form */
.form{
  max-width: 760px;
  margin: 26px auto 0;
}
.field{
  margin-bottom: 16px;
}
.field label, .field legend{
  display:block;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: 8px;
}
.field input, .field textarea{
  width: 100%;
  border: 2px solid #6a87a7;
  border-radius: 8px;
  padding: 12px 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
}
.field input:focus, .field textarea:focus{
  border-color: var(--accent2);
  box-shadow: 0 0 0 4px rgba(47,79,124,.10);
}
.row{
  display:grid;
  grid-template-columns: 1fr 180px;
  gap: 18px;
  align-items:flex-start;
}
@media (max-width: 780px){
  .row{ grid-template-columns: 1fr; }
}
.field.small input{
  width: 120px;
}
.radio{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--accent2);
}
.radio input{ width:auto; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent2);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  text-decoration:none;
  cursor:pointer;
}
.btn:hover{
  border-color:#cfd9e6;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}
.btn.primary{
  background: #4f6b86;
  border-color: #4f6b86;
  color:#fff;
}
.btn.primary:hover{ filter: brightness(1.03); }
.btn.wide{ width: 100%; padding: 12px; font-size: 15px; }

.success{ color: #246b36; font-weight: 600; margin-top: 12px; }
.error{ color: #b42318; margin-top: 10px; font-weight: 600; }

/* Accordion */
.accordion{
  max-width: 820px;
  margin: 30px auto 0;
  display:flex;
  flex-direction: column;
  gap: 16px;
}
details{
  background: #f3f5f7;
  border-radius: 12px;
  padding: 18px 18px;
}
summary{
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--accent2);
  display:flex;
  align-items:center;
  justify-content: space-between;
}
summary::-webkit-details-marker{ display:none; }
summary::after{
  content: "▾";
  color: var(--accent2);
  font-size: 18px;
  margin-left: 10px;
}
details[open] summary::after{ content: "▴"; }
.acc-body{
  margin-top: 12px;
  color: var(--accent2);
}

/* Footer */
.footer{
  text-align:center;
  margin-top: 60px;
  padding: 10px 0 0;
}
.footer-title{
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color: var(--accent);
  font-size: 34px;
  font-weight: 500;
}
.footer-sub{
  color: var(--accent2);
  margin-top: 6px;
}

/* To top */
.to-top{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  cursor:pointer;
  display:none;
}
.to-top.show{ display:inline-flex; align-items:center; justify-content:center; }

/* Gate */
.gate{
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  z-index: 999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.gate.hidden{ display:none; }
.gate-card{
  width: min(720px, 100%);
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px 26px 26px;
  text-align:center;
}
.gate-form{
  max-width: 520px;
  margin: 16px auto 0;
}
.gate-row{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 12px;
}
.gate-row input{
  flex: 1;
  border: 2px solid #6a87a7;
  border-radius: 10px;
  padding: 12px 12px;
  font-size: 15px;
}
.iconbtn{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:#fff;
  cursor:pointer;
}
.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;
}


/* Countdown mobile single row */
@media (max-width: 420px){
  .countdown{
    flex-wrap: nowrap;
    gap: 10px;
  }
  .cd-card{
    width: 78px;
    padding: 12px 8px;
  }
  .cd-value{
    font-size: 28px;
  }
  .cd-label{
    font-size: 12px;
  }
}


#notes{ font-family: Arial, Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#notes::placeholder{ font-family: Arial, Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

/* Gate language chooser */
.gate-lang{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-bottom: 14px;
}

/* RSVP Modal */
.modal{
  position: fixed;
  inset: 0;
  z-index: 1200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.modal.hidden{ display:none; }
.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
}
.modal-card{
  position: relative;
  max-height: calc(100vh - 72px);
  overflow: hidden;

  width: min(720px, calc(100% - 36px));
  margin: 0 auto;
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 22px 22px;
  text-align:center;
  overflow:hidden;
}

@media (max-width: 520px){
  .modal-card{ padding: 28px 18px 18px; }
}
.modal-emoji{
  font-size: 56px;
  line-height: 1;
  margin-bottom: 10px;
}
.modal-title{
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 34px;
  color: var(--accent2);
}
.modal-sub{
  margin: 10px auto 18px;
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
}
.confetti{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}

img, svg, video, canvas{ max-width:100%; }

/* Eye icon swap (black/white) */
.eye-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
}
.eye-btn .icon-eye{ display:none; }
.eye-btn .icon-eye-off{ display:inline-flex; }
.eye-btn[aria-pressed="true"] .icon-eye{ display:inline-flex; }
.eye-btn[aria-pressed="true"] .icon-eye-off{ display:none; }

.icon-eye svg, .icon-eye-off svg{
  color: #000;
}

.eye-btn svg{ display:block; }
