/*
    EverAfter page layouts  (html[data-layout="..."])
    Loaded AFTER theme.css. A layout changes how the page is built (the opening
    screen, the sections and how they sit); the colour theme still decides the
    colours, so any theme works with any layout.

    classic  = no rules here (the original look).
    To remove all layouts: delete the <link> to css/layouts.css in index.html.
*/

:root { --layout-photo: url("../assets/images/hero.jpg"); }

/* pieces only some layouts show */
.hero-photo, .hero-letter { display: none; }

/* =====================================================================
   ARCH WINDOW – light page, photo in an arch, names underneath
===================================================================== */
html[data-layout="arch"] .hero {
    --hero-ink: var(--deep); --hero-accent: var(--gold-ink); --hero-shadow: none; --hero-frame: var(--hairline);
    background: var(--ivory);
    align-items: flex-start;
    padding: 26px 20px 30px;
}
html[data-layout="arch"] .hero::before { opacity: .07; }
html[data-layout="arch"] .hero-content { max-width: 460px; }
html[data-layout="arch"] .small-title { margin-bottom: 16px; }
html[data-layout="arch"] .hero-photo {
    display: block; order: 1;
    width: min(46vw, 190px); aspect-ratio: 3 / 4; margin: 0 0 26px;
    border-radius: 999px 999px 16px 16px;
    background: linear-gradient(rgba(0,0,0,.05), rgba(0,0,0,.2)), var(--layout-photo) center / cover;
    outline: 1px solid var(--gold); outline-offset: 9px;
    box-shadow: 0 18px 40px rgba(0,0,0,.18);
}
html[data-layout="arch"][data-art] .hero-photo {
    background: var(--hero-art) center bottom / 86% no-repeat, radial-gradient(ellipse at 50% 30%, var(--deep), var(--deep-2));
}
html[data-layout="arch"] .hero-art { display: none; }
html[data-layout="arch"] .hero-content > .small-title { order: 0; }
html[data-layout="arch"] .hero h1 { order: 2; margin: 0 0 12px; font-size: clamp(2.4rem, 11vw, 3.6rem); }
html[data-layout="arch"] .hero h2#guest-title { order: 3; }
html[data-layout="arch"] .guest-message { order: 3; }
html[data-layout="arch"] .wedding-date { order: 4; margin-top: 12px; }
html[data-layout="arch"] .hero .primary-button { order: 5; margin-top: 16px; }
html[data-layout="arch"] #countdown-section { border-radius: 50% 50% 0 0 / 34px 34px 0 0; margin-top: -1px; }
html[data-layout="arch"] .card { border-radius: 140px 140px 20px 20px; padding-top: 70px; }
html[data-layout="arch"] .card::before { border-radius: 130px 130px 14px 14px; }
html[data-layout="arch"] #agenda-section { background: var(--ivory); }
html[data-layout="arch"] .section h2 { text-transform: none; }
@media (min-width: 900px) {
    html[data-layout="arch"] .hero-content { max-width: 560px; }
    html[data-layout="arch"] .hero { align-items: center; }
    html[data-layout="arch"] .hero-photo { width: 210px; }
}

/* =====================================================================
   CINEMA – the photo fills the opening screen, sections slide over it
===================================================================== */
html[data-layout="cinema"] .hero,
html[data-layout="split"] .hero {
    --hero-ink: #fff; --hero-accent: var(--gold-light); --hero-shadow: 0 2px 22px rgba(0,0,0,.45);
    background: linear-gradient(to top, rgba(12,7,8,.9) 0%, rgba(12,7,8,.45) 46%, rgba(12,7,8,.12) 100%), var(--layout-photo) center / cover;
    align-items: flex-end; justify-content: flex-start; text-align: left;
    padding: 28px 24px 52px;
}
html[data-layout="cinema"][data-art] .hero,
html[data-layout="split"][data-art] .hero { background: var(--hero-bg); }
html[data-layout="cinema"] .hero::before, html[data-layout="cinema"] .hero::after,
html[data-layout="split"] .hero::before, html[data-layout="split"] .hero::after { display: none; }
html[data-layout="cinema"] .hero-content, html[data-layout="split"] .hero-content { align-items: flex-start; max-width: 640px; width: 100%; padding: 0; }
html[data-layout="cinema"] .small-title, html[data-layout="split"] .small-title { justify-content: flex-start; font-size: .64rem; margin-bottom: 14px; }
html[data-layout="cinema"] .small-title::before, html[data-layout="cinema"] .small-title::after,
html[data-layout="split"] .small-title::before, html[data-layout="split"] .small-title::after,
html[data-layout="cinema"] .wedding-date::before, html[data-layout="cinema"] .wedding-date::after,
html[data-layout="split"] .wedding-date::before, html[data-layout="split"] .wedding-date::after { display: none; }
html[data-layout="cinema"] .hero h1, html[data-layout="split"] .hero h1 { margin: 0 0 16px; font-size: clamp(3.2rem, 17vw, 6.2rem); line-height: .98; }
html[data-layout="cinema"] #couple-name.cn-split, html[data-layout="split"] #couple-name.cn-split { align-items: flex-start; }
html[data-layout="cinema"] .cn-party, html[data-layout="split"] .cn-party { align-items: flex-start; text-align: left; }
html[data-layout="cinema"] .cn-amp, html[data-layout="split"] .cn-amp { margin: 2px 0 2px 4px; }
html[data-layout="cinema"] .hero-art, html[data-layout="split"] .hero-art { align-self: center; }
html[data-layout="cinema"] .wedding-date, html[data-layout="split"] .wedding-date { margin-top: 18px; }
html[data-layout="cinema"] #countdown-section { position: relative; z-index: 2; margin-top: -28px; border-radius: 28px 28px 0 0; }
html[data-layout="cinema"] .card::before { display: none; }
html[data-layout="cinema"] .card { border-radius: 16px; }
@media (min-width: 900px) {
    html[data-layout="cinema"] .hero { padding: 40px 8vw 72px; }
    html[data-layout="cinema"] .hero-content { max-width: 880px; }
    html[data-layout="cinema"] #couple-name.cn-split { flex-direction: row; align-items: flex-end; gap: 28px; }
    html[data-layout="cinema"] .cn-amp { margin-bottom: .5em; }
}

/* =====================================================================
   SPLIT – on computers the photo + names stay put on the left,
   the details scroll on the right. Phones use the Cinema opening.
===================================================================== */
@media (min-width: 900px) {
    html[data-layout="split"] #app { display: grid; grid-template-columns: minmax(340px, 42vw) minmax(0, 1fr); align-items: start; }
    html[data-layout="split"] #app > * { grid-column: 2; min-width: 0; }
    html[data-layout="split"] #hero { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 0; height: 100vh; min-height: 0; padding: 40px 36px 56px; }
    html[data-layout="split"] .hero h1 { font-size: clamp(2.6rem, 4.6vw, 4.4rem); }
    html[data-layout="split"] #couple-name.cn-split { flex-direction: column; align-items: flex-start; gap: 4px; }
    html[data-layout="split"] .hero-content { max-width: none; }
    html[data-layout="split"] .section { padding-left: 56px; padding-right: 56px; }
    html[data-layout="split"] .hero .primary-button { margin-top: 20px; }
}

/* =====================================================================
   LETTER – a printed invitation: formal wording, ruled borders, tickets
===================================================================== */
html[data-layout="letter"] body { background: var(--sand); }
html[data-layout="letter"] #app { max-width: 680px; margin: 0 auto; background: var(--paper); box-shadow: 0 0 0 1px var(--hairline), 0 26px 80px rgba(0,0,0,.16); }
html[data-layout="letter"] .hero {
    --hero-ink: var(--deep); --hero-accent: var(--gold-ink); --hero-shadow: none; --hero-frame: var(--gold);
    background: var(--paper);
    min-height: 100svh; padding: 40px 30px 40px;
}
html[data-layout="letter"] .hero::before { opacity: .08; }
html[data-layout="letter"] .hero::after { inset: 14px; border: 3px double var(--gold); border-radius: 0; }
html[data-layout="letter"] .hero-content { max-width: 440px; }
html[data-layout="letter"] .small-title { order: 0; }
html[data-layout="letter"] .hero-art { order: 1; }
html[data-layout="letter"] .hero h1 { order: 2; margin: 22px 0 10px; font-size: clamp(2.5rem, 12vw, 3.8rem); }
html[data-layout="letter"] .hero-letter { display: block; order: 3; max-width: 30ch; margin: 6px auto 0; font-family: var(--font-heading); font-style: italic; font-size: 1.15rem; line-height: 1.55; color: var(--ink-soft); }
html[data-layout="letter"] .wedding-date { order: 4; margin-top: 22px; padding: 10px 0; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); letter-spacing: .3em; }
html[data-layout="letter"] .wedding-date::before, html[data-layout="letter"] .wedding-date::after { display: none; }
html[data-layout="letter"] .hero h2#guest-title { order: 5; margin-top: 18px; font-size: 1.3rem; }
html[data-layout="letter"] .guest-message { order: 6; }
html[data-layout="letter"] .hero .primary-button { order: 7; margin-top: 18px; }
html[data-layout="letter"][data-art] .hero-art { --hero-art-h: min(150px, 17vh); }
html[data-layout="letter"] .section { padding: 50px 28px; }
html[data-layout="letter"] .section h2 { text-transform: uppercase; letter-spacing: .22em; font-size: 1.02rem; font-weight: 600; }
html[data-layout="letter"] #countdown-section { margin: 0 14px; border-radius: 0; border: 3px double var(--gold); }
html[data-layout="letter"] .card { border-radius: 0; box-shadow: none; border: 1px solid var(--gold); }
html[data-layout="letter"] .card::before { border-radius: 0; inset: 6px; }
html[data-layout="letter"] #agenda-section { background: var(--paper); }
html[data-layout="letter"] #agenda-list { max-width: 460px; display: grid; gap: 16px; }
html[data-layout="letter"] .agenda-item {
    padding: 16px 18px; border: 1.5px dashed var(--gold); border-radius: 10px; background: var(--ivory);
}
html[data-layout="letter"] .agenda-item::before, html[data-layout="letter"] .agenda-item::after { display: none; }
@media (min-width: 900px) {
    html[data-layout="letter"] body { padding: 28px 0; }
}

/* The Our Story timeline stays a single column inside narrow layouts */
@media (min-width: 760px) {
    html[data-layout="letter"] .story-line::before, html[data-layout="split"] .story-line::before { left: 14px; margin-left: 0; }
    html[data-layout="letter"] .story-item, html[data-layout="split"] .story-item,
    html[data-layout="letter"] .story-item.story-right, html[data-layout="split"] .story-item.story-right { width: auto; margin-left: 0; padding: 0 0 22px 44px; }
    html[data-layout="letter"] .story-item .story-dot, html[data-layout="split"] .story-item .story-dot,
    html[data-layout="letter"] .story-item.story-right .story-dot, html[data-layout="split"] .story-item.story-right .story-dot { left: 6px; right: auto; }
    html[data-layout="letter"] .story-item.story-left .story-card, html[data-layout="split"] .story-item.story-left .story-card { text-align: left; }
}
