/* ============================================================
   TOMMY WORKS — Precision Climate Engineering
   Ground-up redesign: dark-first, industrial-tech, animated.
   One stylesheet serves Hebrew (RTL) + English (LTR) + mobile.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --bg: #07080a;
    --bg-2: #0c0e11;
    --bg-3: #12151a;
    --panel: rgba(255, 255, 255, 0.03);
    --line: rgba(235, 240, 255, 0.09);
    --line-strong: rgba(235, 240, 255, 0.18);
    --text: #f2f4f8;
    --muted: #9aa3ad;
    --faint: #5f6771;
    --accent: #fff313;
    --accent-soft: rgba(255, 243, 19, 0.12);
    --accent-ink: #0a0a08;
    --cool: #58c7f3;
    --ok: #3ddc84;
    --bad: #ff5d5d;
    --glass: rgba(10, 12, 15, 0.72);
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    --r-sm: 10px;
    --r: 16px;
    --r-lg: 22px;
    --font-display: 'Rubik', 'Assistant', sans-serif;
    --font-body: 'Assistant', 'Rubik', sans-serif;
    --font-mono: 'JetBrains Mono', 'Assistant', monospace;
    --container: 1240px;
    --nav-h: 76px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg: #f5f5f1;
    --bg-2: #ffffff;
    --bg-3: #ecece7;
    --panel: rgba(12, 14, 18, 0.025);
    --line: rgba(12, 14, 18, 0.12);
    --line-strong: rgba(12, 14, 18, 0.25);
    --text: #101216;
    --muted: #545b64;
    --faint: #8a919b;
    --accent: #ffe70a;
    --accent-soft: rgba(255, 214, 0, 0.18);
    --accent-ink: #0a0a08;
    --glass: rgba(250, 250, 247, 0.8);
    --shadow: 0 24px 50px -28px rgba(15, 18, 24, 0.35);
    color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

body::before {
    /* film-grain noise overlay */
    content: "";
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    user-select: none;
}
.icon-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 4vw, 56px); }
.section { padding-block: clamp(70px, 10vw, 130px); position: relative; }
.section-tight { padding-block: clamp(48px, 7vw, 90px); }

.kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.kicker::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--accent);
    display: inline-block;
}
.h-display {
    font-size: clamp(40px, 6.5vw, 84px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
}
.h-section { font-size: clamp(30px, 4vw, 48px); font-weight: 700; }
.h-card { font-size: clamp(20px, 2vw, 24px); font-weight: 700; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 58ch; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.accent { color: var(--accent); }

.section-head { margin-bottom: clamp(36px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-head .lead { margin-top: 14px; }

/* ---------- Preloader ---------- */
#preloader {
    position: fixed; inset: 0; z-index: 200;
    background: var(--bg);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
#preloader.done { opacity: 0; visibility: hidden; }
#preloader .pl-logo { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 4vw, 40px); letter-spacing: -0.02em; }
#preloader .pl-logo em { font-style: normal; color: var(--accent); }
#preloader .pl-bar { width: min(220px, 50vw); height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
#preloader .pl-bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: pl-slide 0.9s var(--ease-out) infinite; }
@keyframes pl-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
[dir="rtl"] #preloader .pl-bar i { animation-name: pl-slide-rtl; }
@keyframes pl-slide-rtl { 0% { transform: translateX(120%); } 100% { transform: translateX(-320%); } }

/* ---------- Custom cursor ---------- */
#cursor-dot, #cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 190; pointer-events: none;
    border-radius: 50%;
    translate: -50% -50%;
    display: none;
}
@media (hover: hover) and (pointer: fine) {
    #cursor-dot, #cursor-ring { display: block; }
}
#cursor-dot { width: 6px; height: 6px; background: var(--accent); mix-blend-mode: difference; }
#cursor-ring {
    width: 34px; height: 34px;
    border: 1px solid var(--line-strong);
    transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s, background 0.25s;
}
#cursor-ring.is-hover { width: 56px; height: 56px; border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Navigation ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--nav-h);
    display: flex; align-items: center;
    transition: transform 0.45s var(--ease-out), background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    backdrop-filter: blur(18px) saturate(1.4);
    border-bottom-color: var(--line);
}
.nav.hidden-up { transform: translateY(-110%); }
.nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.brand .brand-mark {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--accent); color: var(--accent-ink);
    display: grid; place-items: center;
    box-shadow: 0 6px 18px -6px rgba(255, 243, 19, 0.5);
}
.brand .brand-mark .material-symbols-outlined { font-size: 24px; }
.brand em { font-style: normal; color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
    position: relative;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--text); background: var(--panel); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
    content: "";
    position: absolute; inset-inline: 16px; bottom: 3px;
    height: 2px; border-radius: 2px;
    background: var(--accent);
}

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch, .theme-toggle {
    display: inline-grid; place-items: center;
    min-width: 40px; height: 40px; padding-inline: 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
    transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.lang-switch:hover, .theme-toggle:hover { color: var(--text); border-color: var(--line-strong); background: var(--panel); }
.theme-toggle .material-symbols-outlined { font-size: 19px; }
.theme-toggle .sun { display: none; }
html[data-theme="light"] .theme-toggle .sun { display: block; }
html[data-theme="light"] .theme-toggle .moon { display: none; }

.burger {
    display: none;
    width: 42px; height: 42px;
    border: 1px solid var(--line); border-radius: 12px;
    place-items: center;
}
.burger .material-symbols-outlined { font-size: 22px; }

/* Mobile menu overlay */
#menu {
    position: fixed; inset: 0; z-index: 150;
    background: var(--glass);
    -webkit-backdrop-filter: blur(26px) saturate(1.4);
    backdrop-filter: blur(26px) saturate(1.4);
    display: flex; flex-direction: column; justify-content: center;
    padding: clamp(24px, 8vw, 64px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
#menu.open { opacity: 1; visibility: visible; }
#menu .menu-close { position: absolute; top: 20px; inset-inline-end: 20px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; }
#menu nav { display: flex; flex-direction: column; gap: 4px; }
#menu nav a {
    font-family: var(--font-display);
    font-size: clamp(30px, 8vw, 44px);
    font-weight: 800;
    padding: 10px 0;
    color: var(--text);
    display: flex; align-items: baseline; gap: 14px;
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
#menu.open nav a { opacity: 1; transform: none; }
#menu nav a:nth-child(2) { transition-delay: 0.05s; }
#menu nav a:nth-child(3) { transition-delay: 0.1s; }
#menu nav a:nth-child(4) { transition-delay: 0.15s; }
#menu nav a:nth-child(5) { transition-delay: 0.2s; }
#menu nav a .idx { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
#menu .menu-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 15px 28px;
    border-radius: 14px;
    font-family: var(--font-display);
    font-weight: 700; font-size: 15.5px;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
    will-change: transform;
}
.btn .material-symbols-outlined { font-size: 19px; transition: transform 0.3s var(--ease-out); }
.btn:hover .material-symbols-outlined.arrow { transform: translateX(4px); }
[dir="rtl"] .btn:hover .material-symbols-outlined.arrow { transform: translateX(-4px); }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(255, 243, 19, 0.45); }
.btn-primary:hover { box-shadow: 0 16px 40px -10px rgba(255, 243, 19, 0.55); }
.btn-primary::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
    transform: translateX(-120%);
}
.btn-primary:hover::after { animation: btn-shine 0.8s var(--ease-out); }
@keyframes btn-shine { to { transform: translateX(120%); } }

.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); background: var(--panel); }
.btn-ghost:hover { border-color: var(--text); background: var(--bg-3); }

.btn-danger {
    background: transparent; color: var(--accent);
    border: 1px solid rgba(255, 243, 19, 0.5);
}
.btn-danger:hover { background: var(--accent); color: var(--accent-ink); }
html[data-theme="light"] .btn-danger { color: #7a6a00; border-color: #c9b400; }
html[data-theme="light"] .btn-danger:hover { background: var(--accent); color: var(--accent-ink); }

.btn-whatsapp { background: #25d366; color: #fff; box-shadow: 0 10px 30px -10px rgba(37, 211, 102, 0.45); }
.btn-whatsapp:hover { background: #20bd5b; box-shadow: 0 16px 40px -10px rgba(37, 211, 102, 0.55); }
.wa-icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: 11px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: calc(var(--nav-h) + 30px);
    padding-bottom: 40px;
    overflow: hidden;
}
#fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::before {
    /* blueprint grid */
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black 0%, transparent 75%);
    opacity: 0.5;
}
.hero::after {
    /* legibility vignette */
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse 120% 90% at 50% 100%, var(--bg) 0%, transparent 55%);
}
.hero .container { position: relative; z-index: 5; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 26px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); animation: pulse-dot 2s infinite; }
.hero-badge .dot.off { background: var(--bad); animation: none; box-shadow: none; }
@keyframes pulse-dot { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

.hero h1 { max-width: 15ch; }
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 .wi { display: inline-block; will-change: transform; }
.hero h1 .hl { color: var(--accent); position: relative; }

.hero .lead { margin-top: 26px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* Telemetry HUD */
.hud {
    margin-top: clamp(44px, 6vw, 72px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.hud-cell { background: color-mix(in srgb, var(--bg-2) 78%, transparent); padding: 20px 22px; position: relative; transition: background 0.3s; }
.hud-cell:hover { background: color-mix(in srgb, var(--bg-3) 88%, transparent); }
.hud-label { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hud-label .material-symbols-outlined { font-size: 17px; color: var(--muted); }
.hud-value { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); margin-top: 8px; display: flex; align-items: baseline; gap: 5px; }
.hud-value small { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.hud-bar { height: 3px; border-radius: 3px; background: var(--line); margin-top: 14px; overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 0%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--cool)); transition: width 1.4s var(--ease-out); }
.hud-cell .hud-note { font-size: 12.5px; color: var(--faint); margin-top: 13px; font-family: var(--font-mono); }

.scroll-cue {
    position: absolute; bottom: 26px; inset-inline-start: 50%;
    translate: -50% 0; z-index: 5;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--faint); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
}
[dir="rtl"] .scroll-cue { translate: 50% 0; }
.scroll-cue .wheel { width: 22px; height: 34px; border: 1.5px solid var(--line-strong); border-radius: 12px; position: relative; }
.scroll-cue .wheel::after { content: ""; position: absolute; top: 6px; left: 50%; translate: -50% 0; width: 3px; height: 7px; border-radius: 3px; background: var(--accent); animation: wheel 1.8s var(--ease-out) infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
    position: relative;
    background: linear-gradient(160deg, var(--bg-2), var(--bg));
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(26px, 3vw, 38px);
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
    transform-style: preserve-3d;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card[data-tilt]::after {
    /* moving glare */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.07), transparent 45%);
    opacity: 0; transition: opacity 0.3s;
}
.card[data-tilt]:hover::after { opacity: 1; }

.card-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(255, 243, 19, 0.25);
    margin-bottom: 22px;
    transition: transform 0.4s var(--ease-out), background 0.3s, color 0.3s;
}
html[data-theme="light"] .card-icon { color: #6e6000; }
.card:hover .card-icon { transform: translateY(-4px) rotate(-4deg); background: var(--accent); color: var(--accent-ink); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card .card-num {
    position: absolute; top: 22px; inset-inline-end: 26px;
    font-family: var(--font-mono); font-size: 12px; color: var(--faint); letter-spacing: 0.15em;
}
.card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; font-weight: 700; font-size: 14.5px; color: var(--text); }
.card-link .material-symbols-outlined { font-size: 17px; color: var(--accent); transition: transform 0.3s var(--ease-out); }
.card-link:hover .material-symbols-outlined { transform: translateX(4px); }
[dir="rtl"] .card-link:hover .material-symbols-outlined { transform: translateX(-4px); }

/* ---------- Marquee ---------- */
.marquee-section { border-block: 1px solid var(--line); background: var(--bg-2); padding-block: 44px; }
.marquee {
    overflow: hidden;
    direction: ltr; /* keep track math stable under RTL */
    -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
    mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
    display: flex; align-items: center;
    width: max-content;
    animation: marquee 32s linear infinite;
    will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-item {
    flex-shrink: 0;
    height: 74px; width: 190px;
    margin-inline-end: 44px;
    display: flex; align-items: center; justify-content: center;
    padding: 14px 22px;
    background: #ffffff;
    border-radius: 14px;
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter 0.35s, opacity 0.35s, transform 0.35s var(--ease-out);
}
.marquee-item:hover { filter: none; opacity: 1; transform: translateY(-4px); }
.marquee-item img { max-height: 100%; max-width: 150px; object-fit: contain; }

/* ---------- Reviews ---------- */
.review-card { display: flex; flex-direction: column; justify-content: space-between; gap: 26px; }
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
html[data-theme="light"] .stars { color: #c7a500; }
.stars .material-symbols-outlined { font-size: 19px; }
.stars .empty { color: var(--faint); }
.review-quote { font-size: 16.5px; color: var(--text); font-style: italic; }
.review-quote::before { content: "“"; color: var(--accent); font-family: var(--font-display); font-size: 34px; line-height: 0; vertical-align: -12px; margin-inline-end: 4px; font-style: normal; }
[dir="rtl"] .review-quote::before { content: "”"; }
.review-who strong { font-family: var(--font-display); display: block; font-size: 16px; }
.review-who span { font-size: 13.5px; color: var(--muted); }
.review-who { display: flex; align-items: center; gap: 12px; }
.review-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent);
    border: 1px solid rgba(255, 243, 19, 0.3);
    font-family: var(--font-display); font-weight: 800; font-size: 15px;
}
html[data-theme="light"] .review-avatar { color: #6e6000; }

/* ---------- Forms ---------- */
.field { position: relative; display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    padding: 14px 16px;
    font: inherit; font-size: 15.5px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    appearance: none;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 21px) 55%, calc(100% - 16px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] .field select { background-position: 21px 55%, 16px 55%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-status { border-radius: 12px; padding: 14px 16px; font-size: 14.5px; display: none; align-items: center; gap: 10px; }
.form-status.ok { display: flex; background: rgba(61, 220, 132, 0.12); color: var(--ok); border: 1px solid rgba(61, 220, 132, 0.3); }
.form-status.err { display: flex; background: rgba(255, 93, 93, 0.1); color: var(--bad); border: 1px solid rgba(255, 93, 93, 0.3); }
html[data-theme="light"] .form-status.ok { color: #0d7a43; }
html[data-theme="light"] .form-status.err { color: #b52626; }

.star-select { display: inline-flex; gap: 4px; }
.star-select .material-symbols-outlined { font-size: 30px; cursor: pointer; color: var(--faint); transition: color 0.15s, transform 0.15s var(--ease-out); }
.star-select .material-symbols-outlined.on { color: var(--accent); font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
html[data-theme="light"] .star-select .material-symbols-outlined.on { color: #c7a500; }
.star-select .material-symbols-outlined:hover { transform: scale(1.18); }

/* ---------- CTA band ---------- */
.cta-band {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    background:
        radial-gradient(900px 340px at 15% -20%, var(--accent-soft), transparent 60%),
        linear-gradient(160deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    padding: clamp(40px, 6vw, 80px);
    text-align: center;
}
.cta-band::before {
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 0%, black, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 90% at 50% 0%, black, transparent 80%);
    opacity: 0.6;
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; max-width: 20ch; margin-inline: auto; }
.cta-band .lead { margin: 18px auto 34px; }
.cta-band .hero-ctas { justify-content: center; margin-top: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-top: clamp(50px, 7vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 50px; }
.footer h5 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin: 0 0 18px; }
.footer a, .footer p { color: var(--muted); font-size: 15px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.footer ul a { position: relative; transition: color 0.25s; }
.footer ul a:hover { color: var(--text); }
.footer ul a::after { content: ""; position: absolute; bottom: -3px; inset-inline-start: 0; width: 0; height: 1px; background: var(--accent); transition: width 0.3s var(--ease-out); }
.footer ul a:hover::after { width: 100%; }
.footer .brand { margin-bottom: 16px; }
.footer-phone { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--text) !important; direction: ltr; display: inline-block; }
.footer-phone:hover { color: var(--accent) !important; }
.footer-email { font-family: var(--font-mono); font-size: 14px; color: var(--muted); direction: ltr; display: inline-block; margin-top: 8px; }
.footer-email:hover { color: var(--accent); }
.footer-whatsapp { margin-top: 14px; }
.footer .btn-whatsapp { color: #fff; }
.footer .btn-whatsapp:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.footer-bottom p { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.footer-big {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(56px, 12vw, 170px);
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    text-align: center;
    user-select: none;
    pointer-events: none;
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
}

/* ---------- Emergency modal ---------- */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 160;
    background: rgba(4, 5, 7, 0.65);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: grid; place-items: center;
    padding: 18px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
    width: min(480px, 100%);
    background: linear-gradient(170deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    padding: clamp(24px, 4vw, 36px);
    position: relative;
    transform: translateY(26px) scale(0.97);
    transition: transform 0.4s var(--ease-out);
    box-shadow: var(--shadow);
}
.modal-backdrop.open .modal { transform: none; }
.modal-close { position: absolute; top: 16px; inset-inline-end: 16px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.modal-close:hover { color: var(--text); border-color: var(--line-strong); }
.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.modal-head .m-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; animation: m-pulse 1.6s infinite; }
@keyframes m-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 243, 19, 0.4); } 50% { box-shadow: 0 0 0 12px rgba(255, 243, 19, 0); } }
.modal h2 { font-size: 24px; }
.modal .modal-desc { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.modal-stats { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.modal-stats > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; font-family: var(--font-mono); font-size: 13px; }
.modal-stats > div + div { border-top: 1px solid var(--line); }
.modal-stats .k { color: var(--muted); }
.modal-stats .v { font-weight: 700; text-align: end; }
.modal-stats .v.on { color: var(--ok); display: inline-flex; align-items: center; gap: 7px; }
.modal-stats .v.off { color: var(--bad); display: inline-flex; align-items: center; gap: 7px; }
.modal-stats .v .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.modal-stats .v.on .dot { animation: pulse-dot 1.6s infinite; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: calc(var(--nav-h) + clamp(50px, 8vw, 90px)); padding-bottom: clamp(40px, 6vw, 70px); position: relative; overflow: hidden; }
.page-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 0%, black, transparent 70%);
    mask-image: radial-gradient(ellipse 80% 90% at 70% 0%, black, transparent 70%);
    opacity: 0.45;
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(36px, 5.5vw, 68px); font-weight: 800; }
.page-hero .lead { margin-top: 20px; }
.page-hero-split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.media-frame {
    position: relative; border-radius: var(--r-lg); overflow: hidden;
    border: 1px solid var(--line-strong);
    aspect-ratio: 4 / 3;
}
.media-frame img { position: absolute; inset-inline-start: 0; top: -15%; width: 100%; height: 130%; object-fit: cover; will-change: transform; }
.media-frame .media-tag {
    position: absolute; bottom: 14px; inset-inline-start: 14px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 14px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text);
}

/* ---------- Emergency banner (services) ---------- */
.emergency-banner {
    position: relative;
    border-radius: var(--r-lg);
    background: var(--accent);
    color: var(--accent-ink);
    padding: clamp(28px, 4vw, 46px);
    display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
    overflow: hidden;
    box-shadow: 0 30px 70px -30px rgba(255, 243, 19, 0.35);
}
.emergency-banner::before {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(-45deg, rgba(0,0,0,0.05) 0 16px, transparent 16px 32px);
    pointer-events: none;
}
.emergency-banner > * { position: relative; }
.emergency-banner .eb-icon { width: 68px; height: 68px; border-radius: 18px; background: var(--accent-ink); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.emergency-banner .eb-icon .material-symbols-outlined { font-size: 36px; }
.emergency-banner h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.emergency-banner p { max-width: 62ch; font-size: 15.5px; margin-top: 8px; color: rgba(10, 10, 8, 0.75); }
.emergency-banner ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 14px 0 0; font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; }
.emergency-banner ul li { display: flex; align-items: center; gap: 8px; }
.emergency-banner ul li::before { content: ""; width: 8px; height: 8px; background: var(--accent-ink); border-radius: 2px; }
.emergency-banner .btn { background: var(--accent-ink); color: var(--accent); }
.emergency-banner .btn:hover { transform: translateY(-2px); }

/* ---------- Pricing table ---------- */
.pricing-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.pricing-scroll { overflow-x: auto; }
table.pricing { width: 100%; border-collapse: collapse; min-width: 640px; }
table.pricing th {
    text-align: start;
    font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--faint);
    padding: 16px 22px;
    background: var(--bg-3);
    border-bottom: 1px solid var(--line);
}
table.pricing td { padding: 20px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 15px; color: var(--muted); transition: background 0.25s, color 0.25s; }
table.pricing tr:last-child td { border-bottom: 0; }
table.pricing td:first-child { color: var(--text); font-weight: 600; }
table.pricing tbody tr { transition: background 0.25s; }
table.pricing tbody tr:hover td { background: var(--accent-soft); }
table.pricing .mono-cell { font-family: var(--font-mono); font-size: 13px; }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px); }
.filter-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted);
    transition: all 0.3s var(--ease-out);
}
.filter-btn:hover { border-color: var(--line-strong); color: var(--text); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -8px rgba(255, 243, 19, 0.5); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.g-item {
    position: relative;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transform-style: preserve-3d;
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out), filter 0.7s; }
.g-item:hover img { transform: scale(1.06); }
.g-item .g-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(4, 5, 7, 0.92) 0%, rgba(4, 5, 7, 0.25) 55%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 22px;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}
.g-item:hover .g-overlay { opacity: 1; }
.g-overlay .g-cat { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.g-overlay h3 { color: #fff; font-size: 20px; margin-bottom: 5px; }
.g-overlay p { color: rgba(255, 255, 255, 0.75); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-overlay .g-zoom { position: absolute; top: 16px; inset-inline-end: 16px; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; transform: scale(0.6); opacity: 0; transition: all 0.35s var(--ease-out) 0.05s; }
.g-item:hover .g-zoom { transform: none; opacity: 1; }

/* Lightbox */
#lightbox {
    position: fixed; inset: 0; z-index: 170;
    background: rgba(3, 4, 6, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    display: grid; place-items: center;
    padding: clamp(16px, 4vw, 48px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
#lightbox.open { opacity: 1; visibility: visible; }
#lightbox figure { margin: 0; max-width: min(1000px, 100%); transform: scale(0.94); transition: transform 0.4s var(--ease-out); }
#lightbox.open figure { transform: none; }
#lightbox img { width: 100%; max-height: 74vh; object-fit: contain; border-radius: var(--r); }
#lightbox figcaption { text-align: center; margin-top: 16px; }
#lightbox figcaption .g-cat { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
#lightbox figcaption h3 { color: #fff; font-size: 21px; margin: 6px 0 4px; }
#lightbox figcaption p { color: rgba(255, 255, 255, 0.7); font-size: 14px; max-width: 60ch; margin-inline: auto; }
#lightbox .lb-close { position: absolute; top: 22px; inset-inline-end: 22px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; display: grid; place-items: center; transition: background 0.25s, transform 0.25s var(--ease-out); }
#lightbox .lb-close:hover { background: var(--accent); color: var(--accent-ink); transform: rotate(90deg); }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact-info-card { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 0; }
.info-row { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .i-icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(255, 243, 19, 0.2); }
html[data-theme="light"] .info-row .i-icon { color: #6e6000; }
.info-row h4 { font-size: 15px; margin-bottom: 3px; }
.info-row p, .info-row a { color: var(--muted); font-size: 14.5px; }
.info-row a.big { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--text); direction: ltr; display: inline-block; }
.info-row a.big:hover { color: var(--accent); }
.info-row .btn-whatsapp { margin-top: 12px; color: #fff; }
.info-row .btn-whatsapp:hover { color: #fff; }
.hours-table { width: 100%; font-family: var(--font-mono); font-size: 13px; border-spacing: 0; }
.hours-table td { padding: 4px 0; color: var(--muted); }
.hours-table td:last-child { text-align: end; color: var(--text); }

/* ---------- Reveal (JS-gated so no-JS users see everything) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(34px); }
html.js [data-reveal="left"] { transform: translateX(-40px); }
html.js [data-reveal="right"] { transform: translateX(40px); }
html.js [data-reveal].revealed { opacity: 1; transform: none; }
html.js.gsap-done [data-reveal] { opacity: 1; transform: none; }

/* ---------- Utility ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hud { grid-template-columns: repeat(2, 1fr); }
    /* An odd trailing cell would sit alone and leave the row half empty, exposing
       the container background as a blank panel — stretch it across instead. */
    .hud-cell:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .page-hero-split { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .contact-info-card { position: static; }
}
@media (max-width: 860px) {
    .nav-links { display: none; }
    .burger { display: grid; }
    .nav-actions .btn-nav-cta { display: none; }
}
.emergency-fab {
    position: fixed;
    bottom: 16px;
    inset-inline-end: 16px;
    z-index: 120;
    border-radius: 999px;
    padding: 15px 22px;
    box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.55), 0 8px 24px -6px rgba(255, 243, 19, 0.45);
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .brand { font-size: 18px; }
    .brand .brand-mark { width: 34px; height: 34px; }
    .brand .brand-mark .material-symbols-outlined { font-size: 21px; }
    .nav-actions { gap: 8px; }
    .hud { grid-template-columns: 1fr; }
    .grid-3, .grid-2, .gallery-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-ctas .btn { flex: 1 1 100%; }
    .scroll-cue { display: none; }
    .marquee-item { height: 58px; width: 150px; margin-inline-end: 28px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
    html.js [data-reveal] { opacity: 1; transform: none; }
    .marquee-track { animation: none; }
    #cursor-dot, #cursor-ring { display: none !important; }
}
