/* ==========================================================================
   Hambar - rustic barn wedding: plank panels and pyrography titles
   Signature: titles burn into the wood - an ember line sweeps across the letters
   (background-clip text gradient moving from glowing orange to charred brown)
   with a flicker of heat, on load for the names and on scroll for every title;
   sections are nailed wooden planks.
   Palette: --inv-primary (char / forest / barn red), --inv-accent (ember gold), --inv-bg, --inv-text
   ========================================================================== */

.hambar {
    --hb-plank: #C9A27A;
    --hb-plank-dark: #9E7652;
    --hb-char: color-mix(in srgb, var(--inv-primary) 55%, #1A0F08);
    --hb-ember: #FF8A2A;
    --hb-muted: color-mix(in srgb, var(--inv-text) 68%, var(--inv-bg));
    --kit-radius: 6px;
    font-family: var(--inv-font-body);
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--inv-text);
    background: var(--inv-bg);
    overflow-x: clip;
}
.hambar h1, .hambar h2, .hambar h3 { font-family: var(--inv-font-heading); font-weight: 700; line-height: 1.08; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.hambar) :is(h1, h2, h3) { margin: 0; }
.hb-kicker { font-size: .8rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 8px; }

/* ---------- Wood ---------- */
.hb-wood { position: relative; color: #2A1B10;
    background:
        repeating-linear-gradient(180deg, transparent 0 58px, rgba(60, 35, 15, .45) 58px 60px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 9px, rgba(0, 0, 0, .05) 9px 10px, transparent 10px 23px),
        radial-gradient(ellipse 40px 10px at 30% 30%, rgba(80, 45, 20, .25), transparent 70%),
        radial-gradient(ellipse 60px 14px at 70% 75%, rgba(80, 45, 20, .2), transparent 70%),
        linear-gradient(180deg, var(--hb-plank), color-mix(in srgb, var(--hb-plank) 80%, var(--hb-plank-dark)));
    box-shadow: inset 0 0 0 1px rgba(60, 35, 15, .35), inset 0 0 40px rgba(60, 35, 15, .25), 0 20px 36px -24px rgba(40, 20, 5, .6); }
.hb-nail { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #D8D2C8, #5A5550 70%); box-shadow: 0 1px 1px rgba(0, 0, 0, .5); }
.hb-nail--tl { top: 12px; left: 12px; } .hb-nail--tr { top: 12px; right: 12px; }
.hb-nail--bl { bottom: 12px; left: 12px; } .hb-nail--br { bottom: 12px; right: 12px; }

/* ---------- Pyrography burn ---------- */
.hb-burn { color: transparent; -webkit-background-clip: text; background-clip: text;
    background-image: linear-gradient(90deg, var(--hb-char) 0 40%, #3A1E08 44%, #C2410C 47%, var(--hb-ember) 49%, #FFE3A0 50%, transparent 51%);
    background-size: 250% 100%; background-position: 100% 0; background-repeat: no-repeat;
    text-shadow: none; }
.hb-burn.is-burning, .kit-reveal.is-visible .hb-burn { animation: hb-burn 2.6s cubic-bezier(.45, .1, .4, 1) .2s forwards, hb-heat 2.6s linear .2s; }
@keyframes hb-burn { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes hb-heat { 0%, 90% { filter: drop-shadow(0 0 6px rgba(255, 138, 42, .55)); } 100% { filter: none; } }
html:not(.kit-js) .hb-burn { background-position: 0% 0; }
.hb-title { display: flex; justify-content: center; margin-bottom: 32px; text-align: center; }
.hb-plank { display: inline-block; padding: 14px 30px 10px; font-size: clamp(2.1rem, 5.2vw, 3.2rem); border-radius: 4px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 9px, rgba(0, 0, 0, .05) 9px 10px, transparent 10px 23px), linear-gradient(180deg, var(--hb-plank), color-mix(in srgb, var(--hb-plank) 80%, var(--hb-plank-dark)));
    box-shadow: inset 0 0 0 1px rgba(60, 35, 15, .35), 0 12px 20px -14px rgba(40, 20, 5, .6); }

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

/* ---------- Hero: a wooden sign over the photo ---------- */
.hb-hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 100px 18px 70px; overflow: hidden; background: #3A2616; isolation: isolate; }
.hb-hero-photo { position: absolute; inset: 0; z-index: -1; }
.hb-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hb-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(30, 18, 8, .45), rgba(30, 18, 8, .2) 40%, rgba(30, 18, 8, .55)); }
.hb-sign { width: min(720px, 100%); padding: 44px clamp(22px, 5vw, 56px) 38px; text-align: center; border-radius: 8px; rotate: -1deg; }
.hb-sign .hb-kicker { color: #4A2C15; }
.hb-names { font-size: clamp(3rem, 9vw, 6rem); line-height: 1; }
.hb-names em { font-style: normal; font-size: .6em; }
.hb-subtitle { max-width: 520px; margin: 16px auto 0; color: #3A2616; }
.hb-hero-date { margin: 18px 0 0; font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.2rem; color: #3A2616; }

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

/* Couple */
.hb-couple-grid { display: grid; gap: 50px; }
@media (min-width: 760px) { .hb-couple-grid { grid-template-columns: 1fr 1fr; gap: 60px; } }
.hb-person { text-align: center; }
.hb-portrait { margin: 0 auto 20px; width: min(280px, 72vw); padding: 12px; border-radius: 6px; background: linear-gradient(180deg, var(--hb-plank), var(--hb-plank-dark)); box-shadow: 0 16px 30px -20px rgba(40, 20, 5, .6); rotate: -1.5deg; }
.hb-person:nth-child(2) .hb-portrait { rotate: 1.5deg; }
.hb-portrait img, .hb-initial { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.hb-initial { display: grid; place-items: center; background: var(--inv-bg); font-family: var(--inv-font-heading); font-size: 6rem; color: var(--inv-primary); }
.hb-person h3 { font-size: 1.8rem; color: var(--inv-primary); margin-bottom: 8px; }
.hb-person p { color: var(--hb-muted); max-width: 380px; margin: 0 auto; }

/* Family */
.hb-family-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 0; }
.hb-family-list div { min-width: 230px; padding: 18px 26px; border: 2px dashed color-mix(in srgb, var(--inv-primary) 40%, transparent); border-radius: 6px; }
.hb-family-list dt { font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); }
.hb-family-list dd { margin: 4px 0 0; font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.3rem; }

/* Story */
.hb-story-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 60px; }
.hb-story-item { display: grid; gap: 30px; align-items: center; }
@media (min-width: 760px) { .hb-story-item { grid-template-columns: 1fr 1fr; gap: 56px; } .hb-story-item:nth-child(even) .hb-story-photo { order: 2; } }
.hb-story-photo { margin: 0; padding: 10px; border-radius: 6px; background: linear-gradient(180deg, var(--hb-plank), var(--hb-plank-dark)); }
.hb-story-photo img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 3px; }
.hb-story-text h3 { font-size: 1.8rem; color: var(--inv-primary); margin-bottom: 8px; }
.hb-story-text p { margin: 0 0 .6em; }

/* Events on nailed planks */
.hb-event-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.hb-event { padding: 34px 24px 28px; text-align: center; border-radius: 6px; }
.hb-event:nth-child(odd) { rotate: -.8deg; } .hb-event:nth-child(even) { rotate: .8deg; }
.hb-event-time { font-family: var(--inv-font-heading); font-weight: 700; font-size: 2.5rem; color: var(--hb-char); margin: 0; line-height: 1; }
.hb-event h3 { font-size: 1.5rem; margin: 8px 0 4px; }
.hb-event .hb-kicker { color: #4A2C15; }
.hb-event-place { font-weight: 700; margin: 10px 0 0; }
.hb-event-address, .hb-event-notes { color: #4A3322; margin: 4px 0 0; font-size: .96rem; }
.hambar .kit-event-actions { justify-content: center; margin-top: 16px; }
.hambar .kit-button { border-radius: 4px; border: 2px solid #3A2616; color: #3A2616; background: rgba(255, 246, 232, .5); font-weight: 700; }
.hambar .kit-button:hover { background: #3A2616; color: #FFF6E8; }

/* Countdown */
.hb-countdown .kit-countdown { gap: clamp(8px, 2.5vw, 20px); margin-top: 12px; }
.hb-countdown .kit-countdown-unit { width: clamp(76px, 18vw, 116px); aspect-ratio: 1; min-width: 0; align-content: center; border-radius: 50%; color: #2A1B10;
    background: radial-gradient(circle, transparent 0 20%, rgba(80, 45, 20, .18) 21% 22%, transparent 23% 38%, rgba(80, 45, 20, .18) 39% 40%, transparent 41% 58%, rgba(80, 45, 20, .2) 59% 60%, transparent 61%), var(--hb-plank);
    box-shadow: inset 0 0 0 5px var(--hb-plank-dark), 0 10px 20px -12px rgba(40, 20, 5, .6); }
.hb-countdown .kit-countdown-value { font-family: var(--inv-font-heading); font-weight: 700; color: var(--hb-char); font-size: clamp(1.8rem, 5.5vw, 2.8rem); }
.hb-countdown .kit-countdown-label { font-size: clamp(.58rem, 1.7vw, .72rem); color: #4A2C15; }

/* Gallery: photos nailed to a barn wall */
.hb-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (min-width: 760px) { .hb-gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 26px; } }
.hb-gallery-grid a { position: relative; overflow: visible; aspect-ratio: 1; border-radius: 0; padding: 8px; background: #FFF9EF; box-shadow: 0 14px 24px -16px rgba(40, 20, 5, .6); rotate: -1.5deg; }
.hb-gallery-grid a:nth-child(2n) { rotate: 1.5deg; }
.hb-gallery-grid a::before { content: ""; position: absolute; top: -4px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #D8D2C8, #5A5550 70%); z-index: 1; }
.hb-gallery-grid a:hover img { transform: none; }

/* RSVP */
.hb-rsvp-card { max-width: 680px; margin: 0 auto; padding: clamp(28px, 5vw, 50px); border-radius: 8px; background: #FFF9EF; border: 2px solid color-mix(in srgb, var(--inv-primary) 30%, transparent); box-shadow: 0 30px 60px -40px rgba(40, 20, 5, .5); text-align: center; }
.hambar .inv-rsvp__submit { border-radius: 4px; font-weight: 700; }

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

/* Contact */
.hb-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 60px; }
.hb-contact-name { font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.7rem; color: var(--inv-primary); margin: 0 0 4px; }
.hb-contact-person a { color: var(--inv-text); font-weight: 600; text-decoration: none; }

/* Footer on planks */
.hb-footer { padding: 60px 22px; text-align: center; border-radius: 0; }
.hb-footer-message { font-style: italic; margin: 0 0 4px; color: #3A2616; }
.hb-footer-names { font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--hb-char); margin: 0 0 6px; }
.hb-hashtag { font-weight: 700; color: #3A2616; margin: 0 0 6px; }
.hb-footer .hb-kicker { color: #4A2C15; }

@media (prefers-reduced-motion: reduce) { .hb-burn, .hb-burn.is-burning, .kit-reveal.is-visible .hb-burn { animation: none; background-position: 0% 0; } }
