/* ==========================================================================
   Tradiție - traditional Romanian baptism: woven rug bands, troiță, ștergar
   Signature: bands of scoarță (stepped rhombuses) that a wooden shuttle weaves in
   row by row when they scroll into view; a wooden wayside cross with an embroidered
   towel in the hero; the child's photo in a notched wooden frame.
   Palette: --inv-primary (weave colour), --inv-accent (gold / red thread), --inv-bg (linen), --inv-text
   ========================================================================== */

.traditie {
    --tr-dark: #1D1A17;
    --tr-wood: #8A5A33;
    --tr-wood-dark: #5E3B20;
    --tr-linen: #F4EDE0;
    --tr-muted: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --tr-soft: color-mix(in srgb, var(--inv-primary) 7%, var(--inv-bg));
    --kit-radius: 4px;
    font-family: var(--inv-font-body);
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
}
.traditie h1, .traditie h2, .traditie h3 { font-family: var(--inv-font-heading); font-weight: 700; line-height: 1.05; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.traditie) :is(h1, h2, h3) { margin: 0; }
.tr-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 8px; }

/* ---------- Woven band with shuttle ---------- */
.tr-band { position: relative; height: 70px; overflow: hidden; }
.tr-band.kit-reveal { opacity: 1; transform: none; }
.tr-band-weave { display: block; width: 100%; height: 70px; }
.tr-w-ground { fill: var(--tr-linen); }
.tr-w-main { fill: var(--inv-primary); }
.tr-w-gold { fill: var(--inv-accent); }
.tr-w-dark { fill: var(--tr-dark); }
.tr-band.kit-reveal .tr-band-weave { clip-path: inset(0 100% 0 0); transition: clip-path 2.4s linear; }
.tr-band.is-visible .tr-band-weave { clip-path: inset(0 0 0 0); }
.tr-shuttle { position: absolute; top: 27px; left: -80px; width: 76px; height: 16px; border-radius: 50%; background: linear-gradient(180deg, #C58D55, var(--tr-wood) 55%, var(--tr-wood-dark)); box-shadow: 0 2px 4px rgba(0, 0, 0, .3); opacity: 0; }
.tr-shuttle::after { content: ""; position: absolute; left: 28px; top: 5px; width: 20px; height: 6px; border-radius: 3px; background: var(--inv-primary); }
.tr-band.is-visible .tr-shuttle { animation: tr-shuttle 2.4s linear both; }
@keyframes tr-shuttle { 0% { left: -80px; opacity: 1; } 96% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
html:not(.kit-js) .tr-band-weave { clip-path: none; }

/* Title rhombuses */
.tr-title { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 30px; text-align: center; }
.tr-title h2 { font-size: clamp(2.2rem, 5.5vw, 3.2rem); color: var(--inv-primary); }
.tr-rhomb { flex: none; width: 18px; height: 18px; rotate: 45deg; background: var(--inv-primary); box-shadow: 0 0 0 3px var(--inv-bg), 0 0 0 5px var(--inv-accent); }

/* ---------- Navigation ---------- */
.tr-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 16px clamp(16px, 4vw, 44px); display: flex; justify-content: flex-end; }
.tr-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 18px; }
.tr-nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--inv-text); padding: 6px 0; border-bottom: 2px solid transparent; }
.tr-nav a:hover, .tr-nav a.is-current { border-color: var(--inv-primary); color: var(--inv-primary); }
.tr-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.5rem; color: var(--inv-primary); margin-right: auto; border: 0; }
.tr-nav.is-stuck { align-items: center; padding: 8px clamp(16px, 4vw, 44px); background: color-mix(in srgb, var(--inv-bg) 95%, transparent); box-shadow: 0 3px 0 var(--inv-primary); }
.traditie .kit-to-top { background: var(--inv-primary); color: #fff; }
@media (max-width: 899px) {
    .tr-nav { padding: 10px 12px; }
    .tr-nav .kit-nav-toggle { color: var(--inv-primary); font-size: 1.5rem; margin-left: auto; }
    .tr-nav .kit-nav-links { display: none; }
    .tr-nav.is-open .kit-nav-links { display: flex; flex-direction: column; gap: 10px; position: absolute; top: 58px; left: 12px; right: 12px; padding: 20px; background: var(--inv-bg); border: 2px solid var(--inv-primary); }
}

/* ---------- Hero with the troiță ---------- */
.tr-hero { min-height: calc(100svh - 70px); display: grid; align-items: center; padding: 90px clamp(20px, 5vw, 64px) 40px; background: radial-gradient(ellipse 60% 70% at 75% 60%, var(--tr-soft), transparent 70%), var(--inv-bg); }
.tr-hero-grid { width: min(1080px, 100%); margin: 0 auto; display: grid; gap: 30px; align-items: end; }
@media (min-width: 900px) { .tr-hero-grid { grid-template-columns: 1.2fr .8fr; align-items: center; } }
.tr-announce { margin: 0 0 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-accent); }
.tr-name { font-size: clamp(4rem, 13vw, 8.4rem); color: var(--inv-primary); line-height: .9; }
.tr-subtitle { max-width: 500px; margin: 20px 0 0; font-size: 1.15rem; color: var(--tr-muted); }
.tr-hero-when { display: inline-flex; flex-direction: column; margin: 26px 0 0; padding: 12px 24px; border-left: 6px solid var(--inv-primary); background: var(--tr-soft); }
.tr-hero-when strong { font-family: var(--inv-font-heading); font-size: 1.5rem; color: var(--inv-primary); }
.tr-troita { width: min(300px, 64vw); margin: 0 auto; display: block; }
.tr-roof { fill: var(--tr-wood-dark); }
.tr-roof-edge { fill: none; stroke: #C58D55; stroke-width: 2; stroke-dasharray: 6 5; }
.tr-wood { fill: var(--tr-wood); }
.tr-carve { stroke: var(--tr-wood-dark); stroke-width: 1.5; stroke-dasharray: 4 6; fill: none; }
.tr-medallion { fill: var(--tr-wood-dark); stroke: var(--inv-accent); stroke-width: 3; }
.tr-carve-gold { stroke: var(--inv-accent); stroke-width: 3; stroke-linecap: round; fill: none; }
.tr-cloth { fill: #FBF8F2; stroke: rgba(0, 0, 0, .12); }
.tr-embroidery { fill: var(--inv-primary); }
.tr-fringe { stroke: #E8E0D0; stroke-width: 1.5; }
.tr-icon-frame { fill: var(--tr-wood-dark); stroke: var(--inv-accent); stroke-width: 2; }
.tr-ground { fill: color-mix(in srgb, var(--tr-wood) 30%, var(--inv-bg)); }
.tr-stergar { transform-origin: 120px 120px; animation: tr-sway 6s ease-in-out infinite alternate; }
@keyframes tr-sway { from { rotate: -1deg; } to { rotate: 1deg; } }
@media (max-width: 899px) { .tr-hero-text { text-align: center; } .tr-subtitle { margin-inline: auto; } .tr-troita { width: 200px; } }

/* ---------- Sections ---------- */
.tr-section { max-width: 1060px; margin: 0 auto; padding: clamp(60px, 9vw, 96px) 22px; }
.tr-welcome, .tr-family, .tr-countdown, .tr-contact { text-align: center; }
.tr-prose { max-width: 640px; margin: 0 auto; font-size: 1.14rem; }
.tr-prose p { margin: 0 0 1em; }
.tr-lead { color: var(--tr-muted); margin: 0 0 22px; font-size: 1.12rem; }

/* Child in a notched wooden frame */
.tr-child-band { max-width: none; background: var(--tr-soft); }
.tr-child-grid { max-width: 980px; margin: 0 auto; display: grid; gap: 40px; align-items: center; }
@media (min-width: 760px) { .tr-child-grid { grid-template-columns: 320px 1fr; gap: 60px; } }
.tr-frame { position: relative; margin: 0 auto; width: min(300px, 76vw); padding: 16px; background: repeating-linear-gradient(90deg, var(--tr-wood) 0 10px, var(--tr-wood-dark) 10px 12px); border-radius: 150px 150px 6px 6px; box-shadow: 0 24px 40px -24px rgba(40, 20, 10, .6); }
.tr-frame img, .tr-initial { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 136px 136px 2px 2px; border: 3px solid var(--inv-accent); box-sizing: border-box; }
.tr-initial { display: grid; place-items: center; background: var(--tr-linen); font-family: var(--inv-font-heading); font-size: 6rem; color: var(--inv-primary); }
.tr-frame-towel { position: absolute; right: -18px; top: 38%; width: 46px; height: 150px; background:
    repeating-linear-gradient(180deg, transparent 0 96px, var(--inv-primary) 96px 100px, transparent 100px 106px, var(--inv-primary) 106px 110px, transparent 110px 116px, var(--inv-primary) 116px 120px, transparent 120px),
    #FBF8F2; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .35); rotate: 4deg; }
.tr-frame-towel::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: repeating-linear-gradient(90deg, #E8E0D0 0 1.5px, transparent 1.5px 5px); }
.tr-child-name { font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.2rem); color: var(--inv-primary); margin: 0 0 4px; line-height: 1.05; }
.tr-child-born { color: var(--tr-muted); margin: 0 0 14px; }
.tr-child-born strong { color: var(--inv-text); }
.tr-child-text p { margin: 0 0 .7em; }
@media (max-width: 759px) { .tr-child-text { text-align: center; } }

/* Family & contact */
.tr-crew { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.tr-crew-card { min-width: 230px; padding: 20px 26px; border: 2px solid var(--inv-primary); background: #fff; box-shadow: 6px 6px 0 var(--inv-accent); }
.tr-crew-names { font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.5rem; margin: 0; }
.tr-crew-card a { display: inline-block; margin-top: 6px; color: var(--inv-primary); font-weight: 700; text-decoration: none; }

/* Events */
.tr-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.tr-card { padding: 28px 24px; text-align: center; background: #fff; border-top: 8px solid var(--inv-primary); box-shadow: 0 18px 30px -24px rgba(40, 20, 10, .5); }
.tr-card-time { font-family: var(--inv-font-heading); font-weight: 700; font-size: 2.6rem; color: var(--inv-primary); margin: 0; line-height: 1; }
.tr-card h3 { font-size: 1.6rem; margin: 8px 0 6px; }
.tr-card-place { font-weight: 700; margin: 10px 0 0; }
.tr-card-address, .tr-card-notes { color: var(--tr-muted); margin: 4px 0 0; font-size: .96rem; }
.traditie .kit-event-actions { justify-content: center; margin-top: 16px; }
.traditie .kit-button { border-radius: 0; border: 2px solid var(--inv-primary); color: var(--inv-primary); background: transparent; font-weight: 700; }
.traditie .kit-button:hover { background: var(--inv-primary); color: #fff; }

/* Countdown */
.tr-countdown .kit-countdown { gap: clamp(8px, 2.5vw, 22px); margin-top: 12px; }
.tr-countdown .kit-countdown-unit { width: clamp(76px, 18vw, 116px); aspect-ratio: 1; min-width: 0; align-content: center; background: #fff; border: 3px solid var(--inv-primary); box-shadow: 5px 5px 0 var(--inv-accent); }
.tr-countdown .kit-countdown-value { color: var(--inv-primary); font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(1.9rem, 5.5vw, 2.9rem); }
.tr-countdown .kit-countdown-label { font-size: clamp(.58rem, 1.7vw, .72rem); }

/* Gallery */
.tr-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 760px) { .tr-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.tr-gallery-grid a { border: 5px solid #fff; outline: 2px solid var(--inv-primary); border-radius: 0; }

/* RSVP */
.tr-rsvp-card { max-width: 680px; margin: 0 auto; padding: clamp(28px, 5vw, 50px); background: #fff; border: 2px solid var(--inv-primary); box-shadow: 10px 10px 0 var(--inv-accent); text-align: center; }
.traditie .inv-rsvp__submit { border-radius: 0; font-weight: 700; }

/* Info */
.tr-info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.tr-info-item { padding: 24px; background: var(--tr-soft); border-left: 6px solid var(--inv-primary); }
.tr-info-item h3 { font-size: 1.4rem; color: var(--inv-primary); margin-bottom: 6px; }
.tr-info-item p { margin: 0 0 .5em; }
.tr-faq { max-width: 720px; margin: 44px auto 0; text-align: center; }
.tr-faq details { text-align: left; border-bottom: 2px dotted color-mix(in srgb, var(--inv-primary) 35%, transparent); padding: 14px 4px; }
.tr-faq summary { cursor: pointer; font-weight: 700; list-style: none; }
.tr-faq summary::-webkit-details-marker { display: none; }
.tr-faq summary::before { content: "◆"; color: var(--inv-primary); margin-right: 10px; font-size: .8em; }
.tr-faq details p { margin: 8px 0 0 24px; color: var(--tr-muted); }

/* Footer */
.tr-footer { padding: 0 0 60px; text-align: center; background: var(--tr-soft); }
.tr-footer-name { font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(3rem, 8vw, 4.6rem); color: var(--inv-primary); margin: 44px 0 6px; line-height: 1; }
.tr-footer p { margin: 0 0 6px; padding: 0 22px; }
.tr-hashtag { font-weight: 700; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) { .tr-band.is-visible .tr-shuttle, .tr-stergar { animation: none; } .tr-band.kit-reveal .tr-band-weave { transition: none; } }
