/* =========================================================
   CECRET Visayas Inc. — ham radio theme
   ========================================================= */
:root {
    --bg: #0b0f14;
    --bg-2: #10161d;
    --panel: #151c25;
    --panel-2: #1b2430;
    --line: #263241;
    --text: #e6edf3;
    --muted: #8b98a8;
    --amber: #ffb000;
    --amber-glow: rgba(255, 176, 0, .45);
    --signal: #39ff88;
    --signal-glow: rgba(57, 255, 136, .35);
    --red: #ff3b3b;
    --blue: #1e90ff;
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
main { overflow-x: clip; }
input[type="range"] { accent-color: var(--amber); }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
}
::selection { background: var(--amber); color: #000; }
a { color: var(--amber); }
a:hover { color: #ffd060; }

.text-amber { color: var(--amber); text-shadow: 0 0 18px var(--amber-glow); }
.text-light-emphasis { color: #c9d4df !important; }
.text-secondary { color: var(--muted) !important; }
.lcd { font-family: var(--font-mono); color: var(--amber); letter-spacing: .08em; }

/* ---------- Preloader ---------- */
#preloader {
    position: fixed; inset: 0; z-index: 9999; background: var(--bg);
    display: grid; place-items: center; transition: opacity .6s, visibility .6s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.preloader-dial { text-align: center; font-family: var(--font-mono); }
.preloader-freq {
    font-size: 3rem; color: var(--amber); text-shadow: 0 0 20px var(--amber-glow);
    animation: flicker 1.2s infinite;
}
.preloader-bar { width: 220px; height: 4px; background: var(--line); margin: 1rem auto; overflow: hidden; border-radius: 2px; }
.preloader-bar span { display: block; height: 100%; width: 40%; background: var(--signal); box-shadow: 0 0 10px var(--signal); animation: scan 1s ease-in-out infinite alternate; }
.preloader-text { color: var(--muted); letter-spacing: .3em; font-size: .8rem; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: .85; } 50% { opacity: .4; } 55% { opacity: .9; } }

/* ---------- Navbar ---------- */
#mainNav {
    padding: 1rem 0; transition: all .35s;
    background: linear-gradient(180deg, rgba(11, 15, 20, .85), transparent);
}
#mainNav.scrolled {
    padding: .45rem 0; background: rgba(11, 15, 20, .92);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.brand-logo { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 2px var(--amber), 0 0 18px var(--amber-glow); transition: transform .5s; }
.navbar-brand:hover .brand-logo { transform: rotate(360deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 900; color: #fff; letter-spacing: .12em; font-size: 1.25rem; }
.brand-sub { font-family: var(--font-mono); color: var(--amber); font-size: .72rem; letter-spacing: .25em; }
#mainNav .nav-link {
    color: #c9d4df; font-weight: 500; font-size: .92rem; position: relative; padding: .5rem .85rem !important;
}
#mainNav .nav-link::after {
    content: ''; position: absolute; left: 50%; bottom: 2px; width: 0; height: 2px;
    background: var(--amber); box-shadow: 0 0 8px var(--amber); transition: all .3s; transform: translateX(-50%);
}
#mainNav .nav-link:hover, #mainNav .nav-link.active { color: #fff; }
#mainNav .nav-link:hover::after, #mainNav .nav-link.active::after { width: 60%; }
.navbar-toggler { color: #fff; font-size: 1.8rem; border: none; box-shadow: none !important; }
.nav-onair {
    position: absolute; right: 12px; top: 100%; margin-top: 6px;
    font-family: var(--font-mono); font-size: .65rem; letter-spacing: .2em; color: var(--red);
    background: rgba(255, 59, 59, .08); border: 1px solid rgba(255, 59, 59, .4); padding: 2px 8px; border-radius: 3px;
    opacity: 0; transition: opacity .3s;
}
#mainNav.scrolled .nav-onair { opacity: 1; }
.onair-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.2s infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: .2; } }

@media (max-width: 991.98px) {
    #navLinks { background: rgba(11, 15, 20, .97); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-top: .75rem; }
    .nav-onair { display: none; }
}

/* ---------- Buttons ---------- */
.btn-signal {
    --bs-btn-color: #0b0f14;
    background: var(--amber); color: #0b0f14; font-weight: 700; border: none; letter-spacing: .03em;
    box-shadow: 0 0 0 0 var(--amber-glow); transition: all .3s; position: relative; overflow: hidden;
}
.btn-signal:hover { background: #ffc233; color: #000; box-shadow: 0 0 25px var(--amber-glow); transform: translateY(-2px); }
.btn-signal::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
    transition: left .6s;
}
.btn-signal:hover::after { left: 140%; }
.btn-ghost { border: 1px solid var(--line); color: #fff; background: rgba(255, 255, 255, .03); backdrop-filter: blur(6px); transition: all .3s; }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); box-shadow: 0 0 20px var(--signal-glow); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-alt::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 22px 22px;
}
.section-label { font-family: var(--font-mono); color: var(--signal); letter-spacing: .2em; font-size: .85rem; margin-bottom: .6rem; }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.15; margin-bottom: 1.2rem; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding: 130px 0 90px; }
#waterfall { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(11, 15, 20, .55) 55%, var(--bg) 100%),
                linear-gradient(180deg, transparent 70%, var(--bg));
}
.hero-grid {
    position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background-image: linear-gradient(rgba(57, 255, 136, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(57, 255, 136, .05) 1px, transparent 1px);
    background-size: 60px 60px; mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.hero .container { z-index: 2; }
.hero-kicker { font-family: var(--font-mono); color: var(--signal); letter-spacing: .15em; margin-bottom: 1rem; font-size: .95rem; min-height: 1.5em; }
.caret { animation: blink .8s infinite; color: var(--signal); }
.hero-title { font-family: var(--font-display); font-weight: 900; line-height: .95; margin-bottom: 1rem; }
.hero-title .glitch { font-size: clamp(3.5rem, 11vw, 8rem); letter-spacing: .06em; display: block; position: relative; color: #fff; text-shadow: 0 0 40px rgba(255, 176, 0, .25); }
.hero-title-sub { display: block; font-size: clamp(1.2rem, 3vw, 2rem); color: var(--amber); letter-spacing: .5em; margin-top: .3rem; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; }
.glitch::before { color: var(--signal); animation: glitch1 4s infinite linear alternate-reverse; clip-path: inset(0 0 60% 0); }
.glitch::after { color: var(--red); animation: glitch2 3s infinite linear alternate-reverse; clip-path: inset(60% 0 0 0); }
@keyframes glitch1 { 0%, 92% { transform: none; opacity: 0; } 93% { transform: translate(-4px, -2px); opacity: .8; } 96% { transform: translate(4px, 1px); opacity: .8; } 100% { transform: none; opacity: 0; } }
@keyframes glitch2 { 0%, 90% { transform: none; opacity: 0; } 92% { transform: translate(5px, 2px); opacity: .8; } 95% { transform: translate(-3px, -1px); opacity: .8; } 100% { transform: none; opacity: 0; } }
.hero-expansion { font-family: var(--font-mono); color: #c9d4df; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; border-left: 3px solid var(--amber); padding-left: .8rem; }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--muted); border-radius: 14px; z-index: 3; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: var(--amber); border-radius: 2px; transform: translateX(-50%); animation: scrollcue 1.6s infinite; }
@keyframes scrollcue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- Radio panel ---------- */
.radio-panel {
    background: linear-gradient(160deg, #2a3340, #161c24 60%); border-radius: 18px; padding: 22px 22px 20px;
    border: 1px solid #36424f; position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -4px 0 rgba(0, 0, 0, .4);
}
.radio-screws i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #8896a5, #3a4552); }
.radio-screws i::after { content: ''; position: absolute; left: 2px; right: 2px; top: 4px; height: 2px; background: #222b35; transform: rotate(35deg); }
.radio-screws i:nth-child(1) { top: 8px; left: 8px; } .radio-screws i:nth-child(2) { top: 8px; right: 8px; }
.radio-screws i:nth-child(3) { bottom: 8px; left: 8px; } .radio-screws i:nth-child(4) { bottom: 8px; right: 8px; }
.radio-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 6px; }
.radio-brand { font-family: var(--font-display); font-size: .72rem; color: #9fb0c2; letter-spacing: .2em; margin-right: auto; }
.radio-led { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.radio-led.rx.on { background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.radio-led.tx.on { background: var(--red); box-shadow: 0 0 10px var(--red); }
.lcd-screen {
    background: linear-gradient(180deg, #1d1406, #120c03); border-radius: 10px; padding: 14px 18px;
    border: 2px solid #000; box-shadow: inset 0 0 30px rgba(255, 176, 0, .12), inset 0 2px 8px rgba(0, 0, 0, .8);
    font-family: var(--font-mono); color: var(--amber); text-shadow: 0 0 8px var(--amber-glow); position: relative; overflow: hidden;
}
.lcd-screen::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); pointer-events: none; }
.lcd-row { display: flex; justify-content: space-between; }
.small-row { font-size: .8rem; opacity: .85; letter-spacing: .12em; }
.lcd-freq { font-size: clamp(2.4rem, 6vw, 3.4rem); text-align: right; line-height: 1.1; letter-spacing: .04em; }
.lcd-freq small { font-size: .9rem; margin-left: 6px; }
#lcdName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcd-name-row { overflow: hidden; }
.lcd-ticker { display: inline-block; padding-left: 100%; white-space: nowrap; animation: lcdTicker linear forwards; }
@keyframes lcdTicker { to { transform: translateX(-100%); } }
.radio-speaker {
    background: none; border: 1px solid #36424f; border-radius: 6px; color: var(--signal); font-size: .9rem;
    width: 30px; height: 24px; display: grid; place-items: center; padding: 0; margin-right: 4px; transition: all .2s;
}
.radio-speaker:hover { border-color: var(--signal); box-shadow: 0 0 10px var(--signal-glow); }
.radio-speaker.muted { color: var(--muted); }
.smeter { margin-top: 10px; }
.smeter-scale { display: flex; justify-content: space-between; font-size: .62rem; opacity: .7; }
.smeter-bars { display: flex; gap: 3px; height: 14px; margin-top: 3px; }
.smeter-bars i { flex: 1; background: rgba(255, 176, 0, .12); border-radius: 1px; transition: background .08s; }
.smeter-bars i.on { background: var(--amber); box-shadow: 0 0 6px var(--amber-glow); }
.smeter-bars i.on.hot { background: var(--red); box-shadow: 0 0 6px var(--red); }
.radio-controls { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.knob {
    width: 86px; height: 86px; border-radius: 50%; flex: none; cursor: grab; position: relative; touch-action: none;
    background: conic-gradient(from 0deg, #4a5563, #1e252e, #4a5563, #1e252e, #4a5563);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .6), inset 0 0 0 6px #222a33, inset 0 2px 2px rgba(255, 255, 255, .2);
}
.knob:active { cursor: grabbing; }
.knob span { position: absolute; top: 10px; left: 50%; width: 4px; height: 16px; margin-left: -2px; background: var(--amber); border-radius: 2px; box-shadow: 0 0 8px var(--amber); }
.radio-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; }
.rbtn {
    font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; padding: 9px 4px; border-radius: 6px; color: #c9d4df;
    background: linear-gradient(180deg, #2f3946, #1f2730); border: 1px solid #0d1116; box-shadow: 0 3px 0 #0d1116, inset 0 1px 0 rgba(255, 255, 255, .08);
    transition: all .1s;
}
.rbtn:hover { color: var(--amber); }
.rbtn:active, .rbtn.pressed { transform: translateY(3px); box-shadow: 0 0 0 #0d1116; }
#pttBtn { color: var(--red); }

/* ---------- Marquee ---------- */
.marquee { background: var(--amber); color: #0b0f14; overflow: hidden; padding: 12px 0; transform: rotate(-1.2deg) scale(1.02); position: relative; z-index: 3; box-shadow: 0 10px 40px var(--amber-glow); }
.marquee-track { display: flex; gap: 26px; align-items: center; white-space: nowrap; width: max-content; animation: marquee 40s linear infinite; font-family: var(--font-display); font-weight: 900; letter-spacing: .15em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.logo-orbit { position: relative; width: min(340px, 80vw); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.logo-big { width: 68%; border-radius: 50%; position: relative; z-index: 2; box-shadow: 0 0 0 4px var(--amber), 0 0 60px var(--amber-glow); animation: float 6s ease-in-out infinite; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--signal); opacity: 0; animation: ripple 4.5s linear infinite; }
.ring.r2 { animation-delay: 1.5s; } .ring.r3 { animation-delay: 3s; }
@keyframes ripple { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-12px); } }
.value-chip { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; font-weight: 600; display: flex; gap: .6rem; align-items: center; transition: all .3s; }
.value-chip:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0, 0, 0, .4); }
.lcd-num { font-family: var(--font-mono); color: var(--amber); }
.stat-card { text-align: center; background: linear-gradient(180deg, var(--panel), var(--bg)); border: 1px solid var(--line); border-radius: 16px; padding: 2rem 1rem; position: relative; overflow: hidden; height: 100%; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.stat-card i { font-size: 1.8rem; color: var(--signal); }
.stat-num { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; margin: .4rem 0; }
.stat-num small { font-size: .45em; color: var(--amber); }
.stat-label { color: var(--muted); font-size: .9rem; }

/* ---------- Mission ---------- */
.mission-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; height: 100%;
    position: relative; overflow: hidden; transition: border-color .3s, box-shadow .3s; transform-style: preserve-3d;
}
.mission-card:hover { border-color: rgba(255, 176, 0, .6); box-shadow: 0 25px 50px rgba(0, 0, 0, .5), 0 0 30px rgba(255, 176, 0, .1); }
.mission-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin: 1.2rem 0 .7rem; }
.mission-card p { color: var(--muted); margin: 0; }
.mission-icon { width: 62px; height: 62px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 176, 0, .1); color: var(--amber); font-size: 1.7rem; position: relative; }
.mission-icon .pulse { position: absolute; inset: 0; border-radius: 14px; border: 2px solid var(--amber); animation: iconPulse 2.4s infinite; }
@keyframes iconPulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.mission-wave {
    position: absolute; left: 0; right: 0; bottom: 0; height: 40px; opacity: .25;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40'%3E%3Cpath d='M0 20 Q 12.5 0 25 20 T 50 20 T 75 20 T 100 20 T 125 20 T 150 20 T 175 20 T 200 20' fill='none' stroke='%23ffb000' stroke-width='2'/%3E%3C/svg%3E") repeat-x;
    background-size: 200px 40px; animation: wave 3s linear infinite;
}
.mission-card:hover .mission-wave { opacity: .7; animation-duration: 1s; }
@keyframes wave { to { background-position: 200px 0; } }

/* ---------- Anniversary ---------- */
.anniversary { overflow: hidden; }
.anniversary::before { content: ''; position: absolute; inset: -20px; background: var(--poster) center/cover; filter: blur(30px) brightness(.25) saturate(1.4); }
.anniv-poster { display: block; border-radius: 16px; overflow: hidden; border: 2px solid var(--amber); box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 40px var(--amber-glow); transition: transform .5s; }
.anniv-poster:hover { transform: scale(1.02) rotate(-.5deg); }
.big-15 { font-size: 1.8em; color: var(--amber); text-shadow: 0 0 30px var(--amber-glow); vertical-align: middle; }
.countdown { display: flex; gap: 12px; margin-top: 1.5rem; flex-wrap: wrap; }
.countdown div { background: rgba(0, 0, 0, .5); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; min-width: 82px; text-align: center; }
.countdown span { display: block; font-family: var(--font-mono); font-size: 2.2rem; color: var(--amber); text-shadow: 0 0 10px var(--amber-glow); }
.countdown small { color: var(--muted); letter-spacing: .15em; text-transform: uppercase; font-size: .7rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 980px; margin: 0 auto; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: var(--line); transform: translateX(-50%); border-radius: 2px; }
.timeline-progress { display: block; width: 100%; height: 0; background: linear-gradient(180deg, var(--signal), var(--amber)); box-shadow: 0 0 12px var(--amber-glow); border-radius: 2px; }
.tl-item { position: relative; width: 50%; padding: 0 44px 40px; }
.tl-item.left { left: 0; text-align: right; }
.tl-item.right { left: 50%; }
.tl-dot { position: absolute; top: 18px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--amber); box-shadow: 0 0 14px var(--amber-glow); z-index: 1; }
.tl-item.left .tl-dot { right: -9px; } .tl-item.right .tl-dot { left: -9px; }
.tl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.5rem; transition: all .3s; }
.tl-card:hover { border-color: var(--amber); transform: translateY(-4px); }
.tl-card h4 { font-family: var(--font-display); font-size: 1.05rem; margin: .3rem 0 .5rem; }
.tl-card p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 767.98px) {
    .timeline-line { left: 14px; }
    .tl-item, .tl-item.left, .tl-item.right { width: 100%; left: 0; text-align: left; padding: 0 0 30px 44px; }
    .tl-item.left .tl-dot, .tl-item.right .tl-dot { left: 5px; right: auto; }
}

/* ---------- Mosaic (home gallery) ---------- */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; grid-auto-flow: dense; }
.mosaic .m0 { grid-column: span 2; grid-row: span 2; }
.mosaic .m3 { grid-row: span 2; }
.mosaic .m6, .mosaic .m9 { grid-column: span 2; }
.mosaic-item { position: relative; border-radius: 14px; overflow: hidden; display: block; background: var(--panel); }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .5s; filter: saturate(.85); }
.mosaic-item:hover img { transform: scale(1.1); filter: saturate(1.15); }
.mosaic-cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem .8rem; color: #fff; font-weight: 600; font-size: .9rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, .85)); transform: translateY(100%); transition: transform .4s;
}
.mosaic-item:hover .mosaic-cap { transform: none; }
.mosaic-item::after { content: ''; position: absolute; inset: 0; border: 2px solid transparent; border-radius: 14px; transition: border-color .3s; }
.mosaic-item:hover::after { border-color: var(--amber); }
@media (max-width: 767.98px) {
    .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
}

/* ---------- Frequencies ---------- */
.freq-table { display: flex; flex-direction: column; gap: 10px; }
.freq-row {
    display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; color: var(--text);
    background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; transition: all .3s; position: relative; overflow: hidden;
}
.freq-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(255, 176, 0, .15), transparent); transition: width .4s; }
.freq-row:hover::before, .freq-row.active::before { width: 100%; }
.freq-row:hover, .freq-row.active { border-color: var(--amber); transform: translateX(6px); }
.freq-val { font-size: 1.6rem; min-width: 110px; position: relative; }
.freq-info { display: flex; flex-direction: column; position: relative; flex: 1; }
.freq-info small { color: var(--muted); }
.freq-row .bi { font-size: 1.5rem; color: var(--muted); position: relative; }
.freq-row.active .bi { color: var(--signal); animation: blink .6s infinite; }
.panel-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; }
.panel-h { font-family: var(--font-display); font-size: .95rem; letter-spacing: .05em; margin-bottom: 1rem; color: var(--amber); }
.alert-level { display: flex; gap: .9rem; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.alert-level:last-child { border: 0; }
.alert-level strong { display: block; color: var(--c); font-family: var(--font-mono); letter-spacing: .15em; }
.alert-level small { color: var(--muted); }
.alert-lamp { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); flex: none; animation: blink 2s infinite; }
.alert-level:nth-child(3) .alert-lamp { animation-delay: .5s; } .alert-level:nth-child(4) .alert-lamp { animation-delay: 1s; } .alert-level:nth-child(5) .alert-lamp { animation-delay: 1.5s; }
.license-chip { display: flex; gap: .7rem; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .6rem; }
.license-chip strong { display: block; font-size: .9rem; }
.license-chip small { font-size: .72rem; }
.lc-class { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--amber); color: #000; font-family: var(--font-display); font-weight: 900; flex: none; }

/* ---------- Morse ---------- */
.morse-box .form-control { background: var(--bg); border: 1px solid var(--line); color: var(--amber); font-family: var(--font-mono); letter-spacing: .15em; text-transform: uppercase; }
.morse-box .form-control:focus { border-color: var(--amber); box-shadow: 0 0 0 .2rem var(--amber-glow); }
.morse-display { background: #050709; border: 1px solid var(--line); border-radius: 18px; padding: 2rem; min-height: 280px; position: relative; overflow: hidden; }
.morse-lamp { width: 26px; height: 26px; border-radius: 50%; background: #2a1f08; position: absolute; top: 18px; right: 18px; transition: all .03s; }
.morse-lamp.on { background: var(--amber); box-shadow: 0 0 25px var(--amber), 0 0 60px var(--amber-glow); }
.morse-out { font-family: var(--font-mono); font-size: 1.6rem; color: var(--amber); letter-spacing: .2em; word-break: break-word; min-height: 3em; text-shadow: 0 0 8px var(--amber-glow); }
.morse-out .ch { display: inline-block; margin: 0 .6em .4em 0; opacity: .55; text-align: center; transition: opacity .2s; }
.morse-out .ch.lit { opacity: 1; }
.morse-out .ch b { display: block; font-size: .7em; color: #fff; font-weight: 400; letter-spacing: 0; }
.phonetic-out { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
.phonetic-out span { font-family: var(--font-mono); font-size: .85rem; background: var(--panel); border: 1px solid var(--line); padding: .3rem .6rem; border-radius: 6px; color: var(--signal); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.contact-list li { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); color: #c9d4df; }
.contact-list i { color: var(--amber); font-size: 1.2rem; }
.contact-form { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; position: relative; }
.contact-form::before { content: ''; position: absolute; inset: -1px; border-radius: 18px; padding: 1px; background: linear-gradient(135deg, var(--amber), transparent 40%, transparent 60%, var(--signal)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.contact-form .form-label { font-size: .85rem; color: #c9d4df; font-weight: 600; }
.contact-form .form-control, .contact-form .form-select { background-color: var(--bg); border: 1px solid var(--line); color: var(--text); }
.contact-form .form-control:focus, .contact-form .form-select:focus { border-color: var(--amber); box-shadow: 0 0 0 .2rem var(--amber-glow); background-color: var(--bg); color: var(--text); }
.contact-form .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffb000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.contact-form .was-validated .form-control:invalid, .contact-form .form-control.is-invalid { border-color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Gallery page ---------- */
.page-hero { padding: 170px 0 70px; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 15, 20, .3), var(--bg)); pointer-events: none; }
.page-hero .container { z-index: 2; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 2.5rem; }
.filter-btn { background: var(--panel); color: #c9d4df; border: 1px solid var(--line); border-radius: 30px; padding: .5rem 1.1rem; font-weight: 600; transition: all .3s; }
.filter-btn .lcd { font-size: .8rem; margin-left: .3rem; }
.filter-btn:hover { border-color: var(--amber); color: #fff; }
.filter-btn.active { background: var(--amber); color: #000; border-color: var(--amber); box-shadow: 0 0 20px var(--amber-glow); }
.filter-btn.active .lcd { color: #000; }
.masonry { columns: 4 260px; column-gap: 16px; }
.masonry-item { display: block; break-inside: avoid; margin-bottom: 16px; border-radius: 14px; overflow: hidden; position: relative; background: var(--panel); }
.masonry-item.hide { display: none; }
.masonry-item img { width: 100%; display: block; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.masonry-item:hover img { transform: scale(1.08); }
.masonry-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .85)); opacity: 0; transition: opacity .35s; }
.masonry-item:hover .masonry-overlay { opacity: 1; }
.masonry-overlay .bi { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.6); font-size: 2rem; color: #fff; transition: transform .35s; }
.masonry-item:hover .masonry-overlay .bi { transform: translate(-50%, -50%) scale(1); }
.badge-cat { align-self: flex-start; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; background: var(--amber); color: #000; padding: 2px 8px; border-radius: 4px; margin-bottom: .4rem; }
.masonry-title { color: #fff; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: #07090c; border-top: 1px solid var(--line); }
.morse-strip { overflow: hidden; white-space: nowrap; border-bottom: 1px solid var(--line); padding: 8px 0; font-family: var(--font-mono); color: rgba(255, 176, 0, .5); letter-spacing: .3em; }
.morse-strip span { display: inline-block; animation: marquee 60s linear infinite; }
.footer-logo { width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 0 0 2px var(--amber); }
.footer-name { font-family: var(--font-display); font-weight: 700; }
.footer-tag { color: var(--amber); font-family: var(--font-mono); font-size: .85rem; }
.footer-h { font-family: var(--font-display); font-size: .85rem; letter-spacing: .15em; color: #fff; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .45rem; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color .2s, padding .2s; }
.footer-links a:hover { color: var(--amber); padding-left: 4px; }
.footer-hr { border-color: var(--line); opacity: 1; }

/* ---------- Back to top ---------- */
#toTop { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; background: var(--amber); color: #000; font-size: 1.2rem; z-index: 999; opacity: 0; transform: translateY(20px); transition: all .3s; box-shadow: 0 0 20px var(--amber-glow); }
#toTop.show { opacity: 1; transform: none; }
#toTop:hover { background: #ffc233; }

/* GLightbox tweaks */
.glightbox-clean .gslide-description { background: var(--panel); }
.glightbox-clean .gslide-title { font-family: var(--font-display); color: #fff; margin-bottom: 0; font-size: 1rem; }
.glightbox-clean .gslide-desc { color: var(--amber); font-family: var(--font-mono); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
