:root {
    --ink: #181512;
    --charcoal: #24211d;
    --ivory: #f7f0e4;
    --paper: #fffaf2;
    --champagne: #c9a46a;
    --sage: #6e7f68;
    --wine: #6f2f35;
    --mist: rgba(255, 250, 242, 0.78);
    --line: rgba(36, 33, 29, 0.16);
    --shadow: 0 24px 70px rgba(24, 21, 18, 0.18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-bottom: 92px; }
body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(36,33,29,.035) 1px, transparent 1px) 0 0 / 42px 42px,
        linear-gradient(0deg, rgba(36,33,29,.03) 1px, transparent 1px) 0 0 / 42px 42px,
        radial-gradient(circle at 18% 12%, rgba(201,164,106,.22), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(110,127,104,.18), transparent 28%),
        linear-gradient(135deg, #fffaf2 0%, #eee1cd 48%, #c5b596 100%);
    font-family: Avenir Next, Inter, Segoe UI, Verdana, sans-serif;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.ambient-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: .28;
}
.atelier-nav {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 40;
    width: min(640px, calc(100vw - 18px));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    padding: 5px;
    border: 1px solid rgba(255,250,242,.35);
    background: rgba(24,21,18,.84);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 65px rgba(24,21,18,.25);
}
.atelier-nav a {
    min-height: 42px;
    display: grid;
    place-items: center;
    color: rgba(255,250,242,.82);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.atelier-nav a.is-active,
.atelier-nav a:hover { background: var(--champagne); color: var(--ink); }
.atelier-shell {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100vw - 24px));
    margin: 0 auto;
    padding: 12px 0 calc(96px + env(safe-area-inset-bottom));
}
.atelier-hero {
    min-height: calc(100vh - 24px);
    display: grid;
    grid-template-columns: minmax(320px, .82fr) minmax(420px, 1.18fr);
    gap: 12px;
}
.hero-copy,
.portrait-stage,
.story-section,
.schedule-section,
.album-section,
.rsvp-section,
.atelier-footer {
    border: 1px solid var(--line);
    background: var(--mist);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}
.hero-copy {
    min-height: 620px;
    display: grid;
    align-content: center;
    padding: clamp(24px, 5vw, 70px);
    position: relative;
    overflow: hidden;
}
.hero-copy::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(201,164,106,.34);
    pointer-events: none;
}
.hero-copy::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: -60px;
    bottom: -64px;
    border: 1px solid rgba(111,47,53,.24);
    border-radius: 50%;
}
.section-label {
    margin: 0 0 14px;
    color: var(--wine);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .18em;
    text-transform: uppercase;
}
h1, h2, h3 { margin: 0; font-family: Georgia, Times New Roman, serif; font-weight: 500; letter-spacing: 0; }
.hero-copy h1 {
    max-width: 9.4ch;
    font-size: clamp(52px, 7.5vw, 112px);
    line-height: .92;
    position: relative;
    z-index: 1;
}
.origin-lead,
.section-heading p,
.rsvp-panel p,
.atelier-footer p,
.story-window p,
.ritual-card p,
.dress-note p,
.rsvp-meta span {
    color: rgba(24,21,18,.66);
    font-size: 16px;
    line-height: 1.68;
}
.origin-lead { max-width: 620px; margin: 22px 0 0; position: relative; z-index: 1; }
.origin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; position: relative; z-index: 1; }
.atelier-button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(24,21,18,.7);
    background: var(--paper);
    color: var(--ink);
    padding: 0 18px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.atelier-button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.portrait-stage {
    min-height: 720px;
    position: relative;
    overflow: hidden;
    background: #1d1a17;
}
.hero-portrait {
    position: absolute;
    inset: 0;
    background: center / cover no-repeat;
    filter: saturate(.92) contrast(1.02);
}
.hero-portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(24,21,18,.02), rgba(24,21,18,.76)),
        radial-gradient(circle at 48% 34%, transparent 0 28%, rgba(24,21,18,.3) 70%);
}
.monogram-card {
    position: absolute;
    left: clamp(18px, 4vw, 52px);
    right: clamp(18px, 4vw, 52px);
    bottom: clamp(18px, 4vw, 52px);
    padding: clamp(20px, 3.2vw, 38px);
    color: var(--paper);
    border: 1px solid rgba(255,250,242,.38);
    background: rgba(24,21,18,.74);
    backdrop-filter: blur(10px);
}
.invitation-note {
    display: inline-flex;
    color: var(--champagne);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.couple-signature { display: grid; gap: 2px; margin-top: 18px; }
.couple-signature span { font: 500 clamp(48px, 6.6vw, 94px)/.9 Georgia, Times New Roman, serif; }
.couple-signature i {
    width: fit-content;
    margin: 7px 0;
    padding: 7px 12px;
    border: 1px solid rgba(201,164,106,.7);
    color: var(--champagne);
    font-style: normal;
    font-weight: 850;
    letter-spacing: .12em;
}
.event-card-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
}
.event-card-row p,
.countdown-card {
    margin: 0;
    padding: 14px;
    border-top: 1px solid rgba(255,250,242,.2);
    background: rgba(255,250,242,.07);
}
.event-card-row small,
.countdown-card span,
.countdown-card small,
.story-kicker,
.ritual-time,
.gallery-card span,
.dress-note span {
    display: block;
    color: rgba(255,250,242,.65);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-style: normal;
}
.event-card-row strong { display: block; margin-top: 8px; color: var(--paper); font-size: 15px; }
.countdown-card { width: 178px; margin-top: 10px; text-align: center; }
.countdown-card strong { display: block; color: var(--champagne); font-size: 54px; line-height: .86; }
.story-section,
.schedule-section,
.album-section,
.rsvp-section { margin-top: 12px; padding: clamp(22px, 4vw, 48px); }
.section-heading { max-width: 760px; }
.section-heading h2,
.schedule-head h2,
.rsvp-panel h2 { font-size: clamp(38px, 5vw, 76px); line-height: .98; }
.story-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.story-window {
    min-height: 245px;
    padding: 24px;
    border: 1px solid var(--line);
    background: rgba(255,250,242,.72);
}
.story-kicker { color: var(--wine); }
.story-window h3,
.ritual-card h3 { margin-top: 18px; font-size: 27px; line-height: 1.08; }
.schedule-section {
    display: grid;
    grid-template-columns: minmax(260px, .65fr) minmax(420px, 1.35fr);
    gap: 12px;
    align-items: start;
}
.schedule-head,
.dress-note {
    border: 1px solid var(--line);
    background: rgba(255,250,242,.68);
    padding: 24px;
}
.schedule-list { display: grid; gap: 8px; }
.ritual-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(255,250,242,.16);
    background: rgba(36,33,29,.9);
    color: var(--paper);
}
.ritual-time { color: var(--champagne); font-size: 20px; letter-spacing: 0; text-transform: none; }
.ritual-card p { color: rgba(255,250,242,.68); margin-bottom: 0; }
.dress-note { grid-column: 1 / 2; }
.dress-note span { color: var(--wine); }
.album-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.gallery-card {
    min-height: 330px;
    position: relative;
    border: 1px solid rgba(24,21,18,.12);
    background: center / cover no-repeat;
    cursor: pointer;
    overflow: hidden;
}
.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(24,21,18,.68));
}
.gallery-card span {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 1;
    color: var(--paper);
}
.rsvp-section {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 12px;
    background: rgba(36,33,29,.9);
    color: var(--paper);
}
.rsvp-panel,
.rsvp-form {
    border: 1px solid rgba(255,250,242,.18);
    background: rgba(255,250,242,.07);
    padding: clamp(20px, 4vw, 42px);
}
.rsvp-panel p,
.rsvp-panel .rsvp-meta span { color: rgba(255,250,242,.68); }
.rsvp-meta { display: grid; gap: 8px; margin-top: 18px; }
.rsvp-meta strong { color: var(--champagne); }
.rsvp-form { display: grid; gap: 12px; }
.rsvp-form label { display: grid; gap: 7px; color: rgba(255,250,242,.82); font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    border: 1px solid rgba(255,250,242,.28);
    background: rgba(255,250,242,.94);
    color: var(--ink);
    padding: 13px 14px;
    outline: none;
}
.rsvp-form textarea { resize: vertical; min-height: 116px; }
.atelier-footer {
    margin-top: 12px;
    min-height: 190px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px;
    background: var(--paper);
}
.atelier-footer p { margin: 0 0 10px; }
.atelier-footer strong { color: var(--wine); }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(24,21,18,.78);
}
.lightbox.is-open { display: grid; }
.lightbox-close {
    position: fixed;
    right: 18px;
    top: 18px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,250,242,.4);
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    font-weight: 850;
}
.lightbox-panel {
    width: min(940px, 92vw);
    border: 10px solid var(--paper);
    background: var(--paper);
    box-shadow: var(--shadow);
}
#lightboxImage { min-height: min(68vh, 680px); background: center / cover no-repeat; }
#lightboxCaption { margin: 12px 0 2px; color: var(--ink); font-weight: 800; }
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(78px + env(safe-area-inset-bottom));
    z-index: 90;
    transform: translate(-50%, 18px);
    opacity: 0;
    pointer-events: none;
    background: var(--charcoal);
    color: var(--paper);
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 800;
    transition: .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .45s ease, transform .45s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 920px) {
    .atelier-shell { width: min(100% - 16px, 720px); padding-top: 8px; }
    .atelier-hero,
    .schedule-section,
    .rsvp-section { grid-template-columns: 1fr; }
    .hero-copy { min-height: 520px; }
    .portrait-stage { min-height: 620px; }
    .event-card-row,
    .story-grid,
    .album-grid { grid-template-columns: 1fr; }
    .gallery-card { min-height: 280px; }
    .dress-note { grid-column: auto; }
    .atelier-nav a { font-size: 9px; letter-spacing: .06em; }
}
@media (max-width: 520px) {
    .hero-copy h1 { font-size: 46px; }
    .couple-signature span { font-size: 48px; }
    .event-card-row { grid-template-columns: 1fr; }
    .ritual-card { grid-template-columns: 1fr; }
    .atelier-nav { width: calc(100vw - 10px); }
    .atelier-nav a { min-height: 40px; }
}
