/* Williams and Sons Electric – custom styles (Tailwind handles utilities) */
:root {
    --ink: #070B14;
    --navy: #0D1626;
    --panel: #121D31;
    --amber: #FFC400;
    --volt: #4DD4FF;
}

html { scroll-behavior: smooth; }
body { background: var(--ink); }
main:focus { outline: none; }

/* ---------- Accessibility ---------- */
.skip-link {
    position: fixed; left: 1rem; top: -4rem; z-index: 100;
    background: var(--amber); color: #111; font-weight: 700;
    padding: .7rem 1.1rem; border-radius: .6rem; transition: top .15s;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: .35rem; }

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

/* ---------- Header (transparent over the banner) ---------- */
.site-header { background: transparent; transition: background-color .25s, box-shadow .25s, backdrop-filter .25s; }
.site-header.is-scrolled,
.site-header.menu-open {
    background: rgba(7, 11, 20, .88);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.nav-link {
    position: relative; display: inline-block; padding: .55rem .9rem; border-radius: .6rem;
    font-weight: 500; font-size: .95rem; color: #e2e8f0; transition: color .2s;
}
.nav-link::after {
    content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .25rem; height: 2px;
    background: linear-gradient(90deg, var(--amber), var(--volt));
    transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-link:hover, .nav-link.is-current { color: #fff; }
.nav-link:hover::after, .nav-link.is-current::after { transform: scaleX(1); }

.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
    border-radius: .7rem; border: 1px solid rgba(255, 255, 255, .25); color: #fff;
}
.mobile-nav { border-top: 1px solid rgba(255, 255, 255, .08); }
.mobile-link { display: block; padding: .8rem .9rem; border-radius: .7rem; color: #e2e8f0; font-weight: 500; }
.mobile-link:hover, .mobile-link.is-current { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------- Buttons ---------- */
.btn-amber, .btn-ghost {
    display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem;
    border-radius: .8rem; font-weight: 700; font-size: .95rem; transition: transform .2s, box-shadow .2s, background-color .2s;
}
.btn-amber { background: var(--amber); color: #0b0f19; box-shadow: 0 6px 24px -8px rgba(255, 196, 0, .6); }
.btn-amber:hover { transform: translateY(-2px); background: #ffd23d; box-shadow: 0 10px 28px -8px rgba(255, 196, 0, .75); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; transform: translateY(-2px); }

.footer-link { color: #cbd5e1; transition: color .2s; }
.footer-link:hover { color: var(--amber); }

/* ---------- Type helpers ---------- */
.eyebrow {
    font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--volt);
}
.text-amber { color: var(--amber); }
.text-volt { color: var(--volt); }
.bg-amber { background-color: var(--amber); }

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; overflow: hidden;
    background:
        radial-gradient(60rem 30rem at 85% 20%, rgba(77, 212, 255, .16), transparent 60%),
        radial-gradient(50rem 30rem at 0% 100%, rgba(255, 196, 0, .10), transparent 60%),
        linear-gradient(180deg, #060a12, #0b1424);
}
@media (min-width: 1024px) { .hero { height: 100vh; height: 100svh; } }
.circuit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.inner-hero {
    background:
        radial-gradient(40rem 18rem at 90% 0%, rgba(77, 212, 255, .14), transparent 60%),
        linear-gradient(180deg, #060a12, #0b1424);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.hero-vignette {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at 30% 50%, rgba(7, 11, 20, .78) 0%, rgba(7, 11, 20, .35) 55%, transparent 80%);
}

.chip {
    display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem;
    border-radius: 999px; font-size: .82rem; font-weight: 600; color: #e8f6ff;
    background: rgba(77, 212, 255, .1); border: 1px solid rgba(77, 212, 255, .35);
}

/* 3D photo deck */
.tilt-wrap { perspective: 1100px; }
.tilt {
    position: relative; transform-style: preserve-3d; transition: transform .25s ease-out;
    will-change: transform;
}
.tilt-card {
    border-radius: 1.25rem; overflow: hidden; background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .8), 0 0 0 1px rgba(77, 212, 255, .08);
}
.tilt-card img { display: block; width: 100%; height: auto; }
.float-badge {
    position: absolute; transform: translateZ(60px);
    background: rgba(13, 22, 38, .92); border: 1px solid rgba(255, 255, 255, .15);
    border-radius: .9rem; padding: .55rem .8rem; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .7);
    animation: bob 5s ease-in-out infinite;
}
.float-badge.b2 { animation-delay: -2.5s; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

.bolt-pulse { animation: boltpulse 2.4s ease-in-out infinite; }
@keyframes boltpulse { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 196, 0, 0)); } 50% { filter: drop-shadow(0 0 10px rgba(255, 196, 0, .9)); } }

/* ---------- Cards ---------- */
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .09); border-radius: 1rem;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(77, 212, 255, .45); box-shadow: 0 18px 40px -22px rgba(77, 212, 255, .5); }
.icon-tile {
    display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
    border-radius: .8rem; color: var(--amber); background: rgba(255, 196, 0, .1); border: 1px solid rgba(255, 196, 0, .3);
}

/* masonry */
.masonry { column-gap: 1rem; columns: 1; }
@media (min-width: 640px) { .masonry { columns: 2; } }
@media (min-width: 1024px) { .masonry { columns: 3; } }
.masonry > * { break-inside: avoid; margin-bottom: 1rem; }

.gallery-btn { display: block; width: 100%; border-radius: .9rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); background: var(--panel); }
.gallery-btn img { display: block; width: 100%; height: auto; transition: transform .35s; }
.gallery-btn:hover img { transform: scale(1.03); }

dialog.lightbox { background: transparent; border: 0; padding: 0; max-width: 96vw; max-height: 96vh; color: #fff; }
dialog.lightbox::backdrop { background: rgba(3, 6, 12, .9); }
dialog.lightbox img { max-width: 94vw; max-height: 86vh; width: auto; height: auto; border-radius: .8rem; }

/* portraits */
.portrait { border-radius: 1rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); background: var(--panel); }
.portrait img { display: block; width: 100%; height: auto; }

/* ---------- Forms ---------- */
.field label { display: block; font-size: .875rem; font-weight: 600; color: #e2e8f0; margin-bottom: .35rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: .7rem .85rem; border-radius: .7rem; font: inherit; color: #fff;
    background: #0a1222; border: 1.5px solid #3b4a63;
}
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #64748b; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.field [aria-invalid="true"] { border-color: #ff8a80; }
.field-error { margin-top: .3rem; font-size: .85rem; color: #ffb4ab; font-weight: 500; }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

.divider-bolt { height: 1px; background: linear-gradient(90deg, transparent, rgba(77, 212, 255, .5), transparent); }

.prose-history p { margin-bottom: .85rem; line-height: 1.7; color: #cbd5e1; }
.timeline { position: relative; padding-left: 1.4rem; border-left: 2px solid rgba(77, 212, 255, .3); }
.timeline-dot { position: absolute; left: -.52rem; top: .35rem; width: .8rem; height: .8rem; border-radius: 999px; background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 196, 0, .2); }

/* ---------- Hero highlights strip ---------- */
.strip-glow {
    position: absolute; left: 0; right: 0; top: -1px; height: 2px; overflow: hidden;
    background: linear-gradient(90deg, transparent, rgba(77, 212, 255, .55), rgba(255, 196, 0, .8), rgba(77, 212, 255, .55), transparent);
    background-size: 200% 100%; animation: stripflow 6s linear infinite;
}
@keyframes stripflow { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.stat-tile { position: relative; padding: .25rem .5rem; }
@media (min-width: 640px) {
    .stat-tile { justify-content: center; }
    .stat-tile + .stat-tile::before { content: ""; position: absolute; left: -.5rem; top: 15%; bottom: 15%; width: 1px; background: linear-gradient(180deg, transparent, rgba(255,255,255,.22), transparent); }
}
