/**
 * GBWebcams — Town Hero (Step 78, v2.50.0)
 *
 * Styles for the gbwebcams_town_hero widget: sky phases and weather, the panning town drawn by
 * gbwebcams-town-landmarks.js, event themes, and the drifting postcards. Everything is scoped under
 * .gb-town-hero; class names inside keep the hc- prefix the drawing emits (hc-win, hc-lamp, hc-scroll…).
 * Loaded only on pages that hold the widget (get_style_depends). No remote fonts or images: the script
 * font is the theme's bundled Caveat via --gb-font-script.
 */

.gb-town-hero { position: relative; overflow: hidden; min-height: 600px; display: flex; align-items: center; isolation: isolate; background: #0a1628; }
/* Height (Step 79): fill the visitor's screen below the sticky header (capped by --hc-screen-max if set); per-device values come from Elementor; "section" = the host decides */
.gb-town-hero.hc-height-screen { min-height: calc(100vh - var(--hc-offset, var(--gb-header-h, 80px))); min-height: calc(100svh - var(--hc-offset, var(--gb-header-h, 80px))); max-height: var(--hc-screen-max, none); } /* --hc-offset = the measured distance from the page top (Step 80) */
.gb-town-hero.hc-height-section { min-height: 0; }
/* Background mode: the hero covers its Elementor section and sits beneath the section's own widgets; postcards stay clickable where nothing covers them */
.gb-town-hero.hc-mode-background { position: absolute; inset: 0; z-index: -1; min-height: 0; max-height: none; }
.gb-town-hero-host { position: relative; z-index: 0; overflow: hidden; }
.gb-town-hero-host-sized { min-height: calc(100vh - var(--hc-offset, var(--gb-header-h, 80px))); min-height: calc(100svh - var(--hc-offset, var(--gb-header-h, 80px))); }
.gb-town-hero-host > .elementor-container, .gb-town-hero-host > .e-con-inner { position: relative; z-index: 1; }
.gb-town-hero .hc-bg { position: absolute; inset: 0; z-index: 0; }
.gb-town-hero > .gb-container { position: relative; z-index: 2; width: 100%; pointer-events: none; }
.gb-town-hero .hc-copy { pointer-events: auto; width: max-content; max-width: min(560px, 100%); padding: 60px 0 180px; }
/* Step 82: on a short screen (13" laptop) the copy block must not push the hero past the fold — padding follows the window height,
   and --hc-fit (measured in fitOffset) shrinks the whole block when it still would not fit */
.gb-town-hero.hc-height-screen .hc-copy { padding: clamp(24px, 7vh, 60px) 0 clamp(90px, 22vh, 180px); zoom: var(--hc-fit, 1); }
.gb-town-hero .hc-copy h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 20px; color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.gb-town-hero .hc-copy .gb-hero-subtitle { color: #d6deea; }
.gb-town-hero .hc-logo { width: 200px; max-width: 100%; margin: 0 0 22px; line-height: 0; }
.gb-town-hero .hc-logo svg, .gb-town-hero .hc-logo img { width: 100%; height: auto; display: block; }
.gb-town-hero.hc-static * { animation: none !important; transition: none !important; }
.gb-town-hero .hc-live { display: inline-flex; align-items: center; gap: 6px; background: var(--gb-accent-red); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; }
.gb-town-hero .hc-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: hc-blink 1.4s infinite; }
@keyframes hc-blink { 50% { opacity: .35; } }
/* Fades are opt-in classes (Step 79): hc-fade-side darkens behind the heading, hc-fade-bottom melts the road into the page (off by default — the owner wants a clean edge) */
.gb-town-hero .hc-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: none; }
.gb-town-hero.hc-fade-side .hc-vignette { background: linear-gradient(90deg, rgba(var(--gb-bg-dark-rgb), .75) 0%, rgba(var(--gb-bg-dark-rgb), .35) 45%, rgba(var(--gb-bg-dark-rgb), 0) 70%); }
.gb-town-hero.hc-fade-bottom .hc-vignette { background: linear-gradient(180deg, rgba(var(--gb-bg-dark-rgb), 0) 70%, var(--gb-bg-dark) 100%); }
.gb-town-hero.hc-fade-side.hc-fade-bottom .hc-vignette { background: linear-gradient(90deg, rgba(var(--gb-bg-dark-rgb), .75) 0%, rgba(var(--gb-bg-dark-rgb), .35) 45%, rgba(var(--gb-bg-dark-rgb), 0) 70%), linear-gradient(180deg, rgba(var(--gb-bg-dark-rgb), 0) 70%, var(--gb-bg-dark) 100%); }

/* ---------- postcards ---------- */
.gb-town-hero .hc-cards { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; z-index: 1; }
.gb-town-hero .hc-card { position: absolute; width: 215px; background: #f6f1e7; border-radius: var(--gb-radius); padding: 10px 10px 8px; box-shadow: 0 14px 34px rgba(0,0,0,.5); color: inherit; text-decoration: none; display: block;
    transform: rotate(var(--rot)); transition: transform .9s cubic-bezier(.4,0,.2,1), box-shadow .9s; animation: hc-drift 9s ease-in-out infinite alternate; animation-delay: var(--delay); will-change: transform; }
.gb-town-hero .hc-card .hc-thumb { position: relative; height: 128px; border-radius: 8px; overflow: hidden; background: #0f2142; }
.gb-town-hero .hc-card .hc-thumb svg { width: 100%; height: 100%; display: block; }
.gb-town-hero .hc-card .hc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gb-town-hero .hc-card .hc-live { position: absolute; top: 8px; left: 8px; }
.gb-town-hero .hc-card .hc-cap { font-family: var(--gb-font-script); font-size: 1.2rem; line-height: 1.1; color: #24324a; margin: 8px 2px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.gb-town-hero .hc-card .hc-cap small { font-size: 1rem; color: #5a6b85; white-space: nowrap; }
.gb-town-hero .hc-card .hc-stamp { position: absolute; top: 6px; right: 6px; width: 30px; height: 36px; background: #f6f1e7; border: 2px dashed #c9bda6; font: 800 .5rem/1.1 var(--gb-font-family); color: #9a2a2a; display: flex; align-items: center; justify-content: center; text-align: center; transform: rotate(6deg); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.gb-town-hero .hc-card .hc-watch { position: absolute; left: 50%; bottom: 8px; transform: translate(-50%, 8px); background: var(--gb-accent-red); color: #fff; font: 800 .68rem var(--gb-font-family); letter-spacing: .06em; padding: 6px 12px; border-radius: 999px; opacity: 0; transition: opacity .3s, transform .3s; white-space: nowrap; box-shadow: 0 4px 14px var(--gb-accent-red-glow); }
.gb-town-hero .hc-card:hover, .gb-town-hero .hc-card.is-hover, .gb-town-hero .hc-card:focus-visible { transform: rotate(0deg) scale(1.12) translateY(-6px); z-index: 20; box-shadow: 0 34px 70px rgba(0,0,0,.7); animation-play-state: paused; cursor: pointer; }
.gb-town-hero .hc-card:hover .hc-watch, .gb-town-hero .hc-card.is-hover .hc-watch, .gb-town-hero .hc-card:focus-visible .hc-watch { opacity: 1; transform: translate(-50%, 0); }
.gb-town-hero .hc-card:hover .hc-live, .gb-town-hero .hc-card.is-hover .hc-live { box-shadow: 0 0 0 4px rgba(224, 30, 38, .3); }
@keyframes hc-drift { from { translate: -10px 0; } to { translate: 12px 4px; } }
.gb-town-hero .hc-single .hc-card { left: 52% !important; top: 7% !important; width: 330px; opacity: 0; transition: opacity .9s, transform .9s; animation: none; }
.gb-town-hero .hc-single .hc-card .hc-thumb { height: 200px; }
.gb-town-hero .hc-single .hc-card .hc-cap { font-size: 1.5rem; }
.gb-town-hero .hc-single .hc-card.is-front { opacity: 1; transform: rotate(-2deg) scale(1.05); }
.gb-town-hero .hc-single .hc-card:hover, .gb-town-hero .hc-single .hc-card.is-hover { transform: rotate(0deg) scale(1.1) translateY(-6px); }

/* ---------- sky ---------- */
.gb-town-hero .hc-sky { position: absolute; inset: 0; transition: background 1s; }
.gb-town-hero.hc-h-dawn   .hc-sky { background: linear-gradient(180deg, #16213f 0%, #3b3f73 40%, #c2607a 75%, #f2a65a 100%); }
.gb-town-hero.hc-h-day    .hc-sky { background: linear-gradient(180deg, #0d2a55 0%, #2a68ac 48%, #8ec4e6 72%, #d9e6ee 100%); }
.gb-town-hero.hc-h-golden .hc-sky { background: linear-gradient(180deg, #152042 0%, #4e3c6e 40%, #c86a5a 68%, #f0a060 82%, #f6d292 100%); }
.gb-town-hero.hc-h-night  .hc-sky { background: linear-gradient(180deg, #050b18 0%, #0a1628 60%, #16294d 100%); }
.gb-town-hero .hc-sunmoon { position: absolute; width: 70px; height: 70px; border-radius: 50%; left: var(--sx); top: var(--sy); transform: translate(-50%, -50%); }
.gb-town-hero.hc-h-day .hc-sunmoon, .gb-town-hero.hc-h-golden .hc-sunmoon, .gb-town-hero.hc-h-dawn .hc-sunmoon { background: #ffe9a8; box-shadow: 0 0 60px 20px rgba(255, 220, 140, .55); }
.gb-town-hero.hc-h-night .hc-sunmoon { background: #e8ecf5; box-shadow: 0 0 40px 10px rgba(220, 230, 255, .25); width: 46px; height: 46px; }
.gb-town-hero .hc-stars { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
.gb-town-hero.hc-h-night .hc-stars { opacity: 1; }
.gb-town-hero .hc-star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: hc-twinkle 3s infinite; animation-delay: var(--d); }
@keyframes hc-twinkle { 50% { opacity: .25; } }
.gb-town-hero .hc-clouds { position: absolute; inset: 0; overflow: hidden; }
.gb-town-hero .hc-cloud { position: absolute; top: var(--ct); left: -260px; width: 240px; height: 90px; animation: hc-cloud calc(var(--cs) / var(--hc-speed, 1)) linear infinite; animation-delay: var(--cd); --hi: #ffffff; --lo: #c3d3e4; --sh: rgba(120,150,190,.35); }
.gb-town-hero .hc-cloud svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gb-town-hero.hc-h-night .hc-cloud { --hi: #33425f; --lo: #1d2a45; --sh: rgba(0,0,0,.25); }
.gb-town-hero.hc-h-golden .hc-cloud { --hi: #ffe3c4; --lo: #d98a6c; --sh: rgba(150,70,60,.35); }
.gb-town-hero.hc-h-dawn .hc-cloud { --hi: #f6cfd6; --lo: #8c6a98; --sh: rgba(80,50,100,.35); }
.gb-town-hero.hc-w-rain .hc-cloud, .gb-town-hero.hc-w-cloud .hc-cloud { --hi: #d4dae2; --lo: #8e9aab; --sh: rgba(60,70,90,.4); }
@keyframes hc-cloud { to { transform: translateX(calc(100vw + 260px)); } }
.gb-town-hero.hc-w-cloud .hc-sky { filter: saturate(.6) brightness(.85); }
.gb-town-hero.hc-w-rain  .hc-sky { filter: saturate(.4) brightness(.6); }
.gb-town-hero .hc-rain { position: absolute; inset: 0; display: none; background-image: repeating-linear-gradient(100deg, transparent 0 18px, rgba(255,255,255,.28) 18px 19px); background-size: 60px 60px; animation: hc-rain .5s linear infinite; }
.gb-town-hero.hc-w-rain .hc-rain { display: block; }
@keyframes hc-rain { to { background-position: -12px 60px; } }

/* ---------- town ---------- */
.gb-town-hero .hc-town { position: absolute; left: 0; right: 0; bottom: 0; height: min(100%, 37.5vw); } /* Step 79: on a tall screen the town keeps its drawn size at the foot of the sky instead of zooming to fill */
.gb-town-hero .hc-town .hc-layer-wrap { position: absolute; inset: 0; pointer-events: none; } /* Step 81: one GPU layer per moving thing */
.gb-town-hero .hc-town svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; overflow: visible; }
.gb-town-hero .hc-win { fill: #1e2f52; transition: fill 1s; }
.gb-town-hero.hc-h-night .hc-win, .gb-town-hero.hc-h-golden .hc-win { fill: #ffb347; }
.gb-town-hero.hc-h-night .hc-lamp { fill: #ffd27a; filter: drop-shadow(0 0 6px #ffb347); }
.gb-town-hero .hc-veh { animation: hc-drive-r 46s linear infinite; will-change: transform; transform: translateZ(0); }
.gb-town-hero .hc-veh-l { animation-name: hc-drive-l; }
@keyframes hc-drive-r { from { transform: translateX(calc(-280px * var(--vs, 1))); } to { transform: translateX(calc(1880px * var(--vs, 1))); } }
@keyframes hc-drive-l { from { transform: translateX(calc(1880px * var(--vs, 1))); } to { transform: translateX(calc(-280px * var(--vs, 1))); } }
.gb-town-hero .hc-scroll { animation: hc-scroll var(--dur) linear infinite; animation-delay: calc(var(--scroll, 0) * var(--dur) * -1); will-change: transform; transform: translateZ(0); }
@keyframes hc-scroll { to { transform: translateX(calc(var(--w) * -1px * var(--vs, 1))); } } /* --w in drawing units; Step 80's crispEdges is gone — layers are drawn once now */
.gb-town-hero .hc-gull { animation: hc-gull 22s linear infinite; animation-delay: var(--gd); will-change: transform; }
@keyframes hc-gull { from { transform: translate(calc(-100px * var(--vs, 1)), calc(var(--gy) * 1px * var(--vs, 1))); } 50% { transform: translate(calc(800px * var(--vs, 1)), calc((var(--gy) - 40) * 1px * var(--vs, 1))); } to { transform: translate(calc(1700px * var(--vs, 1)), calc((var(--gy) + 10) * 1px * var(--vs, 1))); } }
.gb-town-hero .hc-wing { animation: hc-flap .55s ease-in-out infinite alternate; animation-delay: var(--gd); }
@keyframes hc-flap { from { d: path('M-16 -2 Q -8 -12 0 0 Q 8 -12 16 -2'); } to { d: path('M-16 3 Q -8 -2 0 0 Q 8 -2 16 3'); } }
.gb-town-hero .hc-bunting { animation: hc-sway 4s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes hc-sway { from { transform: skewX(-1.5deg); } to { transform: skewX(1.5deg); } }
.gb-town-hero.hc-nonear .hc-near, .gb-town-hero.hc-nonear .hc-cards, .gb-town-hero.hc-nonear .hc-veh { display: none; } /* preview sheet of the downs on their own */

/* ---------- event themes (class hc-t-<theme> on the hero) ---------- */
.gb-town-hero .hc-snow { position: absolute; inset: 0; display: none; pointer-events: none; z-index: 2;
    background-image: radial-gradient(circle, rgba(255,255,255,.9) 1.2px, transparent 2px), radial-gradient(circle, rgba(255,255,255,.6) 1px, transparent 1.8px), radial-gradient(circle, rgba(255,255,255,.8) 1.5px, transparent 2.4px);
    background-size: 90px 90px, 140px 140px, 220px 220px; background-position: 0 0, 40px 60px, 100px 20px; animation: hc-snow calc(14s / var(--hc-speed, 1)) linear infinite; }
.gb-town-hero.hc-t-christmas .hc-snow { display: block; }
@keyframes hc-snow { to { background-position: 30px 90px, 60px 200px, 130px 240px; } }
.gb-town-hero.hc-t-halloween .hc-sky { filter: hue-rotate(-25deg) saturate(.8) brightness(.8); }
.gb-town-hero.hc-t-halloween .hc-sunmoon { background: #ffb347 !important; box-shadow: 0 0 60px 20px rgba(255, 150, 60, .45) !important; width: 80px !important; height: 80px !important; }
.gb-town-hero.hc-t-remembrance .hc-sky { filter: saturate(.75); }

/* ---------- phone: copy on top, postcards in the band above the rooftops, more street ---------- */
@media (max-width: 1024px) {
    .gb-town-hero { min-height: 820px; align-items: flex-start; }
    .gb-town-hero.hc-height-screen { min-height: 820px; max-height: none; }
    .gb-town-hero-host-sized { min-height: 820px; }
    .gb-town-hero .hc-copy { padding: 28px 0 0; }
    .gb-town-hero .hc-town { height: 500px; }
    .gb-town-hero .hc-cards { width: 100%; top: auto; bottom: 232px; height: 140px; }
    .gb-town-hero .hc-card { width: 128px; padding: 6px 6px 4px; border-radius: 8px; }
    .gb-town-hero .hc-card .hc-thumb { height: 74px; border-radius: 5px; }
    .gb-town-hero .hc-card .hc-cap { font-size: .82rem; margin-top: 4px; }
    .gb-town-hero .hc-card .hc-cap small { font-size: .62rem; }
    .gb-town-hero .hc-card .hc-stamp { width: 20px; height: 24px; font-size: .38rem; }
    .gb-town-hero .hc-card .hc-live { font-size: .5rem; padding: 2px 6px; }
    .gb-town-hero .hc-label { transform: scale(1.35); transform-box: fill-box; transform-origin: 50% 100%; } /* Step 82: scale plaque AND text together — bumping only the font left the text outside its box */
    .gb-town-hero .hc-single .hc-card { left: 8% !important; width: 260px; }
    .gb-town-hero .hc-single .hc-card .hc-thumb { height: 150px; }
}
