/* ==========================================================
   ROSE WEBSITE — main.css  (base, layout, components)
   Mobile-first. Animations: animations.css. Breakpoints: responsive.css
   Fonts are loaded from each HTML <head> (Cormorant Garamond + Manrope).
   ========================================================== */

:root {
  --burgundy: #35121F;
  --wine: #76283D;
  --rose: #B8324A;
  --gold: #D5B477;
  --ivory: #F8F0E8;
  --blush: #E8C9CD;
  --espresso: #281D20;

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Manrope", "Inter", system-ui, -apple-system, sans-serif;

  --pad: clamp(22px, 6vw, 72px);
  --header-h: 68px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0; min-height: 100svh; overflow-x: hidden;
  font-family: var(--sans); font-size: 1rem; line-height: 1.7;
  background: var(--burgundy); color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -.01em; }
h1 { font-size: clamp(2.8rem, 11vw, 6.5rem); }
h2 { font-size: clamp(2rem, 7vw, 3.9rem); }
h3 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
em, .italic { font-style: italic; }
.gold { color: var(--gold); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 14vw, 150px) var(--pad); }
.section-dark { background: var(--burgundy); color: var(--ivory); }
.section-wine { background: var(--wine); color: var(--ivory); }
.section-light { background: var(--ivory); color: var(--espresso); }
.section-blush { background: var(--blush); color: var(--espresso); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; }
.narrow { max-width: 680px; margin: 0 auto; }
.center { text-align: center; }
.page-top { padding-top: calc(var(--header-h) + 56px); }
.rule { width: 56px; height: 1px; background: var(--gold); margin: 28px 0; border: 0; }
.center .rule { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 34px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; letter-spacing: .06em;
  border: 1px solid var(--gold); color: var(--gold);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:hover { background: var(--gold); color: var(--burgundy); }
.btn-solid { background: var(--rose); border-color: var(--rose); color: var(--ivory); }
.btn-solid:hover { background: var(--ivory); border-color: var(--ivory); color: var(--burgundy); }
.section-light .btn, .section-blush .btn { color: var(--wine); border-color: var(--wine); }
.section-light .btn:hover, .section-blush .btn:hover { background: var(--wine); color: var(--ivory); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--pad) 0;
  display: flex; align-items: center; justify-content: space-between;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(53, 18, 31, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .4s var(--ease);
}
.site-header.is-scrolled::before { opacity: 1; }
.wordmark { display: flex; flex-direction: column; line-height: 1; position: relative; z-index: 3; }
.wordmark-name { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .32em; color: var(--ivory); }
.wordmark-sub { font-size: .62rem; letter-spacing: .2em; color: var(--gold); margin-top: 5px; }
.header-tools { display: flex; align-items: center; gap: 18px; position: relative; z-index: 3; }
.lang-switch { display: flex; gap: 2px; font-size: .74rem; font-weight: 600; letter-spacing: .12em; }
.lang-switch button { padding: 6px 7px; color: var(--blush); opacity: .6; }
.lang-switch button[aria-pressed="true"] { opacity: 1; color: var(--gold); border-bottom: 1px solid var(--gold); }
.menu-toggle { width: 34px; height: 34px; display: grid; place-content: center; gap: 7px; }
.menu-toggle span { display: block; width: 24px; height: 1px; background: var(--ivory); transition: transform .35s var(--ease), opacity .35s; }
.nav-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
.nav-links {
  position: fixed; inset: 0; z-index: 2; background: var(--burgundy);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.nav-open .nav-links { opacity: 1; visibility: visible; }
.nav-links a { font-family: var(--serif); font-size: 2.3rem; color: var(--ivory); }
.nav-links a[aria-current="page"] { color: var(--gold); font-style: italic; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 34px var(--pad) calc(34px + env(safe-area-inset-bottom));
  text-align: center; font-size: .8rem; letter-spacing: .08em;
  background: var(--burgundy); color: var(--blush); border-top: 1px solid rgba(213, 180, 119, .25);
}
.site-footer .mini-rose { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-left: 6px; color: var(--rose); }

/* ---------- Home: hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--burgundy); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(53,18,31,.95) 0%, rgba(53,18,31,.55) 38%, rgba(53,18,31,.1) 70%),
    radial-gradient(circle at 50% 30%, transparent 40%, rgba(40,10,20,.45) 100%);
}
.hero-content { position: relative; width: 100%; padding: 0 var(--pad) calc(64px + env(safe-area-inset-bottom)); }
.hero-title { letter-spacing: .06em; margin-bottom: 14px; }
.hero-subtitle { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 4.5vw, 1.9rem); color: var(--blush); }
.hero-nick { margin: 10px 0 34px; color: var(--gold); font-size: .95rem; letter-spacing: .08em; }

/* ---------- Home: intro, portrait, panels, closing ---------- */
.intro-lead { font-family: var(--serif); font-size: clamp(1.7rem, 5.6vw, 3rem); line-height: 1.25; }
.intro-body { margin-top: 26px; max-width: 54ch; opacity: .85; }
.portrait-grid { display: grid; gap: 34px; align-items: center; }
.portrait-figure { position: relative; isolation: isolate; }
.portrait-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait-figure::after { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--gold); z-index: -1; }
.portrait-text { font-family: var(--serif); font-size: clamp(2.2rem, 9vw, 4.8rem); line-height: 1.02; font-style: italic; }
.panels { display: grid; gap: 14px; }
.panel { padding: 44px 30px; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.panel p { font-size: .95rem; max-width: 36ch; opacity: .9; }
.panel-1 { background: var(--burgundy); color: var(--ivory); border: 1px solid rgba(213,180,119,.4); }
.panel-2 { background: var(--ivory); color: var(--espresso); }
.panel-3 { background: var(--blush); color: var(--espresso); }
.panel-4 { background: var(--wine); color: var(--ivory); }
.closing { position: relative; text-align: center; background: radial-gradient(circle at 50% 40%, var(--wine) 0%, var(--burgundy) 70%); }
.closing h2 { font-style: italic; margin-bottom: 40px; }

/* ---------- Gallery ---------- */
.gallery-grid { column-count: 2; column-gap: 12px; }
.gallery-item { position: relative; break-inside: avoid; margin-bottom: 12px; overflow: hidden; cursor: zoom-in; background: var(--wine); }
.gallery-item img { width: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.gallery-item:hover img { transform: scale(1.04); }
.g-large img { aspect-ratio: 4 / 5.4; }
.g-tall img { aspect-ratio: 3 / 4; }
.g-wide img { aspect-ratio: 4 / 3; }
.g-square img { aspect-ratio: 1; }
.gallery-item figcaption { padding: 10px 4px 2px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--blush); }
.gallery-item.is-video::before {
  content: ""; position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(53,18,31,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23D5B477' d='M9 7l9 5-9 5z'/%3E%3C/svg%3E") center / 20px no-repeat;
  border: 1px solid var(--gold);
}
.gallery-item button { display: block; width: 100%; text-align: left; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(40, 10, 20, .96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-stage { max-width: 94vw; max-height: 82svh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox-stage img, .lightbox-stage video { max-width: 94vw; max-height: 76svh; object-fit: contain; border: 1px solid rgba(213,180,119,.5); }
.lightbox-caption { font-family: var(--serif); font-style: italic; color: var(--blush); font-size: 1.15rem; text-align: center; min-height: 1.5em; }
.lightbox-btn {
  position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.5rem; color: var(--gold); border: 1px solid rgba(213,180,119,.5);
  background: rgba(53,18,31,.6);
}
.lightbox-btn:hover { background: var(--gold); color: var(--burgundy); }
.lightbox-close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- About (The Beauty of Rose) ---------- */
.rose-stage { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, var(--wine) 0%, var(--burgundy) 68%); }
.rose-figure { width: min(78vw, 420px); margin: 0 auto 34px; border-radius: 999px 999px 8px 8px; overflow: hidden; border: 1px solid var(--gold); padding: 8px; }
.rose-figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 4px 4px; }
.rose-lead { font-family: var(--serif); font-size: clamp(1.6rem, 5.2vw, 2.8rem); line-height: 1.25; color: var(--gold); max-width: 22ch; margin: 0 auto; }
.meanings { display: grid; gap: 0; margin-top: 50px; }
.meaning { padding: 30px 0; border-top: 1px solid rgba(213,180,119,.35); display: grid; gap: 8px; }
.meaning:last-child { border-bottom: 1px solid rgba(213,180,119,.35); }
.meaning h3 { color: var(--gold); font-style: italic; }
.meaning p { opacity: .85; max-width: 44ch; }
.line-art { width: 74px; height: 74px; margin: 0 auto 22px; color: var(--gold); }

/* ---------- Letter ---------- */
.letter-page { min-height: 100svh; background: radial-gradient(circle at 50% 30%, var(--wine) 0%, var(--burgundy) 72%); }
.letter-scene { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.envelope { position: relative; width: min(86vw, 360px); aspect-ratio: 3 / 2; margin-top: 100px; filter: drop-shadow(0 24px 30px rgba(0,0,0,.4)); perspective: 900px; }
.env-back { position: absolute; inset: 0; background: #E9D7C3; border-radius: 6px; }
.env-sheet { position: absolute; left: 7%; right: 7%; top: 8%; height: 84%; background: #FFFBF5; border-radius: 3px; transition: transform .9s var(--ease) .35s; }
.env-front { position: absolute; inset: 0; background: #F3E3CE; clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); }
.env-flap { position: absolute; inset: 0 0 auto 0; height: 58%; background: #ECD9C0; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .6s var(--ease), z-index 0s .3s; z-index: 3; }
.env-seal { position: absolute; left: 50%; top: 49%; width: 54px; height: 54px; margin: -27px 0 0 -27px; z-index: 4; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #D8506A, var(--rose) 60%, #8E2238); color: var(--gold); box-shadow: 0 4px 10px rgba(0,0,0,.35); transition: opacity .3s; }
.env-seal svg { width: 26px; height: 26px; }
.envelope.is-open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.is-open .env-seal { opacity: 0; }
.envelope.is-open .env-sheet { transform: translateY(-62%); }
.letter-hint { color: var(--blush); font-size: .85rem; letter-spacing: .1em; }
.letter-sheet {
  width: min(100%, 640px); padding: clamp(32px, 8vw, 64px); background: #FFFBF5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--espresso); border-radius: 3px; box-shadow: 0 30px 60px rgba(0,0,0,.35); display: none;
}
.letter-sheet.is-visible { display: block; }
.letter-sheet .greeting { font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 2.4rem); font-style: italic; margin-bottom: 20px; color: var(--wine); }
.letter-sheet p + p { margin-top: 1.1em; }
.letter-body { font-family: var(--serif); font-size: clamp(1.2rem, 3.8vw, 1.45rem); line-height: 1.7; }
.letter-sign { margin-top: 34px; font-family: var(--serif); font-size: 1.2rem; color: var(--wine); }
.letter-sign span { display: block; font-style: italic; font-size: 1.05rem; color: var(--espresso); margin-top: 4px; }

/* ---------- Proposal ---------- */
.proposal-body { background: var(--burgundy); min-height: 100svh; }
.proposal-stage {
  position: relative; min-height: 100svh; overflow: hidden; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(48px + env(safe-area-inset-top)) var(--pad) calc(48px + env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 38%, #5a1d31 0%, var(--burgundy) 62%, #1f0a13 100%);
}
.ring-wrap { position: relative; width: clamp(190px, 58vw, 320px); aspect-ratio: 1; margin-bottom: 30px; }
.ring-glow { position: absolute; inset: -28%; border-radius: 50%; background: radial-gradient(circle, rgba(213,180,119,.34) 0%, rgba(213,180,119,.1) 38%, transparent 68%); }
.ring-img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.glint { position: absolute; width: 22px; height: 22px; pointer-events: none; background: radial-gradient(circle, #fff 0%, rgba(255,246,220,.7) 28%, transparent 66%); border-radius: 50%; }
.proposal-question { font-size: clamp(2.5rem, 10vw, 5.4rem); font-style: italic; color: var(--ivory); position: relative; }
.proposal-sub { margin-top: 16px; font-family: var(--serif); font-size: clamp(1.2rem, 4vw, 1.7rem); color: var(--gold); position: relative; }
.proposal-actions { margin-top: 38px; display: flex; flex-direction: column; gap: 14px; width: min(100%, 360px); position: relative; }
.proposal-result { max-width: 560px; position: relative; }
.proposal-result h2 { font-style: italic; margin-bottom: 18px; }
.proposal-result .btn { margin-top: 30px; }
.proposal-result[hidden], .proposal-main[hidden] { display: none; }
.petals, .sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.reduced-note { display: none; }

/* utility: minimal header on proposal */
.proposal-body .nav-links, .proposal-body .menu-toggle { display: none; }

/* hidden attribute must always win over component display rules */
[hidden] { display: none !important; }

/* ---------- Portrait photos (about 9:16, iPhone) ---------- */
.g-story img { aspect-ratio: 9 / 16; }
.g-portrait img { aspect-ratio: 2 / 3; }
.gallery-item img { object-position: 50% 30%; }
.portrait-figure img { aspect-ratio: 2 / 3; object-position: 50% 25%; }
