/* ==========================================================================
   Terra - boho: earthy arches, organic shapes, sun and pampas grass
   Palette: --inv-primary (terracotta), --inv-accent (ochre), --inv-bg (sand), --inv-text (earth)
   ========================================================================== */

.terra {
    --t-clay: color-mix(in srgb, var(--inv-accent) 18%, var(--inv-bg));
    --t-card: var(--inv-surface);
    --t-line: color-mix(in srgb, var(--inv-text) 16%, transparent);
    --t-ink-soft: color-mix(in srgb, var(--inv-text) 78%, var(--inv-bg));
    --t-sun: var(--inv-accent);
    --t-arch-1: var(--inv-primary);
    --t-arch-2: color-mix(in srgb, var(--inv-primary) 50%, var(--inv-accent));
    --t-arch-3: var(--inv-accent);
    --t-pampas: color-mix(in srgb, var(--inv-accent) 35%, #EFE3CC);
    --t-stem: color-mix(in srgb, var(--inv-accent) 55%, #8C6E4E);
    --kit-radius: 999px;
    --kit-field-bg: var(--t-card);
    --kit-field-border: var(--t-line);
    font-family: var(--inv-font-body);
    font-size: 1.02rem;
    background: var(--inv-bg);
    overflow-x: clip;
}
.terra h1, .terra h2, .terra h3 { font-family: var(--inv-font-heading); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.terra) :is(h1, h2, h3) { margin: 0; }

.t-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 8px; }

/* ---------- Artwork (partials/defs) ---------- */
.t-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.t-sun-disc { fill: var(--t-sun); }
.t-sun-rays { stroke: var(--t-sun); stroke-width: 7; stroke-linecap: round; }
.t-arch-1 { fill: var(--t-arch-1); }
.t-arch-2 { fill: var(--t-arch-2); }
.t-arch-3 { fill: var(--t-arch-3); }
.t-stem { fill: none; stroke: var(--t-stem); stroke-width: 2.2; stroke-linecap: round; }
.t-hair { fill: none; stroke: var(--t-pampas); stroke-width: 1.4; stroke-linecap: round; opacity: .9; }

/* Arch-shaped photo frame */
.t-arch { margin: 0; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--t-clay); }
.t-arch img { width: 100%; height: 100%; object-fit: cover; }

/* Section title: small sun behind the heading */
.t-title { display: grid; justify-items: center; gap: 12px; margin: 0 auto 46px; }
.t-title svg { width: 48px; height: 48px; }
.t-title h2 { font-size: clamp(2.3rem, 6vw, 3.6rem); }

/* ---------- Navigation ---------- */
.t-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 20px clamp(16px, 4vw, 48px); display: flex; justify-content: flex-end; }
.t-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 6px; }
.t-nav a { text-decoration: none; font-size: .85rem; font-weight: 500; color: var(--inv-text); padding: 7px 14px; border-radius: 999px; transition: background .25s, color .25s; }
.t-nav a:hover, .t-nav a.is-current { background: var(--inv-primary); color: var(--inv-bg); }
.t-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-size: 1.3rem; font-style: italic; margin-right: auto; padding: 4px 0; color: var(--inv-primary); }
.t-nav .kit-nav-brand:hover { background: none; color: var(--inv-primary); }
.t-nav.is-stuck { align-items: center; padding: 8px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--inv-bg) 92%, transparent); box-shadow: 0 1px 0 var(--t-line); }
.terra .kit-to-top { background: var(--inv-primary); border-color: var(--inv-primary); color: var(--inv-bg); border-radius: 24px 24px 8px 8px; }
.terra .kit-to-top:hover { background: var(--inv-text); border-color: var(--inv-text); }
@media (max-width: 899px) {
    .t-nav { padding: 12px; }
    .t-nav .kit-nav-toggle { color: var(--inv-primary); font-size: 1.4rem; margin-left: auto; }
    .t-nav .kit-nav-links { display: none; }
    .t-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; align-items: stretch; gap: 4px;
        position: absolute; top: 58px; right: 12px; left: 12px; padding: 14px;
        background: var(--t-card); border-radius: 28px; box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
    }
}

/* ---------- Hero ---------- */
.t-hero, main, .t-footer { overflow-x: clip; }
.t-hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 96px clamp(20px, 5vw, 64px) 70px; }
.t-hero-grid { display: grid; gap: 40px; align-items: center; max-width: 1180px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .t-hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; } .t-hero-art { order: 2; } }

.t-hero-art { position: relative; width: min(420px, 78vw); aspect-ratio: 400 / 470; margin: 0 auto; }
.t-hero-arches { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-hero-sun { position: absolute; width: 26%; top: -6%; right: -8%; animation: t-spin 60s linear infinite; }
.t-hero-photo { position: absolute; left: 24%; right: 24%; top: 20.43%; bottom: 0; border-radius: 999px 999px 0 0; }
.t-hero-pampas { position: absolute; bottom: -3%; width: 46%; height: auto; }
.t-hero-pampas--l { left: -30%; transform: rotate(-8deg); transform-origin: bottom center; }
.t-hero-pampas--r { right: -30%; transform: scaleX(-1) rotate(-8deg); transform-origin: bottom center; }
@keyframes t-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .t-hero-sun { animation: none; } }

.t-hero-text { text-align: center; }
@media (min-width: 900px) { .t-hero-text { text-align: left; } }
.t-names { display: flex; flex-direction: column; font-size: clamp(3.6rem, 12vw, 7rem); line-height: .95; font-weight: 400 !important; }
.t-names .t-and { font-style: italic; color: var(--inv-primary); font-size: .6em; padding: .1em 0; }
.t-subtitle { font-size: 1.12rem; color: var(--t-ink-soft); max-width: 28em; margin: 22px 0 30px; }
@media (max-width: 899px) { .t-subtitle { margin-left: auto; margin-right: auto; } }
.t-hero-date { display: inline-flex; align-items: center; gap: 16px; text-align: left; padding: 10px 26px 10px 10px; background: var(--t-card); border-radius: 999px; }
.t-hero-day {
    display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
    background: var(--inv-primary); color: var(--inv-bg); font-family: var(--inv-font-heading); font-size: 1.7rem;
}
.t-hero-when { display: grid; gap: 2px; font-weight: 500; }
.t-hero-when span + span { font-size: .88rem; color: var(--t-ink-soft); font-weight: 400; }

/* ---------- Sections + organic waves ---------- */
.t-section { position: relative; padding: clamp(80px, 11vw, 130px) clamp(20px, 5vw, 48px); text-align: center; }
.t-section > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.t-clay { background: var(--t-clay); }
.t-clay::before, .t-clay::after {
    content: ""; position: absolute; left: 0; right: 0; height: 56px; background: var(--t-clay);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56V30C180 6 360 0 560 18S980 56 1180 36 1380 8 1440 12V56Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56V30C180 6 360 0 560 18S980 56 1180 36 1380 8 1440 12V56Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    max-width: none; pointer-events: none;
}
.t-clay::before { top: -55px; }
.t-clay::after { bottom: -55px; transform: scale(-1, -1); }
.t-clay + .t-section, .t-section + .t-clay { padding-top: clamp(100px, 12vw, 150px); }

.t-prose { max-width: 620px; font-family: var(--inv-font-heading); font-size: 1.28rem; line-height: 1.65; }
.t-prose p { margin: 0 0 1em; }
.t-quote-author { font-style: italic; color: var(--inv-primary); }
.t-lead { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.3rem; margin: -18px auto 36px; }

/* Couple: arches, the second one lower */
.t-couple { display: grid; gap: 50px; justify-items: center; }
@media (min-width: 760px) { .t-couple { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } .t-person:nth-child(2) { margin-top: 90px; } }
.t-person { max-width: 360px; }
.t-person-photo { width: min(300px, 72vw); aspect-ratio: 3 / 4; margin: 0 auto 26px; display: grid; place-items: center; box-shadow: 14px 14px 0 var(--inv-accent); }
.t-person:nth-child(2) .t-person-photo { box-shadow: -14px 14px 0 var(--inv-primary); }
.t-initial { font-family: var(--inv-font-heading); font-size: 6rem; color: var(--inv-primary); }
.t-person h3 { font-size: 1.8rem; margin-bottom: 10px; }
.t-person p { margin: 0; color: var(--t-ink-soft); }

/* Family: pills */
.t-family-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.t-pill { padding: 20px 36px; border-radius: 999px; background: var(--t-card); border: 1px solid var(--t-line); }
.t-pill--accent { background: var(--inv-primary); border-color: var(--inv-primary); color: var(--inv-bg); }
.t-pill--accent .t-kicker { color: inherit; opacity: .85; }
.t-pill-names { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 0; }

/* Story: organic blobs */
.t-story { list-style: none; padding: 0; display: grid; gap: 70px; max-width: 960px; }
.t-moment { display: grid; gap: 26px; align-items: center; justify-items: center; }
.t-blob { width: min(380px, 84vw); aspect-ratio: 1; overflow: hidden; border-radius: 58% 42% 46% 54% / 48% 56% 44% 52%; }
.t-moment:nth-child(even) .t-blob { border-radius: 42% 58% 60% 40% / 55% 42% 58% 45%; }
.t-blob img { width: 100%; height: 100%; object-fit: cover; }
.t-moment-text { max-width: 440px; }
.t-moment h3 { font-size: 1.8rem; margin-bottom: 12px; }
.t-moment p { margin: 0 0 .6em; }
@media (min-width: 760px) {
    .t-moment { grid-template-columns: 1fr 1fr; gap: 64px; text-align: left; }
    .t-moment:nth-child(even) .t-blob { order: 2; }
    .t-moment:nth-child(even) .t-moment-text { text-align: right; justify-self: end; }
    .t-moment:not(:has(.t-blob)) { grid-template-columns: 1fr; text-align: center; }
}

/* Events: sun badge + details */
.t-event-list { display: grid; gap: 18px; max-width: 820px; }
.t-event { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; text-align: left; padding: 26px; background: var(--t-card); border-radius: 36px; }
.t-event-sun { position: relative; width: 136px; aspect-ratio: 1; display: grid; place-items: center; }
.t-event-sun svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-event-sun span { position: relative; font-family: var(--inv-font-heading); font-size: 1.2rem; font-weight: 600; color: var(--inv-text); }
.t-event:nth-child(3n + 2) .t-event-sun { --t-sun: color-mix(in srgb, var(--inv-primary) 45%, var(--inv-accent)); }
.t-event h3 { font-size: 1.6rem; margin-bottom: 6px; }
.t-event-place { font-weight: 700; margin: 12px 0 2px; }
.t-event-address, .t-event-notes { color: var(--t-ink-soft); margin: 2px 0 0; font-size: .95rem; }
@media (max-width: 560px) { .t-event { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.terra .kit-event-actions { margin-top: 16px; justify-content: flex-start; }
@media (max-width: 560px) { .terra .kit-event-actions { justify-content: center; } }
.terra .kit-button { border-radius: 999px; border-color: var(--inv-primary); color: var(--inv-primary); font-weight: 700; font-size: .8rem; padding: 10px 20px; }
.terra .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown: terracotta band with a rainbow */
.t-countdown { position: relative; overflow: hidden; text-align: center; padding: 70px 20px 80px; background: var(--inv-primary); color: var(--inv-bg); }
.t-countdown-rainbow { position: absolute; width: min(760px, 140vw); left: 50%; bottom: 0; transform: translateX(-50%); opacity: .16; --t-arch-1: var(--inv-bg); --t-arch-2: var(--inv-bg); --t-arch-3: var(--inv-bg); }
.t-countdown-title { position: relative; font-family: var(--inv-font-heading); font-style: italic; font-size: 1.8rem; margin: 0 0 16px; }
.t-countdown .kit-countdown { position: relative; }
.t-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-size: clamp(2.6rem, 9vw, 4.6rem); color: var(--inv-bg); }
.t-countdown .kit-countdown-label { color: var(--inv-bg); opacity: .85; font-weight: 700; }

/* Gallery: mixed organic shapes */
.t-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 1100px; }
@media (min-width: 760px) { .t-gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.t-gallery-grid a { aspect-ratio: 3 / 4; border-radius: 22px; }
.t-gallery-grid a:nth-child(4n + 1) { border-radius: 50% 50% 22px 22px / 38% 38% 22px 22px; }
.t-gallery-grid a:nth-child(4n + 3) { border-radius: 22px 22px 50% 50% / 22px 22px 38% 38%; }
.t-gallery-grid a:nth-child(4n) { border-radius: 999px; }

/* RSVP */
.t-rsvp-card { position: relative; max-width: 700px; padding: clamp(48px, 7vw, 72px) clamp(20px, 6vw, 56px); background: var(--t-card); border-radius: 999px 999px 40px 40px; }
@media (max-width: 560px) { .t-rsvp-card { border-radius: 200px 200px 32px 32px; padding-top: 70px; } }
.t-rsvp-card > :not(.t-rsvp-pampas) { position: relative; }
.t-rsvp-pampas { position: absolute; bottom: -10px; width: 180px; height: auto; pointer-events: none; }
.t-rsvp-pampas--l { left: -120px; transform: rotate(-12deg); }
.t-rsvp-pampas--r { right: -120px; transform: scaleX(-1) rotate(-12deg); }
@media (max-width: 1000px) { .t-rsvp-pampas { display: none; } }
.terra .inv-rsvp { text-align: left; }
.terra .inv-rsvp__intro { text-align: center; font-family: var(--inv-font-heading); font-size: 1.2rem; }
.terra .inv-rsvp__deadline { text-align: center; font-weight: 700; color: var(--inv-primary); }
.terra .inv-rsvp__choice label { border-radius: 999px; font-weight: 500; }
.terra .inv-rsvp__field > label, .terra .inv-rsvp__field legend { font-weight: 700; font-size: .85rem; }
.terra .inv-rsvp__events label { font-weight: 400; }
.terra .inv-rsvp__field input:not([type=checkbox]):not([type=radio]), .terra .inv-rsvp__field select { border-radius: 999px; padding: 12px 18px; }
.terra .inv-rsvp__field textarea { border-radius: 24px; padding: 14px 18px; }
.terra .inv-rsvp__submit { border-radius: 999px; font-weight: 700; padding: 16px 34px; }

/* Info */
.t-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); text-align: left; }
.t-info-item { padding: 30px 28px; border-radius: 32px; background: var(--t-clay); }
.t-info-item:nth-child(2) { background: color-mix(in srgb, var(--inv-primary) 12%, var(--inv-bg)); }
.t-info-item h3 { font-size: 1.4rem; margin-bottom: 12px; }
.t-info-item p { margin: 0 0 .6em; color: var(--t-ink-soft); }
.t-faq { max-width: 700px; margin-top: 56px; text-align: left; }
.t-faq > .t-kicker { text-align: center; margin-bottom: 14px; }
.t-faq details { border-bottom: 1px solid var(--t-line); padding: 18px 4px; }
.t-faq summary { cursor: pointer; list-style: none; font-family: var(--inv-font-heading); font-size: 1.2rem; display: flex; justify-content: space-between; gap: 16px; }
.t-faq summary::-webkit-details-marker { display: none; }
.t-faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--inv-primary); color: var(--inv-bg); font-family: var(--inv-font-body); transition: transform .3s; }
.t-faq details[open] summary::after { transform: rotate(45deg); }
.t-faq details p { margin: 10px 0 0; color: var(--t-ink-soft); }

/* Contact */
.t-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.t-contact-person { min-width: 240px; padding: 34px 32px 28px; border-radius: 130px 130px 28px 28px; background: var(--t-card); }
.t-contact-name { font-family: var(--inv-font-heading); font-size: 1.5rem; margin: 0 0 6px; }
.t-contact-person a { color: var(--inv-primary); font-weight: 700; text-decoration: none; }

/* Footer: rising sun */
.t-footer { position: relative; overflow: hidden; text-align: center; padding: 110px 22px 60px; background: var(--inv-text); color: var(--inv-bg); }
.t-footer-sun { display: block; width: 110px; margin: 0 auto 18px; }
.t-footer-names { font-family: var(--inv-font-heading); font-size: clamp(2.8rem, 9vw, 5rem); margin: 0 0 10px; }
.t-footer-message { font-family: var(--inv-font-heading); font-style: italic; font-size: 1.3rem; margin: 0 0 8px; }
.t-hashtag { font-weight: 700; color: var(--inv-accent); margin: 0 0 18px; }
.t-footer .t-kicker { color: var(--inv-bg); opacity: .8; }
