/* ==========================================================================
   Linea - modern, graphic, Swiss grid
   Palette: --inv-primary (the one accent), --inv-accent (rules/surfaces),
            --inv-bg, --inv-text
   ========================================================================== */

.linea {
    --l-rule: color-mix(in srgb, var(--inv-text) 16%, transparent);
    --l-soft: color-mix(in srgb, var(--inv-text) 72%, var(--inv-bg));
    --l-surface: color-mix(in srgb, var(--inv-accent) 45%, var(--inv-bg));
    --l-pad: clamp(18px, 4vw, 56px);
    --kit-radius: 0;
    --kit-field-bg: transparent;
    --kit-field-border: color-mix(in srgb, var(--inv-text) 35%, transparent);
    font-family: var(--inv-font-body);
    font-size: 1.02rem;
    line-height: 1.65;
}

.linea h1, .linea h2, .linea h3 {
    font-family: var(--inv-font-heading);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.02;
}
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.linea) :is(h1, h2, h3) { margin: 0; }

.l-kicker, .l-num, .linea .kit-countdown-label, .l-row dt, .l-story-date, .l-event-time {
    font-family: var(--inv-font-body);
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.l-small { font-size: .88rem; color: var(--l-soft); }
.l-lead { font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.5; }

/* ---------- Navigation ---------- */
.l-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px var(--l-pad); }
.l-nav .kit-nav-brand {
    display: inline-flex; font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em;
}
.l-nav .kit-nav-links { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-left: auto; }
.l-nav a { text-decoration: none; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.l-nav a.is-current, .l-nav a:hover { color: var(--inv-primary); }
.l-nav.is-stuck { padding-top: 12px; padding-bottom: 12px; box-shadow: 0 1px 0 var(--l-rule); background: color-mix(in srgb, var(--inv-bg) 94%, transparent); }
@media (max-width: 760px) {
    .l-nav .kit-nav-links { display: none; }
    .l-nav .kit-nav-toggle { margin-left: auto; font-size: 1.4rem; color: var(--inv-text); }
    .l-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
        padding: 20px var(--l-pad) 28px; gap: 18px; background: var(--inv-bg); border-bottom: 1px solid var(--l-rule);
    }
    .l-nav.is-open .kit-nav-links a { font-size: 1.1rem; letter-spacing: .06em; }
}

/* ---------- Hero: asymmetric grid + the date across the screen ---------- */
.l-hero { --l-date: min(24.5vw, 30rem); position: relative; min-height: 100svh; display: flex; flex-direction: column; overflow-x: clip; }
.l-hero-grid {
    flex: 1; display: grid; gap: 32px; align-items: end;
    padding: clamp(24px, 6vh, 64px) var(--l-pad) 0;
}
@media (min-width: 900px) {
    .l-hero-grid { grid-template-columns: 7fr 5fr; gap: 48px; }
    /* Keep the text clear of the big date, which only overlaps the photo */
    .l-hero-text { align-self: start; padding-bottom: calc(var(--l-date) * .32); }
}
.l-kicker { margin: 0 0 18px; color: var(--l-soft); }
.l-names { display: flex; flex-direction: column; font-size: clamp(3.4rem, 10.5vw, 9rem); font-weight: 500; }
.l-and { color: var(--inv-primary); font-weight: 400; }
.l-subtitle { font-size: clamp(1.1rem, 2vw, 1.35rem); margin: 22px 0 0; max-width: 28ch; }
.l-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 28px 0 0; font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.l-meta span + span::before { content: "-"; margin-right: 24px; color: var(--inv-primary); }
@media (max-width: 899px) {
    .l-meta { flex-direction: column; }
    .l-meta span + span::before { content: none; }
}
.l-hero-photo { margin: 0; height: clamp(320px, 62vh, 720px); overflow: hidden; }
.l-hero-photo img { transform: scale(1.02); }

.l-bigdate {
    position: relative; z-index: 2;
    margin: -0.3em 0 0; padding: 0 var(--l-pad) .06em;
    font-family: var(--inv-font-heading); font-weight: 700;
    font-size: var(--l-date); line-height: .86; letter-spacing: -0.065em;
    color: var(--inv-primary); white-space: nowrap; pointer-events: none;
}
@media (max-width: 899px) { .l-bigdate { margin-top: -0.22em; } }

/* ---------- Sections: numbered, on a 12-column grid ---------- */
.l-section {
    display: grid; gap: 28px;
    margin: 0 var(--l-pad); padding: clamp(56px, 9vw, 110px) 0;
    border-top: 1px solid var(--l-rule);
}
@media (min-width: 900px) {
    .l-section { grid-template-columns: repeat(12, 1fr); column-gap: 32px; }
    .l-head { grid-column: 1 / span 4; }
    .l-body { grid-column: 5 / -1; }
    .l-body--wide { grid-column: 1 / -1; margin-top: 12px; }
}
.l-num { display: block; color: var(--inv-primary); margin-bottom: 14px; }
.l-head h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.l-body { min-width: 0; margin: 0; padding: 0; }
.l-body p { margin: 0 0 1em; }

/* Couple */
.l-couple { display: grid; gap: 28px; }
@media (min-width: 640px) { .l-couple { grid-template-columns: 1fr 1fr; } }
.l-person { margin: 0; }
.l-person:nth-child(2) { margin-top: clamp(0px, 8vw, 110px); }
.l-person-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--l-surface); display: grid; place-items: center; }
.l-initial { font-family: var(--inv-font-heading); font-size: 8rem; font-weight: 700; color: var(--inv-primary); }
.l-person h3 { font-size: 1.8rem; margin: 18px 0 8px; }
.l-person p { margin: 0; color: var(--l-soft); }

/* Rows (family, info, contact) */
.l-rows { margin: 0; }
.l-row { display: grid; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--l-rule); }
.l-row:first-child { border-top: 1px solid var(--l-rule); }
@media (min-width: 640px) { .l-row { grid-template-columns: 200px 1fr; align-items: baseline; } }
.l-row dt { color: var(--l-soft); }
.l-row dd { margin: 0; font-size: 1.12rem; }
.l-row dd p { margin: 0 0 .6em; }
.l-contact-name { display: block; font-family: var(--inv-font-heading); font-size: 1.4rem; }
.l-row a { color: var(--inv-primary); font-weight: 700; text-decoration: none; }

/* Story */
.l-story { list-style: none; display: grid; }
.l-story-item { display: grid; gap: 14px 28px; padding: 28px 0; border-bottom: 1px solid var(--l-rule); }
.l-story-item:first-child { border-top: 1px solid var(--l-rule); }
@media (min-width: 900px) { .l-story-item { grid-template-columns: 150px 1fr 220px; align-items: start; } }
.l-story-date { color: var(--inv-primary); margin: 4px 0 0; }
.l-story-text h3 { font-size: 1.7rem; margin-bottom: 10px; }
.l-story-photo { aspect-ratio: 4 / 5; overflow: hidden; }

/* Events: timetable rows */
.l-events { display: grid; }
.l-event { display: grid; gap: 10px 28px; padding: 28px 0; border-bottom: 1px solid var(--l-rule); }
.l-event:first-child { border-top: 1px solid var(--l-rule); }
@media (min-width: 900px) { .l-event { grid-template-columns: 140px 1fr 1fr; } }
.l-event-time {
    font-family: var(--inv-font-heading); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700;
    letter-spacing: -0.03em; text-transform: none; color: var(--inv-primary); margin: 0; line-height: 1;
}
.l-event-what h3 { font-size: 1.6rem; margin-bottom: 6px; }
.l-event-what p, .l-event-where p { margin: 0; }
.l-event-place { font-weight: 700; }
.linea .kit-event-actions { justify-content: flex-start; }
.linea .kit-button { border-radius: 0; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; min-height: 40px; }
.linea .kit-button:hover { background: var(--inv-text); color: var(--inv-bg); border-color: var(--inv-text); }

/* Countdown: one line of big numbers */
.l-countdown { padding: clamp(48px, 8vw, 96px) var(--l-pad); background: var(--inv-text); color: var(--inv-bg); }
.l-countdown .l-kicker { color: color-mix(in srgb, var(--inv-bg) 75%, var(--inv-text)); }
.linea .kit-countdown { justify-content: space-between; }
.linea .kit-countdown-unit { justify-items: start; }
.linea .kit-countdown-value { font-size: clamp(3rem, 12vw, 9rem); font-weight: 700; letter-spacing: -0.05em; }
.linea .kit-countdown-label { opacity: .75; }

/* Gallery: asymmetric editorial grid */
.l-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
.l-gallery a { aspect-ratio: auto; border-radius: 0; min-height: 180px; }
@media (min-width: 900px) {
    .l-gallery { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 180px; gap: 14px; }
    .l-gallery a:nth-child(6n + 1) { grid-column: span 3; grid-row: span 2; }
    .l-gallery a:nth-child(6n + 2), .l-gallery a:nth-child(6n + 3) { grid-column: span 3; }
    .l-gallery a:nth-child(6n + 4), .l-gallery a:nth-child(6n + 5), .l-gallery a:nth-child(6n) { grid-column: span 2; grid-row: span 2; }
    /* A lone wide photo at the end would leave a half-empty row next to the big one */
    .l-gallery a:last-child:nth-child(6n + 2) { grid-row: span 2; }
}

/* RSVP */
.linea .inv-rsvp { margin: 0; max-width: 620px; }
.linea .inv-rsvp__intro, .linea .inv-rsvp__deadline { text-align: left; }
.linea .inv-rsvp__deadline { font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--inv-primary); }
.linea .inv-rsvp__choice label { border-radius: 0; font-weight: 700; }
.linea .inv-rsvp__field > label, .linea .inv-rsvp__field legend { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.linea .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .linea .inv-rsvp__field select {
    border: 0; border-bottom: 1px solid var(--kit-field-border); padding: 10px 0; font-size: 1.1rem;
}
.linea .inv-rsvp__submit { border-radius: 0; text-transform: uppercase; letter-spacing: .16em; font-size: .82rem; justify-self: start; padding: 0 36px; }

/* FAQ */
.l-faq { margin-top: 36px; }
.l-faq details { border-bottom: 1px solid var(--l-rule); padding: 18px 0; }
.l-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font-family: var(--inv-font-heading); font-size: 1.3rem; }
.l-faq summary::-webkit-details-marker { display: none; }
.l-faq summary::after { content: "+"; color: var(--inv-primary); font-weight: 700; }
.l-faq details[open] summary::after { content: "-"; }
.l-faq details p { margin: 12px 0 0; color: var(--l-soft); }

/* Footer: the names, huge */
.l-footer { padding: clamp(56px, 10vw, 120px) var(--l-pad) 40px; border-top: 1px solid var(--l-rule); overflow: hidden; }
.l-footer-names {
    font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(3rem, 12vw, 11rem);
    letter-spacing: -0.05em; line-height: .9; margin: 0 0 40px;
}
.l-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; align-items: baseline; }
.l-footer-bottom p { margin: 0; }
.l-hashtag { color: var(--inv-primary); font-weight: 700; }

/* Back to top: a solid square */
.linea .kit-to-top { border-radius: 0; background: var(--inv-text); color: var(--inv-bg); border: 0; }
.linea .kit-to-top:hover { background: var(--inv-primary); color: var(--inv-bg); }
