/* Bố cục riêng từng phần, theo thứ tự trên trang. */

/* S1 · Hero — ảnh hiện đủ khung theo đúng tỉ lệ 2:3 của ảnh gốc (không cắt).
   Chữ nằm trên vùng cây tối góc trên bên trái (x ≤ 67%, y ≤ 34% của ảnh), tránh voan (x ≥ 58%, y 10–55%). */
.hero { padding: 0; overflow: hidden; color: #fff; background: var(--paper); }
.hero__media { position: relative; will-change: transform; }
.hero__img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.hero__media::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 7%; background: linear-gradient(180deg, rgba(247, 245, 239, 0), var(--paper)); pointer-events: none; }
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, rgba(8, 22, 12, .58) 0%, rgba(8, 22, 12, .28) 28%, rgba(8, 22, 12, 0) 48%);
}
.hero__text {
  position: absolute; top: 0; left: 0; width: 74%;
  padding: calc(5vw + env(safe-area-inset-top, 0px)) 12px 0 18px;
  text-align: center;
  will-change: transform, opacity;
}
.hero__kicker { font: 400 13px/1 var(--serif); letter-spacing: .42em; padding-left: .42em; }
.hero__names { margin: 16px 0 20px; font: 400 clamp(40px, 13.3vw, 52px)/1.05 var(--script); text-shadow: 0 2px 18px rgba(0, 0, 0, .35); } /* "Duy Khánh" luôn 1 dòng */
.hero__names span { display: block; }
.hero__date { font: 400 18px/1 var(--serif); letter-spacing: .32em; padding-left: .32em; }
.hero__cue { position: absolute; left: 50%; bottom: 9%; width: 36px; height: 36px; margin-left: -18px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.hero__cue svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* S2 · Darling + lịch */
.darling { padding-top: 64px; }
.darling__visual { position: relative; padding-bottom: 30px; }
.darling__photo { width: 70%; margin-left: auto; aspect-ratio: 4 / 5; }
.darling__photo img { object-position: 50% 36%; }
.darling__branch { top: -4%; left: -12px; width: 29%; z-index: 2; transform-origin: 40% 100%; }
.darling__title { position: absolute; left: 0; bottom: 0; z-index: 3; font: 400 50px/1 var(--serif); letter-spacing: .1em; color: var(--green); }
.darling__line { margin-top: 16px; font: italic 400 21px/1.4 var(--italic); text-align: left; }

.cal { display: flex; align-items: center; gap: 12px; margin-top: 44px; }
.cal__label { flex: 0 0 30%; padding: 6px 12px 6px 0; border-right: 1px solid var(--line); }
.cal__month { display: block; font: 400 34px/1 var(--script); color: var(--green); }
.cal__year { display: block; margin-top: 8px; font: 400 15px/1 var(--serif); letter-spacing: .3em; color: var(--muted); }
.cal__grid { flex: 1; }
.cal__row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__cell { position: relative; display: grid; place-items: center; height: 30px; font: 500 12px/1 var(--sans); }
.cal__head .cal__cell { height: 24px; font-size: 8.5px; letter-spacing: .06em; color: var(--muted); }
.cal__cell.is-day b { position: relative; z-index: 1; color: #fff; font-weight: 600; }
/* Tim căn giữa bằng translate (không phụ thuộc bề rộng) và vừa ô lịch hẹp trên điện thoại nhỏ.
   Trước đây max-width: 100% ép tim hẹp lại nhưng lề −16px vẫn tính cho 32px nên tim lệch trái. */
.cal__heart { position: absolute; left: 50%; top: 50%; width: min(32px, calc(100% + 4px)); height: auto; aspect-ratio: 1; max-width: none; translate: -50% -50%; fill: var(--green); }

/* S3 · Ảnh ngang */
.wide { padding: 0 0 36px; }
.wide__photo { aspect-ratio: 3 / 2; }
.wide__sprig { position: relative; width: 80%; margin: -22px 0 0 auto; transform-origin: 100% 50%; } /* không tràn mép phải: ngọn lá không bị cắt */

/* S4 · Gia đình & lời mời — chữ bắt đầu ngay dưới cụm lá góc (--corner), nên lá không đè lên tên */
.family { padding-top: calc(var(--corner) + 12px); }
.family__parents { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 -12px; }
.family__label { margin-bottom: 8px; font: 400 16px/1.2 var(--serif); letter-spacing: .24em; padding-left: .24em; color: var(--green); }
.family__side p { font-size: clamp(11px, 3.1vw, 12px); line-height: 1.75; text-wrap: balance; } /* "Bà Nguyễn Thị Ngọc Phượng" vừa 1 dòng từ 360px */
.logo { width: 118px; height: auto; margin: 34px auto 26px; }
.family__invite { max-width: 300px; margin: 0 auto; font: 500 12px/1.9 var(--sans); letter-spacing: .12em; text-wrap: balance; }
.couple { position: relative; padding: 8px 0; }
.couple__amp { position: absolute; inset: -30px 0; display: grid; place-items: center; pointer-events: none; }
.couple__amp span { font: 400 200px/1 var(--script); color: var(--green); opacity: .1; }
.couple__name { position: relative; font: 400 40px/1.1 var(--serif); letter-spacing: .08em; color: var(--green); }
.couple__name + .couple__name { margin-top: 18px; }
.couple__name small { display: block; margin-top: 4px; font: 500 10px/1 var(--sans); letter-spacing: .22em; color: var(--muted); }

/* S5 · Thời gian & địa điểm */
.when { padding-top: 36px; }
.when__time { font: 400 20px/1.2 var(--serif); letter-spacing: .16em; color: var(--green); }
.when__date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; max-width: 320px; margin: 16px auto 10px; }
.when__side { padding: 7px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: 400 14px/1 var(--serif); letter-spacing: .16em; }
.when__day { font: 400 78px/.9 var(--serif); color: var(--green); }
.when__lunar { font: italic 400 13px/1.5 var(--sans); color: var(--muted); }
.when__place { margin-top: 40px; font: 400 23px/1.3 var(--serif); letter-spacing: .14em; color: var(--green); }
.when__addr { margin-top: 8px; font-size: 13px; line-height: 1.7; }
.map-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 24px; padding: 10px 16px; font: 600 11.5px/1.4 var(--sans); letter-spacing: .14em; color: var(--green); text-decoration: none; }
.map-btn span { padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.map-btn__pin { width: 34px; height: 34px; fill: none; stroke: var(--green); stroke-width: 1.6; }

/* S6 · Two hearts BECOME ONE — hearts-b nhỏ và nằm ở góc trên phải (tường gỗ), không che cô dâu (x 70–100%, y 48–80% ảnh chính) */
.hearts { padding-top: 80px; }
.hearts .title { margin-bottom: calc(14% + 14px); } /* chừa chỗ để hearts-b trôi lên khi cuộn mà không che "BECOME ONE" */
.collage { position: relative; aspect-ratio: 1 / 1.22; }
.collage__main { position: absolute; top: 0; left: 21%; width: 62%; aspect-ratio: 2 / 3; }
.collage__a { position: absolute; left: 2%; bottom: 0; z-index: 2; width: 40%; aspect-ratio: 2 / 3; }
.collage__b { position: absolute; right: 0; top: -6%; z-index: 2; width: 28%; aspect-ratio: 2 / 3; }

/* S8 · One team, one dream… */
.team { padding-top: 84px; }
.team .title__sprig { top: auto; bottom: 2px; margin-top: 0; width: 19%; } /* tiêu đề dài: nhánh lá đứng cạnh chữ FOREVER */
.mosaic__top, .mosaic__bottom { display: grid; gap: 8px; }
.mosaic__top { grid-template-columns: 30% 1fr; margin-bottom: 8px; }
.mosaic__bottom { grid-template-columns: 27% 1fr 31%; align-items: start; }
.mosaic__col { display: flex; flex-direction: column; gap: 8px; }
.mosaic__note { font: 400 24px/1 var(--script); color: var(--green); }
.mosaic__a { flex: 1; min-height: 90px; }
.mosaic__wide { aspect-ratio: 3 / 2; }
.mosaic__block { aspect-ratio: 1; }
.mosaic__block--dark { background: var(--green); }
.mosaic__block--soft { background: var(--green-soft); }
.mosaic__tall { aspect-ratio: 2 / 3; }
.mosaic__b { aspect-ratio: 3 / 4; }
.mosaic__love { padding-left: .3em; font: 400 24px/1 var(--serif); letter-spacing: .3em; color: var(--green); }
.quote { margin-top: 44px; font: italic 400 20px/1.55 var(--italic); }
.quote__sprig { position: relative; width: 72%; margin: 12px 0 -30px -14px; transform-origin: 0 50%; }

/* S11 · Lời cảm ơn */
.thanks { padding: 0 0 76px; background: var(--green); color: var(--cream); }
.thanks__photo { aspect-ratio: 3 / 2; background: #1b1b1b; }
.thanks__photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 75, 38, 0) 50%, var(--green) 100%); }
.thanks__photo img { filter: grayscale(1) contrast(1.05); }
.thanks__body { padding: 10px 30px 0; }
.thanks__body p { font-size: 13.5px; line-height: 1.8; text-wrap: balance; }
.thanks__body p + p { margin-top: 12px; }
.thanks__body .thanks__script { margin-top: 22px; font: 400 58px/1.15 var(--script); color: #fff; }
