/* =========================================================================
   Nicola Zandegiacomo — Portfolio
   Hand-crafted stylesheet. No external dependencies (privacy/GDPR-friendly).
   Theme-aware: respects prefers-color-scheme and an explicit [data-theme].
   ========================================================================= */

:root {
    /* Neutral scale (cool slate) */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Brand accent (blue -> violet) */
    --accent:        #2563eb;
    --accent-strong: #1d4ed8;
    --accent-2:      #7c3aed;
    --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);

    /* Semantic tokens — light theme defaults */
    --bg:          #ffffff;
    --bg-subtle:   var(--slate-50);
    --bg-elevated: #ffffff;
    --bg-inset:    var(--slate-100);
    --text:        var(--slate-900);
    --text-muted:  var(--slate-500);
    --text-faint:  var(--slate-400);
    --border:      var(--slate-200);
    --border-strong: var(--slate-300);
    --accent-fg:   var(--accent);
    --accent-soft: rgba(37, 99, 235, 0.10);
    --ring:        rgba(37, 99, 235, 0.35);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.10), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.22);
    --dot: rgba(15, 23, 42, 0.05);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Cascadia Code', Menlo, Consolas, monospace;

    --radius: 14px;
    --radius-sm: 9px;
    --maxw: 1140px;
    --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:          var(--slate-950);
        --bg-subtle:   #0b1120;
        --bg-elevated: var(--slate-900);
        --bg-inset:    #111c33;
        --text:        var(--slate-100);
        --text-muted:  var(--slate-400);
        --text-faint:  var(--slate-500);
        --border:      #1e2b45;
        --border-strong: #2b3b5c;
        --accent-fg:   #60a5fa;
        --accent-soft: rgba(96, 165, 250, 0.12);
        --ring:        rgba(96, 165, 250, 0.40);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.65);
        --dot: rgba(148, 163, 184, 0.08);
    }
}

/* Explicit dark theme (toggle) */
:root[data-theme="dark"] {
    --bg:          var(--slate-950);
    --bg-subtle:   #0b1120;
    --bg-elevated: var(--slate-900);
    --bg-inset:    #111c33;
    --text:        var(--slate-100);
    --text-muted:  var(--slate-400);
    --text-faint:  var(--slate-500);
    --border:      #1e2b45;
    --border-strong: #2b3b5c;
    --accent-fg:   #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.12);
    --ring:        rgba(96, 165, 250, 0.40);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.65);
    --dot: rgba(148, 163, 184, 0.08);
}

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { color: var(--accent-fg); text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent-fg); outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------------- Layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { position: relative; }

.section-pad { padding: 96px 0; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-fg);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.eyebrow::before {
    content: "";
    width: 26px; height: 1px;
    background: var(--accent-fg);
    opacity: 0.6;
}

.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 14px 0 12px;
    font-weight: 800;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* --------------------------------------------------------------- Header */
.header {
    position: sticky; top: 0; z-index: 200;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), background var(--transition);
}
.header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.navbar { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); font-size: 1.05rem; }
.brand .mark {
    width: 34px; height: 34px; border-radius: 9px;
    display: grid; place-items: center;
    background: var(--grad); color: #fff;
    font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.nav-menu { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-menu a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: color var(--transition); }
.nav-menu a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.icon-btn {
    width: 40px; height: 40px; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--bg-inset); color: var(--text-muted);
    border: 1px solid var(--border); cursor: pointer;
    transition: var(--transition);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.nav-toggle { display: none; }

/* --------------------------------------------------------------- Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 22px; border-radius: 11px;
    font-weight: 600; font-size: 0.96rem;
    border: 1px solid transparent; cursor: pointer;
    transition: var(--transition); white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px var(--ring); }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 12px 26px -8px var(--ring); }
.btn-ghost { background: var(--bg-elevated); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent-fg); color: var(--accent-fg); transform: translateY(-2px); }
.btn-block { width: 100%; justify-content: center; }

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    font-size: 0.82rem; font-weight: 500; color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.pill .dot.live { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(34,197,94,0.35);} 50%{ box-shadow: 0 0 0 5px rgba(34,197,94,0);} }

/* --------------------------------------------------------------- Hero */
.hero { padding: 88px 0 72px; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 78%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 78%);
}
.hero-inner { max-width: 820px; }
.hero h1 {
    font-size: clamp(2.05rem, 3.9vw, 3.2rem);
    line-height: 1.1; letter-spacing: -0.03em; font-weight: 800;
    margin: 20px 0 18px;
}
.hero .lede { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: var(--text-muted); max-width: 660px; margin-bottom: 30px; }
.hero .lede strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-social { display: flex; gap: 10px; }
.hero-social a {
    width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
    background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted);
    transition: var(--transition);
}
.hero-social a:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.hero-social svg { width: 20px; height: 20px; }

/* Stat strip */
.stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    margin-top: 56px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--border); overflow: hidden; box-shadow: var(--shadow-sm);
}
.stat { background: var(--bg-elevated); padding: 22px 20px; }
.stat .num { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .num .plus { color: var(--accent-fg); }
.stat .label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); letter-spacing: 0.02em; }

/* --------------------------------------------------------------- Services */
.services { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* centre a lone card on the last row of the 3-col grid (7 services) */
@media (min-width: 941px) { .svc-grid > .svc:last-child:nth-child(3n+1) { grid-column: 2; } }
.svc {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px 26px; transition: var(--transition);
}
.svc:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc .ico {
    width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    background: var(--accent-soft); color: var(--accent-fg); margin-bottom: 18px;
}
.svc .ico svg { width: 23px; height: 23px; }
.svc h3 { font-size: 1.16rem; font-weight: 700; margin-bottom: 9px; letter-spacing: -0.01em; }
.svc p { color: var(--text-muted); font-size: 0.96rem; }
.svc .svc-tags { margin-top: 14px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }

/* --------------------------------------------------------------- About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.about-body p { color: var(--text-muted); margin-bottom: 18px; font-size: 1.05rem; }
.about-body p strong { color: var(--text); font-weight: 600; }

.stack-card { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.stack-card h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 14px; }
.stack-card h4:not(:first-child) { margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font-size: 0.85rem; font-weight: 500; padding: 5px 12px; border-radius: 8px;
    background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
}
.chip.lang::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); margin-right: 7px; vertical-align: 1px; }

/* --------------------------------------------------------------- Projects */
.projects { background: var(--bg-subtle); border-top: 1px solid var(--border); }

.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 34px; }
.filter {
    font-family: var(--font-mono); font-size: 0.83rem; font-weight: 500;
    padding: 8px 15px; border-radius: 999px; cursor: pointer;
    background: var(--bg-elevated); color: var(--text-muted);
    border: 1px solid var(--border); transition: var(--transition);
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }


/* Project grid */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px 24px; display: flex; flex-direction: column;
    transition: var(--transition); position: relative;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card .cat { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-fg); font-weight: 600; }
.star-badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 600;
    color: var(--text-muted); font-variant-numeric: tabular-nums;
    padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-subtle);
    opacity: 0; transition: opacity var(--transition);
}
.star-badge.show { opacity: 1; }
.star-badge svg { width: 13px; height: 13px; color: #eab308; }
.card h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 9px; }
.card p { color: var(--text-muted); font-size: 0.95rem; flex-grow: 1; margin-bottom: 18px; }
.repo-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.repo-links a {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
    padding: 6px 11px; border-radius: 8px; color: var(--text);
    background: var(--bg-inset); border: 1px solid var(--border); transition: var(--transition);
}
.repo-links a:hover { border-color: var(--accent-fg); color: var(--accent-fg); }
.repo-links a svg { width: 12px; height: 12px; opacity: 0.6; }
.tech-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tech-row span { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); padding: 3px 8px; background: var(--bg-inset); border-radius: 6px; }

.card[hidden] { display: none; }

/* --------------------------------------------------------------- Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact-aside h2 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); letter-spacing: -0.02em; margin: 14px 0 14px; font-weight: 800; }
.contact-aside p { color: var(--text-muted); margin-bottom: 26px; }
.contact-methods { display: flex; flex-direction: column; gap: 12px; }
.cmethod {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elevated);
    color: var(--text); transition: var(--transition);
}
.cmethod:hover { border-color: var(--accent-fg); transform: translateX(3px); }
.cmethod .ci { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-fg); display: grid; place-items: center; flex-shrink: 0; }
.cmethod .ci svg { width: 19px; height: 19px; }
.cmethod .ct b { display: block; font-size: 0.95rem; }
.cmethod .ct span { font-size: 0.85rem; color: var(--text-muted); }

.form-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 7px; color: var(--text); font-family: var(--font-mono); letter-spacing: 0.02em; }
.field input, .field textarea {
    width: 100%; padding: 12px 14px; font: inherit; font-size: 0.95rem;
    background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); transition: var(--transition); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-fg); box-shadow: 0 0 0 3px var(--ring); background: var(--bg); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.form-note { font-size: 0.8rem; color: var(--text-faint); margin-top: 12px; text-align: center; }
.form-status { font-size: 0.9rem; margin-top: 12px; text-align: center; font-weight: 500; }
.form-status.ok { color: #16a34a; }
.form-status.err { color: #dc2626; }

/* --------------------------------------------------------------- Footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg-subtle); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { color: var(--text-muted); font-size: 0.9rem; }
.footer .flinks { display: flex; gap: 20px; }
.footer .flinks a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer .flinks a:hover { color: var(--accent-fg); }

/* --------------------------------------------------------------- Reveal */
/* Gated behind .js so content is fully visible when JavaScript is disabled. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 940px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .svc-grid, .proj-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .section-pad { padding: 68px 0; }
    .nav-menu { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 24px 20px;
        transform: translateY(-130%); transition: transform var(--transition); box-shadow: var(--shadow-lg); }
    .nav-menu.open { transform: none; }
    .nav-menu li { border-bottom: 1px solid var(--border); }
    .nav-menu a { display: block; padding: 14px 0; font-size: 1rem; }
    .nav-toggle { display: grid; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .svc-grid, .proj-grid { grid-template-columns: 1fr; }
    .hero-cta { width: 100%; }
    .hero-cta .btn { flex: 1; justify-content: center; }
}

@media (max-width: 420px) {
    body { font-size: 16px; }
    .container { padding: 0 18px; }
    .stats { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------- A11y */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

@media print {
    .header, .footer, .hero-cta, .filters, .form-card, .theme-toggle, .nav-toggle, .lang-switch { display: none !important; }
    body { background: #fff; color: #000; font-size: 12px; }
    .card, .svc, .sol { break-inside: avoid; box-shadow: none; }
}

/* ===================================================== Arte Cristallino additions */

/* Brand descriptor */
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text small { font-family: var(--font-mono); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-top: 3px; }

/* Language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--bg-inset); }
.lang-switch button { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; padding: 8px 11px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--accent); color: #fff; }

/* Solutions grid + product cards */
.sol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.sol { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: var(--transition); }
.sol:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
/* flagship system modules — accent top bar */
.sol-feature { position: relative; border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); }
.sol-feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); z-index: 3; }
.ph { aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative; overflow: hidden; color: var(--accent-fg);
    background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--bg-inset);
    border-bottom: 1px solid var(--border); }
.ph svg { width: 54px; height: 54px; opacity: 0.92; position: relative; }
/* icon-only cards: soft glow behind a larger, intentional icon */
.ph:not(.has-img)::before { content: ""; position: absolute; left: 50%; top: 50%; width: 116px; height: 116px;
    transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%); }
.ph::after { content: ""; position: absolute; right: 10px; bottom: 8px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); opacity: 0.75; }
.ph.has-img::after { content: "3d render"; padding: 2px 7px; border-radius: 6px; opacity: 0.92;
    background: color-mix(in srgb, var(--bg-elevated) 68%, transparent); backdrop-filter: blur(2px); }
.ph.has-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.sol-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex-grow: 1; }
.sol-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.sol-top h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: -0.01em; }
.sol-body p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 15px; flex-grow: 1; }
.tag-closed { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.58rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; white-space: nowrap; }

/* Company heading (h2 carries .section-head directly) */
.about-body h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }

/* Placeholder note: content the owner still needs to fill in */
.todo-note { color: var(--accent-fg); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; font-size: 0.92em; font-style: italic; }

@media (max-width: 720px) {
    .brand-text small { display: none; }
    .nav-right { gap: 9px; }
    .lang-switch button { padding: 7px 9px; }
    .sol-grid { grid-template-columns: 1fr; }
}

/* ===================================================== Drones / aerial robotics */

/* --- Hero: two-column with animated MQTT network visual --- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
.hero-grid .hero-inner { max-width: 640px; }

.hero-visual { position: relative; }

/* Standalone status dot (outside .pill) */
.nv-mode .dot, .ares-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.nv-mode .dot.live, .ares-live .dot.live { animation: pulse 2s infinite; }

/* Workshop automation network (hero visual) */
.netviz {
    position: relative; border: 1px solid var(--border-strong); border-radius: var(--radius);
    background-color: var(--bg-elevated);
    background-image: linear-gradient(var(--dot) 1px, transparent 1px), linear-gradient(90deg, var(--dot) 1px, transparent 1px);
    background-size: 26px 26px; box-shadow: var(--shadow-lg); overflow: hidden; padding: 14px;
}
.netviz::after { content: ""; position: absolute; inset: 8px; border: 1px dashed var(--border-strong); border-radius: 9px; opacity: 0.4; pointer-events: none; }
.nv-head { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1;
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 3px 6px 10px; }
.nv-id { color: var(--accent-fg); font-weight: 700; }
.nv-mode { display: inline-flex; align-items: center; gap: 7px; }
.nv-svg { display: block; width: 100%; height: auto; position: relative; z-index: 1; }

/* network SVG elements (theme-aware) */
.nv-orbit { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 2 9; opacity: 0.5; }
.nv-svg .link { fill: none; stroke: var(--accent-fg); stroke-width: 1.7; stroke-dasharray: 3 7; opacity: 0.6; animation: nvflow 1.1s linear infinite; }
.nodeC { fill: var(--accent-soft); stroke: var(--accent-fg); stroke-width: 1.5; }
.nodeI { stroke: var(--accent-fg); fill: none; }
.nodeT { fill: var(--text-muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }
.nv-hub rect { fill: var(--bg-elevated); stroke: var(--accent-fg); stroke-width: 1.8; }
.hub-ring { fill: none; stroke: var(--accent-fg); stroke-width: 1.4; opacity: 0.5; transform-box: fill-box; transform-origin: center; animation: nvpulse 2.6s ease-out infinite; }
.hub-t1 { fill: var(--text); font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: 0.03em; }
.hub-t2 { fill: var(--accent-fg); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; }
@keyframes nvflow { to { stroke-dashoffset: -20; } }
@keyframes nvpulse { 0% { transform: scale(0.82); opacity: 0.55; } 70% { opacity: 0; } 100% { transform: scale(1.28); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nv-svg .link { animation: none; } .hub-ring { animation: none; opacity: 0.4; } }

.nv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: relative; z-index: 1; padding: 12px 6px 4px; }
.nv-chip { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-fg); letter-spacing: 0.02em; }

/* --- Drones section --- */
.drones { position: relative; background: var(--bg); border-bottom: 1px solid var(--border); overflow: hidden; }
.drones::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 360px; z-index: 0;
    background: radial-gradient(ellipse 70% 100% at 50% 0, var(--accent-soft), transparent 70%); pointer-events: none; }
.drones .container { position: relative; z-index: 1; }

/* ARES feature (narrative + spec sheet) */
.ares { border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); box-shadow: var(--shadow-md); margin-bottom: 22px; }
.ares-main { padding: 32px 34px; }
.ares-badgerow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.ares-live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-fg); font-weight: 600; }
.ares-main > p { color: var(--text-muted); font-size: 1rem; max-width: 78ch; }
.ares-main > p strong { color: var(--text); font-weight: 600; }

.specsheet { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.spec { background: var(--bg-elevated); padding: 12px 15px; }
.spec dt { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 3px; }
.spec dd { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--text); }

/* Capability cards */
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cap-grid.cap-3 { grid-template-columns: repeat(3, 1fr); }
.cap { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px 20px; display: flex; flex-direction: column; transition: var(--transition); }
.cap:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.cap-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-fg); display: grid; place-items: center; margin-bottom: 15px; }
.cap-ico svg { width: 22px; height: 22px; }
.cap h3 { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.cap p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 14px; flex-grow: 1; }
.cap .tech-row { margin-top: auto; }

/* Flight-stack strip */
.stack-strip { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 15px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-subtle); }
.ss-label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-right: 4px; }
.ss-chip { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500; padding: 5px 11px; border-radius: 999px;
    background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); }

/* Highlighted (drone) service card */
.svc-feature { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); background: linear-gradient(180deg, var(--accent-soft), transparent 55%), var(--bg-elevated); }
.svc-feature .ico { background: var(--accent); color: #fff; }

/* Interactive 3D viewer (ARES) */
.ares-viewer { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elevated); box-shadow: var(--shadow-md); overflow: hidden; margin-bottom: 22px; }
.av-head { display: flex; align-items: baseline; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.av-id { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-fg); }
.av-title { font-weight: 600; font-size: 0.92rem; letter-spacing: -0.01em; }
.av-hint { margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); }
.av-stage { position: relative; background: var(--bg-inset); }
#aresC3d { display: block; width: 100%; height: min(56vh, 460px); touch-action: pan-y; cursor: grab; }
#aresC3d:active { cursor: grabbing; }
.av-hud { position: absolute; top: 12px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.av-hud span { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
#aresMode { color: var(--accent-fg); font-weight: 700; }
.av-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-top: 1px solid var(--border); }
.av-btn { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); background: var(--bg-inset); border: 1px solid var(--border-strong); padding: 9px 15px; border-radius: 9px; cursor: pointer; transition: var(--transition); }
.av-btn:hover { border-color: var(--accent-fg); color: var(--accent-fg); }
.av-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.av-lbl { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); white-space: nowrap; }
.ares-viewer input[type="range"] { flex: 1 1 160px; min-width: 130px; accent-color: var(--accent); }
.av-tiltval { font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; min-width: 10ch; text-align: right; color: var(--text); }
.av-chk { display: flex; gap: 7px; align-items: center; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); cursor: pointer; }
.av-chk input { accent-color: var(--accent); }
.av-zoom { display: inline-flex; gap: 6px; margin-left: auto; }
.av-zbtn { min-width: 36px; padding: 8px 0; text-align: center; font-size: 1.05rem; line-height: 1; }

@media (max-width: 940px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero-grid .hero-inner { max-width: 680px; }
    .hero-visual { max-width: 520px; }
    .specsheet { grid-template-columns: repeat(2, 1fr); }
    .cap-grid, .cap-grid.cap-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .cap-grid { grid-template-columns: 1fr; }
    .specsheet { grid-template-columns: 1fr; }
    .ares-main { padding: 26px 22px; }
    #aresC3d { height: min(48vh, 340px); }
    .av-hint { display: none; }
    .av-head { flex-wrap: wrap; }
}
