/* =========================================================
   JSP.Digital — Digital transformation studio
   Warm paper · serif display · signal orange · bilingual EN/HE
   ========================================================= */

:root {
    /* Palette · Paper */
    --paper:        #f4f1ea;
    --paper-2:      #ece7d9;
    --paper-3:      #e1dbcb;
    --line:         #d6cfbd;
    --line-2:       #c0b8a4;
    --ink:          #0d0c0a;
    --ink-2:        #28251f;
    --ink-3:        #6b6557;
    --ink-4:        #9b9482;

    /* Palette · Signal */
    --signal:       #e94e1b;
    --signal-2:     #c63f13;
    --signal-wash:  #fbe6dc;

    /* Dark (footer) */
    --dark:         #141210;
    --dark-2:       #1d1a16;
    --dark-line:    #2e2a24;
    --dark-ink:     #e8e1cf;
    --dark-ink-2:   #a9a291;

    /* Type (English default) */
    --serif:  'Instrument Serif', Georgia, serif;
    --mono:   'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --sans:   'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

    /* Type (Hebrew) */
    --serif-he: 'Noto Serif Hebrew', 'David Libre', Georgia, serif;
    --sans-he:  'Heebo', 'Rubik', -apple-system, Arial, sans-serif;

    /* Scale */
    --fs-xs: 11px;
    --fs-sm: 13px;
    --fs-md: 15px;
    --fs-lg: 18px;
    --fs-xl: clamp(1.5rem, 2.4vw, 2rem);
    --fs-2xl: clamp(2rem, 4vw, 3rem);
    --fs-hero: clamp(3rem, 8vw, 6.25rem);

    /* Layout */
    --wrap: 1280px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --nav-h: 72px;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--sans);
    font-size: var(--fs-md);
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    font-feature-settings: "ss01", "cv11", "tnum";
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--paper); }

/* ---------- language visibility ---------- */

html[lang="en"] .l-he,
html:not([lang="he"]) .l-he { display: none; }
html[lang="he"] .l-en { display: none; }

html[lang="he"] {
    direction: rtl;
    font-family: var(--sans-he);
}
html[lang="he"] body { font-family: var(--sans-he); }

/* Hebrew-only: swap display serif to a Hebrew-friendly face */
html[lang="he"] .hero-title,
html[lang="he"] .section-title,
html[lang="he"] .service-title,
html[lang="he"] .solution h3,
html[lang="he"] .pr-body h4,
html[lang="he"] .case-meta dd,
html[lang="he"] .contact-meta dd,
html[lang="he"] .metric-value,
html[lang="he"] .brand-name,
html[lang="he"] .foot-brand .brand-name,
html[lang="he"] .dl-head h4,
html[lang="he"] .contact-note {
    font-family: var(--serif-he);
    font-weight: 500;
    letter-spacing: 0;
}

/* ---------- a11y ---------- */

.visually-hidden, .skip:not(:focus) {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip:focus {
    position: fixed;
    top: 12px; inset-inline-start: 12px;
    width: auto; height: auto;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    border-radius: 2px;
    font: 500 var(--fs-sm) var(--sans);
    z-index: 1000;
}

/* ---------- atmosphere ---------- */

.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(to right, rgba(13,12,10,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(13,12,10,0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 85%);
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- layout primitives ---------- */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
    z-index: 2;
}

.section {
    padding: clamp(4rem, 9vw, 7.5rem) 0;
    position: relative;
}

.section-head {
    margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
    max-width: 820px;
}

.section-kicker {
    display: inline-block;
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.18em;
    color: var(--signal);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    padding-inline-end: 2.5rem;
}

html[lang="he"] .section-kicker {
    font-family: var(--sans-he);
    letter-spacing: 0.1em;
}

.section-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: var(--fs-2xl);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1rem;
}

.section-title em {
    font-style: italic;
    color: var(--signal);
}
html[lang="he"] .section-title em { font-style: normal; color: var(--signal); }

.section-lede {
    font-size: var(--fs-lg);
    line-height: 1.5;
    color: var(--ink-3);
    max-width: 56ch;
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.5rem;
    font: 500 var(--fs-sm) var(--sans);
    border: 1px solid transparent;
    border-radius: 2px;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease),
                color 0.2s var(--ease), border-color 0.2s var(--ease);
    white-space: nowrap;
    cursor: pointer;
}
html[lang="he"] .btn { font-family: var(--sans-he); font-weight: 600; }

.btn svg {
    width: 16px; height: 16px;
    transition: transform 0.25s var(--ease);
}
.btn:hover svg { transform: translateX(3px); }
html[lang="he"] .btn svg { transform: scaleX(-1); }
html[lang="he"] .btn:hover svg { transform: scaleX(-1) translateX(3px); }

.btn-primary {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.btn-primary:hover {
    background: var(--signal);
    border-color: var(--signal);
}

.btn-ghost {
    color: var(--ink);
    border-color: var(--line-2);
    background: transparent;
}
.btn-ghost:hover {
    border-color: var(--ink);
    background: var(--paper-2);
}

/* ---------- nav ---------- */

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    height: var(--nav-h);
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav.scrolled {
    border-bottom-color: var(--line);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
}

.nav-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
    flex-shrink: 0;
}

.brand-mark {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    color: var(--ink);
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-family: var(--serif);
    font-size: 1.375rem;
    letter-spacing: -0.01em;
}

.brand-sub {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--ink-3);
    margin-top: 4px;
}
html[lang="he"] .brand-sub {
    font-family: var(--sans-he);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    margin-inline-start: auto;
}

.nav-links a {
    font-size: var(--fs-sm);
    color: var(--ink-2);
    padding: 6px 0;
    position: relative;
    transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--signal); }
.nav-links a::after {
    content: "";
    position: absolute;
    inset-inline-start: 0; inset-inline-end: 100%;
    bottom: 0;
    height: 1px;
    background: var(--signal);
    transition: inset-inline-end 0.3s var(--ease);
}
.nav-links a:hover::after { inset-inline-end: 0; }

.nav-tail {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-inline-start: auto;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 6px 10px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--ink-3);
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-switch:hover {
    border-color: var(--ink);
    color: var(--ink);
}
.lang-switch .l-opt {
    padding: 0 2px;
    transition: color 0.2s var(--ease);
}
.lang-switch .l-sep { opacity: 0.4; }
html[lang="en"] .lang-switch .l-opt[data-lang="en"],
html[lang="he"] .lang-switch .l-opt[data-lang="he"] {
    color: var(--signal);
    font-weight: 700;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.875rem;
    font-size: var(--fs-sm);
    color: var(--paper);
    background: var(--ink);
    border-radius: 2px;
    transition: background 0.2s var(--ease);
}
.nav-cta:hover { background: var(--signal); }
.nav-cta svg { width: 14px; height: 14px; }
html[lang="he"] .nav-cta svg { transform: scaleX(-1); }
html[lang="he"] .nav-cta:hover svg { transform: scaleX(-1) translateX(3px); }

.nav-toggle {
    display: none;
    width: 40px; height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--ink);
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
    padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 5.5rem));
    padding-bottom: clamp(3rem, 6vw, 5rem);
    position: relative;
}

.rail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.18em;
    color: var(--ink-3);
}
html[lang="he"] .rail {
    font-family: var(--sans-he);
    letter-spacing: 0.06em;
    font-size: 12px;
}
.rail-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 25%, transparent);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 25%, transparent); }
    50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--signal) 8%, transparent); }
}

.hero-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: var(--fs-hero);
    line-height: 0.96;
    letter-spacing: -0.025em;
    color: var(--ink);
    max-width: 18ch;
    margin-bottom: 1.75rem;
}
html[lang="he"] .hero-title {
    font-family: var(--serif-he);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.01em;
}
.hero-title em {
    font-style: italic;
    color: var(--signal);
    position: relative;
}
html[lang="he"] .hero-title em { font-style: normal; }
.hero-title em::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: 0.08em;
    height: 0.08em;
    background: var(--signal);
    opacity: 0.2;
}

.hero-sub {
    font-size: var(--fs-lg);
    line-height: 1.55;
    color: var(--ink-3);
    max-width: 60ch;
    margin-bottom: 2.5rem;
}
html[lang="he"] .hero-sub { line-height: 1.7; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 5rem;
}

/* Wire diagram */
.wire {
    position: relative;
    padding: 1.25rem 1.5rem 1.5rem;
    border: 1px solid var(--line);
    background: var(--paper);
    overflow: hidden;
}

.wire-caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.15em;
    color: var(--signal);
    margin-bottom: 0.75rem;
}
html[lang="he"] .wire-caption { font-family: var(--sans-he); letter-spacing: 0.06em; font-size: 12px; }
.caption-meta { color: var(--ink-3); letter-spacing: 0.1em; }
html[lang="he"] .caption-meta { color: var(--ink-3); }

.wire-svg {
    width: 100%;
    height: auto;
    color: var(--ink-2);
    direction: ltr;
    font-family: var(--mono);
    font-size: 11px;
}

/* RTL: mirror the whole diagram so flow reads right-to-left,
   then counter-flip each text so it stays readable. */
html[lang="he"] .wire-svg {
    transform: scaleX(-1);
}
html[lang="he"] .wire-svg text {
    transform: scaleX(-1);
    transform-box: fill-box;
    transform-origin: center center;
}

.wire-axis line { stroke: var(--ink-4); stroke-width: 1; }
.wire-axis text {
    font-size: 10px;
    fill: var(--ink-3);
    letter-spacing: 0.08em;
}

.wire-node text { fill: var(--ink); }
.wire-node .node-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    fill: var(--signal);
}
.wire-node .node-title {
    font-family: 'Instrument Serif', serif;
    font-size: 24px;
    font-style: italic;
    fill: var(--ink);
}
.wire-node .node-sub {
    font-family: var(--mono);
    font-size: 11px;
    fill: var(--ink-3);
}
.wire-node .node-sub-mute { fill: var(--ink-4); font-style: italic; }

.wire-node-center rect:not(.node-strip) { stroke: var(--ink); stroke-width: 1.5; }
.wire-node-center .node-strip { fill: var(--signal); }
.wire-node-center .node-tag-invert {
    font-family: var(--mono);
    font-size: 10px;
    fill: var(--paper);
    letter-spacing: 0.18em;
}
.wire-node-center .node-title-signal { fill: var(--signal); }

.packet { fill: var(--signal); }
.packet-b { fill: var(--ink); }

/* ---------- services ---------- */

.services {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    border-inline-start: 1px solid var(--line);
}

.service {
    position: relative;
    padding: 2rem 1.75rem 2.25rem;
    border-inline-end: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    transition: background 0.25s var(--ease);
}
.service::before {
    content: "";
    position: absolute;
    inset-inline-start: 0; inset-inline-end: 0; top: 0;
    height: 2px;
    background: var(--signal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}
html[lang="he"] .service::before { transform-origin: right; }
.service:hover { background: var(--paper-2); }
.service:hover::before { transform: scaleX(1); }

.service-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.service-num {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.15em;
    color: var(--signal);
}
.service-ico {
    width: 28px; height: 28px;
    color: var(--ink-3);
}
.service-ico svg { width: 100%; height: 100%; }

.service-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.service-body {
    color: var(--ink-3);
    font-size: var(--fs-md);
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.service-specs {
    list-style: none;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-2);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--line);
}
.service-specs li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.service-specs li::before {
    content: "→";
    color: var(--signal);
}
html[lang="he"] .service-specs { font-family: var(--sans-he); font-size: 13px; }
html[lang="he"] .service-specs li::before { content: "←"; }

/* ---------- process ---------- */

.section-process { background: var(--paper-2); }

.process {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.pr-steps {
    list-style: none;
    border-inline-start: 1px solid var(--line-2);
}

.pr-step {
    position: relative;
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    gap: 1.25rem;
    border-bottom: 1px dashed var(--line);
}
.pr-step:last-child { border-bottom: none; }
.pr-step::before {
    content: "";
    position: absolute;
    inset-inline-start: -6px; top: 32px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--paper-2);
    border: 1.5px solid var(--ink);
}
.pr-step[data-step="2"]::before { background: var(--signal); border-color: var(--signal); }

.pr-num {
    font-family: var(--mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.15em;
    color: var(--signal);
    padding-top: 4px;
    flex-shrink: 0;
}

.pr-body { flex: 1; }
.pr-body h4 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.625rem;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 0.45rem;
    line-height: 1.1;
}
.pr-body p {
    font-size: var(--fs-md);
    color: var(--ink-3);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}
.pr-meta {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ink-2);
    padding: 3px 8px;
    background: var(--paper-3);
    border-radius: 2px;
}
html[lang="he"] .pr-meta { font-family: var(--sans-he); font-size: 12px; letter-spacing: 0; }

/* Deliverables panel */
.deliverables {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 16px 40px -24px rgba(13,12,10,0.18);
}

.dl-head {
    padding: 1.25rem 1.5rem;
    background: var(--ink);
    color: var(--paper);
}
.dl-kicker {
    display: block;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: color-mix(in srgb, var(--signal) 85%, white);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}
html[lang="he"] .dl-kicker { font-family: var(--sans-he); letter-spacing: 0.08em; font-size: 12px; }

.dl-head h4 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.75rem;
    letter-spacing: -0.01em;
    color: var(--paper);
}

.dl-list {
    list-style: none;
    counter-reset: dl;
}
.dl-list li {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px dashed var(--line);
    font-size: var(--fs-md);
    color: var(--ink-2);
    transition: background 0.2s var(--ease);
}
.dl-list li:last-child { border-bottom: none; }
.dl-list li:hover { background: var(--paper-2); }
.dl-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--signal);
    letter-spacing: 0.1em;
    flex-shrink: 0;
    min-width: 22px;
}

/* ---------- case study ---------- */

.case {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.65fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 2rem 0;
}

.case-meta {
    padding-inline-end: 1.5rem;
    border-inline-end: 1px solid var(--line);
}
.case-meta dl {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.case-meta div { display: flex; flex-direction: column; gap: 0.25rem; }
.case-meta dt {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-4);
    text-transform: uppercase;
}
html[lang="he"] .case-meta dt { font-family: var(--sans-he); letter-spacing: 0.08em; font-size: 12px; }
.case-meta dd {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--ink);
    line-height: 1.2;
}
.case-sub {
    display: block;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 2px;
}
html[lang="he"] .case-sub { font-family: var(--sans-he); }
.status-live {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--signal);
    text-transform: uppercase;
}
html[lang="he"] .status-live { font-family: var(--sans-he); font-size: 14px; letter-spacing: 0; }
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 20%, transparent);
    animation: pulse 1.8s ease-in-out infinite;
}

.case-body { display: flex; flex-direction: column; gap: 1.75rem; }

.case-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    background: var(--paper);
}
.metric {
    padding: 1.25rem;
    border-inline-end: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.metric:last-child { border-inline-end: none; }
.metric-value {
    font-family: var(--serif);
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.metric-sup {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--signal);
    font-style: normal;
    margin-inline-start: 2px;
    vertical-align: super;
}
.metric-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--ink-3);
    text-transform: uppercase;
}
html[lang="he"] .metric-label { font-family: var(--sans-he); letter-spacing: 0.04em; font-size: 12px; text-transform: none; }

.case-para {
    font-size: var(--fs-lg);
    color: var(--ink-2);
    line-height: 1.55;
    max-width: 64ch;
}
html[lang="he"] .case-para { line-height: 1.75; }

.case-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: var(--fs-md);
    color: var(--ink-2);
}
.case-highlights li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px dashed var(--line);
}
.case-highlights li:last-child { border-bottom: none; }
.hl-mark {
    font-family: var(--mono);
    color: var(--signal);
    font-weight: 700;
    flex-shrink: 0;
}

/* ---------- solutions ---------- */

.solutions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.solution {
    padding: 2rem 1.75rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.solution:hover {
    border-color: var(--ink);
    transform: translateY(-3px);
}

.solution header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.solution-tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--signal);
    text-transform: uppercase;
}
html[lang="he"] .solution-tag { font-family: var(--sans-he); letter-spacing: 0.08em; font-size: 12px; }

.solution h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.solution p {
    color: var(--ink-3);
    font-size: var(--fs-md);
    line-height: 1.5;
}

.solution ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-2);
    padding-top: 0.75rem;
    border-top: 1px dashed var(--line);
}
html[lang="he"] .solution ul { font-family: var(--sans-he); font-size: 13px; }
.solution ul li::before {
    content: "→ ";
    color: var(--signal);
}
html[lang="he"] .solution ul li::before { content: "← "; }

/* ---------- contact ---------- */

.section-contact { background: var(--paper-2); }

.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.contact-meta dl {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}
.contact-meta div { display: flex; flex-direction: column; gap: 0.25rem; }
.contact-meta dt {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-4);
    text-transform: uppercase;
}
html[lang="he"] .contact-meta dt { font-family: var(--sans-he); letter-spacing: 0.08em; font-size: 12px; }
.contact-meta dd {
    font-family: var(--serif);
    font-size: 1.35rem;
    color: var(--ink);
}
.contact-meta dd a { color: var(--ink); transition: color 0.2s var(--ease); }
.contact-meta dd a:hover { color: var(--signal); }

.contact-note {
    color: var(--ink-3);
    font-size: var(--fs-md);
    line-height: 1.55;
    font-style: italic;
    font-family: var(--serif);
}
html[lang="he"] .contact-note { font-family: var(--serif-he); font-style: normal; }

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    padding: 2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 2px;
}

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-full { grid-column: 1 / -1; }

.field label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-3);
    text-transform: uppercase;
}
html[lang="he"] .field label { font-family: var(--sans-he); letter-spacing: 0.04em; font-size: 12px; }

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.75rem 0;
    font-family: var(--sans);
    font-size: var(--fs-md);
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-2);
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s var(--ease);
}
html[lang="he"] .field input,
html[lang="he"] .field select,
html[lang="he"] .field textarea { font-family: var(--sans-he); }

.field textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-4); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--signal); }

.field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%236b6557' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-inline-end: 24px;
}
html[lang="he"] .field select {
    background-position: left 0 center;
    padding-inline-end: 0;
    padding-inline-start: 24px;
}

.btn-submit { grid-column: 1 / -1; justify-content: center; margin-top: 0.5rem; }

/* ---------- footer ---------- */

.foot {
    background: var(--ink);
    color: var(--dark-ink);
    padding: clamp(3rem, 6vw, 5rem) 0 2rem;
    position: relative;
    z-index: 2;
}

.foot-top {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
    gap: clamp(2rem, 6vw, 5rem);
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--dark-line);
}

.foot-brand .brand-name {
    font-family: var(--serif);
    font-size: 2rem;
    color: var(--paper);
    display: block;
    margin-bottom: 0.75rem;
}

.foot-brand p {
    color: var(--dark-ink-2);
    font-size: var(--fs-md);
    max-width: 40ch;
    line-height: 1.55;
}
html[lang="he"] .foot-brand p { line-height: 1.7; }

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.foot-cols h5 {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--signal);
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 500;
}
html[lang="he"] .foot-cols h5 { font-family: var(--sans-he); letter-spacing: 0.08em; font-size: 12px; }

.foot-cols a {
    display: block;
    color: var(--dark-ink);
    font-size: var(--fs-md);
    padding: 4px 0;
    transition: color 0.2s var(--ease);
}
.foot-cols a:hover { color: var(--signal); }

.foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dark-ink-2);
    letter-spacing: 0.08em;
}
html[lang="he"] .foot-bottom { font-family: var(--sans-he); letter-spacing: 0; font-size: 13px; }

.foot-legal { display: flex; align-items: center; gap: 0.75rem; }
.foot-legal a { color: inherit; transition: color 0.2s var(--ease); }
.foot-legal a:hover { color: var(--signal); }
.foot-legal span { opacity: 0.4; }

/* ---------- entrance animations ---------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .nav-toggle { display: flex; }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        padding: 1.5rem var(--gutter);
        background: var(--paper);
        border-bottom: 1px solid var(--line);
    }

    .process { grid-template-columns: 1fr; }
    .case { grid-template-columns: 1fr; padding: 1.5rem 0; }
    .case-meta {
        padding-inline-end: 0;
        padding-bottom: 1.5rem;
        border-inline-end: none;
        border-bottom: 1px solid var(--line);
    }
    .contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .hero-title { font-size: clamp(2.5rem, 11vw, 4.5rem); max-width: none; }
    .hero-sub { font-size: var(--fs-md); }
    .wire-svg { min-height: 280px; }
    .services { grid-template-columns: 1fr; }
    .contact-form { grid-template-columns: 1fr; padding: 1.5rem; }
    .foot-top { grid-template-columns: 1fr; }
    .foot-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .foot-bottom { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
    .metric { border-inline-end: none; border-bottom: 1px solid var(--line); }
    .metric:last-child { border-bottom: none; }
    .case-metrics { grid-template-columns: 1fr 1fr; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .packet { display: none; }
    .reveal { opacity: 1; transform: none; }
}

/* Pause animations when tab hidden */
body.is-hidden .packet,
body.is-hidden .status-dot,
body.is-hidden .rail-dot {
    animation-play-state: paused;
}
