/* ==========================================================================
   MudimbaSoftware front page
   Palette derived from the logo: coral, pink and indigo on deep plum.
   ========================================================================== */

:root {
    --bg: #fbf8f7;
    --bg-alt: #f4eff5;
    --surface: #ffffff;
    --surface-2: #f7f2f8;
    --text: #1f1030;
    --muted: #5e5472;
    --line: rgba(31, 16, 48, 0.1);
    --line-strong: rgba(31, 16, 48, 0.18);

    --coral: #f2542d;
    --coral-ink: #c43d1a;
    --pink: #ff9fb8;
    --indigo: #4652a8;
    --indigo-ink: #3b4696;
    --success: #1e8a55;
    --danger: #c42b2b;

    --grad: linear-gradient(100deg, var(--coral) 0%, #f0708f 50%, var(--indigo) 100%);
    --shadow: 0 1px 2px rgba(31, 16, 48, 0.05), 0 12px 32px -12px rgba(31, 16, 48, 0.18);
    --shadow-lg: 0 30px 60px -20px rgba(31, 16, 48, 0.3);

    --radius: 18px;
    --radius-sm: 12px;
    --header-h: 72px;

    --font-display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #110a1c;
        --bg-alt: #170f25;
        --surface: #1c132c;
        --surface-2: #241a37;
        --text: #f5f0fa;
        --muted: #b6abc8;
        --line: rgba(255, 255, 255, 0.09);
        --line-strong: rgba(255, 255, 255, 0.18);
        --coral: #ff6a45;
        --coral-ink: #ff8a6b;
        --pink: #ffb3c6;
        --indigo: #7f8cf0;
        --indigo-ink: #a3adff;
        --success: #4cd08c;
        --danger: #ff7a7a;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
        --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #110a1c;
    --bg-alt: #170f25;
    --surface: #1c132c;
    --surface-2: #241a37;
    --text: #f5f0fa;
    --muted: #b6abc8;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --coral: #ff6a45;
    --coral-ink: #ff8a6b;
    --pink: #ffb3c6;
    --indigo: #7f8cf0;
    --indigo-ink: #a3adff;
    --success: #4cd08c;
    --danger: #ff7a7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.65 var(--font-body);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 100;
    background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
    text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

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

.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font: 600 0.8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--coral-ink); margin-bottom: 16px;
}
.kicker::before { content: ""; width: 18px; height: 2px; background: var(--grad); border-radius: 2px; }

/* ---------- Buttons ---------- */

.btn {
    --btn-bg: var(--surface);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
    font: 600 0.975rem/1 var(--font-body); text-decoration: none; cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, opacity 0.2s;
}
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn[disabled]:hover .icon { transform: none; }

.btn-primary {
    background: var(--grad); background-size: 150% 100%; background-position: 0 0;
    color: #fff; box-shadow: 0 10px 24px -10px var(--coral);
}
.btn-primary:not([disabled]):hover { background-position: 100% 0; box-shadow: 0 14px 30px -10px var(--coral); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--text); }

.btn-sm { padding: 10px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

.icon-btn {
    width: 42px; height: 42px; display: inline-grid; place-items: center;
    border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text);
    cursor: pointer; transition: border-color 0.2s, transform 0.2s;
}
.icon-btn:hover { border-color: var(--line-strong); transform: rotate(-12deg); }

.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-sun { display: none; }
    :root:not([data-theme="light"]) .icon-moon { display: block; }
}

/* ---------- Header ---------- */

.scroll-progress {
    position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
    background: var(--grad); transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
}

.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    display: flex; align-items: center;
    transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.site-header.is-scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    box-shadow: 0 1px 0 var(--line);
}

.header-inner { display: flex; align-items: center; gap: 24px; }

.brand {
    display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
    font: 600 1.15rem/1 var(--font-display); letter-spacing: -0.02em;
}
.brand b { font-weight: 600; color: var(--muted); }
.brand-mark { width: 38px; height: auto; transition: transform 0.4s var(--ease); }
.brand:hover .brand-mark { transform: skewX(-8deg); }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
    position: relative; padding: 8px 14px; border-radius: 999px;
    text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted);
    transition: color 0.2s, background-color 0.2s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a.is-active { color: var(--text); }
.site-nav a.is-active::after {
    content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px;
    border-radius: 50%; background: var(--coral); transform: translateX(-50%);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn span { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu-btn:hover { transform: none; }

/* ---------- Hero ---------- */

.hero {
    position: relative; overflow: hidden;
    margin-top: calc(var(--header-h) * -1);
    padding: calc(var(--header-h) + 72px) 0 96px;
    min-height: min(100vh, 900px); display: flex; align-items: center;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid-lines {
    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;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5;
    transform: translate3d(calc(var(--px, 0) * var(--depth)), calc(var(--py, 0) * var(--depth)), 0);
    transition: transform 0.6s var(--ease);
}
.orb-coral  { --depth: 40px; width: 420px; height: 420px; background: var(--coral);  top: -80px; right: 8%; }
.orb-indigo { --depth: -30px; width: 480px; height: 480px; background: var(--indigo); bottom: -180px; left: -120px; }
.orb-pink   { --depth: 24px; width: 300px; height: 300px; background: var(--pink);   top: 40%; right: 30%; opacity: 0.35; }

.hero-inner {
    position: relative; display: grid; gap: 56px; align-items: center;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 14px 7px 12px; border-radius: 999px; margin-bottom: 24px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
    font: 500 0.85rem/1 var(--font-mono); color: var(--muted);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 700; letter-spacing: -0.035em; margin-bottom: 24px; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 34em; margin-bottom: 36px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; }

.terminal {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: #150d24; color: #e9e2f3; border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-lg);
    transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
    transition: transform 0.6s var(--ease);
}
.hero-visual:hover .terminal { transform: perspective(1200px) rotateY(0) rotateX(0); }
.terminal::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(242, 84, 45, 0.18), transparent 40%, rgba(70, 82, 168, 0.25));
}
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar em { margin-left: 10px; font: 400 0.8rem/1 var(--font-mono); font-style: normal; color: #8f84a3; }

.terminal-body {
    position: relative; margin: 0; padding: 22px 22px 26px; min-height: 250px;
    font: 400 0.9rem/1.9 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.t-line { display: block; min-height: 1.9em; }
.t-cmd::before  { content: "$ "; color: var(--pink); }
.t-ok::before   { content: "✓ "; color: #4cd08c; }
.t-done         { color: #ffb3c6; font-weight: 500; }
.t-done::before { content: "→ "; color: #ff8a6b; }
.t-line.is-typing::after {
    content: ""; display: inline-block; width: 0.55em; height: 1.1em; margin-left: 2px;
    vertical-align: -0.18em; background: #ffb3c6; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.float-chip {
    position: absolute; display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 14px;
    background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow);
    font-weight: 600; font-size: 0.85rem; white-space: nowrap;
    animation: float 6s ease-in-out infinite;
}
.float-chip .icon { color: var(--coral); }
.chip-a { top: -18px; right: 8%; }
.chip-b { bottom: -20px; left: 8%; animation-delay: -2s; }
.chip-c { bottom: -20px; right: 8%; animation-delay: -4s; }
.chip-c .icon { color: var(--indigo); }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Marquee ---------- */

.marquee {
    overflow: hidden; border-block: 1px solid var(--line); background: var(--surface);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; }
.marquee li {
    display: flex; align-items: center; gap: 28px; padding: 20px 0 20px 28px;
    font: 500 1rem/1 var(--font-display); color: var(--muted); white-space: nowrap;
}
.marquee li::after { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--grad); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */

.section { padding: clamp(80px, 11vw, 136px) 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2, .contact-intro h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 1.1rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px 72px; align-items: end; }
.statement { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 600; line-height: 1.25; }
.about-body { color: var(--muted); font-size: 1.08rem; }
.values { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.value-card {
    padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.value-card .icon { width: 30px; height: 30px; color: var(--coral); margin-bottom: 18px; }
.value-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.value-card p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* Spotlight hover used by service and plan cards */
.spot { position: relative; isolation: isolate; }
.spot::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--coral) 14%, transparent), transparent 60%);
    transition: opacity 0.3s;
}
.spot:hover::before { opacity: 1; }

/* Services */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
    display: flex; flex-direction: column; padding: 32px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
.service-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.span-2 { grid-column: span 2; }
.service-icon {
    width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 24px;
    border-radius: 14px; color: #fff; background: var(--grad);
    box-shadow: 0 10px 20px -10px var(--coral);
}
.service-icon .icon { width: 26px; height: 26px; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.service-card p { color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags li {
    padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
    font: 500 0.78rem/1.2 var(--font-mono); color: var(--muted);
}

/* Process */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.timeline::before {
    content: ""; position: absolute; top: 26px; left: 26px; right: 26px; height: 2px;
    background: linear-gradient(90deg, var(--coral), var(--pink), var(--indigo));
    opacity: 0.5;
}
.timeline li { position: relative; }
.step {
    position: relative; display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px;
    border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong);
    font: 600 0.95rem/1 var(--font-mono); color: var(--coral-ink);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}
.timeline li:hover .step { background: var(--coral); border-color: var(--coral); color: #fff; transform: scale(1.08); }
.timeline h3 { font-size: 1.15rem; margin-bottom: 8px; }
.timeline p { color: var(--muted); font-size: 0.97rem; }

/* Pricing estimator */
.estimator { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.plans { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.plan {
    display: flex; flex-direction: column; gap: 6px; padding: 26px; cursor: pointer;
    border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line);
    transition: border-color 0.25s, box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
    user-select: none;
}
/* An odd last card fills the row instead of sitting alone. */
.plan:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; }
.plan:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.plan-input { position: absolute; opacity: 0; pointer-events: none; }
.plan:has(.plan-input:focus-visible) { outline: 2px solid var(--coral); outline-offset: 3px; }
.plan.is-selected, .plan:has(.plan-input:checked) {
    border-color: var(--coral);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 15%, transparent), var(--shadow);
}
.plan.is-featured { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border-color: transparent; }

.plan-check {
    position: absolute; top: 22px; right: 22px; width: 26px; height: 26px;
    display: grid; place-items: center; border-radius: 8px;
    border: 1.5px solid var(--line-strong); color: transparent;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.3s var(--ease);
}
.plan-check .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.plan.is-selected .plan-check, .plan:has(.plan-input:checked) .plan-check {
    background: var(--coral); border-color: var(--coral); color: #fff; transform: scale(1.08);
}
.badge {
    align-self: flex-start; margin-bottom: 6px; padding: 4px 10px; border-radius: 999px;
    background: var(--grad); color: #fff; font: 600 0.72rem/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.plan-name { font: 600 1.15rem/1.3 var(--font-display); padding-right: 36px; }
.plan-price { font: 700 1.6rem/1.2 var(--font-display); letter-spacing: -0.02em; margin-bottom: 12px; }
.plan-price small { font: 500 0.8rem/1 var(--font-body); color: var(--muted); letter-spacing: 0; }
.plan-features li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
.plan-features .icon { width: 17px; height: 17px; color: var(--success); margin-top: 1px; }

.summary {
    position: sticky; top: calc(var(--header-h) + 20px);
    padding: 28px; border-radius: var(--radius);
    background: #170e27; color: #f5f0fa; box-shadow: var(--shadow-lg); overflow: hidden;
}
.summary::before {
    content: ""; position: absolute; width: 260px; height: 260px; right: -110px; top: -110px;
    border-radius: 50%; background: var(--coral); filter: blur(70px); opacity: 0.45; pointer-events: none;
}
.summary > * { position: relative; }
.summary-label { font: 500 0.8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: #b6abc8; margin-bottom: 12px; }
.summary-total { font: 700 2.6rem/1 var(--font-display); letter-spacing: -0.03em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.summary-quote { color: #ffb3c6; font-size: 0.9rem; margin-bottom: 8px; }
.summary-list { margin: 18px 0 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 0.93rem; animation: slide-in 0.35s var(--ease); }
.summary-list li span:last-child { color: #b6abc8; white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-empty { color: #8f84a3; }
.summary-note { margin: 14px 0 0; font-size: 0.8rem; color: #8f84a3; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-8px); } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
.contact-intro > p:not(.kicker) { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; }
.contact-card {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 14px;
    border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
    text-decoration: none; font-weight: 600; overflow-wrap: anywhere;
    transition: transform 0.3s var(--ease), border-color 0.2s, box-shadow 0.3s;
}
.contact-card:hover { transform: translateX(4px); border-color: var(--coral); box-shadow: var(--shadow); }
.contact-card small { display: block; font: 500 0.75rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.contact-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--surface-2); color: var(--coral); }

.contact-form {
    padding: clamp(24px, 4vw, 40px); border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; margin-bottom: 16px; }
.field input, .field textarea {
    width: 100%; padding: 24px 16px 10px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--text);
    font: 400 1rem/1.5 var(--font-body); resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field textarea { min-height: 160px; }
.field label {
    position: absolute; left: 17px; top: 17px; color: var(--muted); pointer-events: none;
    transform-origin: 0 0; transition: transform 0.2s var(--ease), color 0.2s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--coral); background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 15%, transparent);
}
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label {
    transform: translateY(-10px) scale(0.78); color: var(--coral-ink);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--danger); }

.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form-status { margin: 0; font-size: 0.95rem; font-weight: 500; flex: 1; min-width: 200px; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }
.contact-form.is-sending button[type="submit"] { opacity: 0.7; pointer-events: none; }
.contact-form.is-sending button[type="submit"] .icon { animation: nudge 0.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }

/* ---------- Articles page ---------- */

.page-hero {
    position: relative; overflow: hidden;
    margin-top: calc(var(--header-h) * -1);
    padding: calc(var(--header-h) + 64px) 0 56px;
}
.page-hero .orb-coral { width: 360px; height: 360px; top: -140px; }
.page-hero .orb-indigo { width: 380px; height: 380px; bottom: -260px; }
.page-hero-inner { position: relative; max-width: 860px; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 700; letter-spacing: -0.035em; margin-bottom: 20px; }
.page-hero .lead { margin-bottom: 32px; }

.topic-tabs {
    display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin-bottom: 18px;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.topic-tab {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
    text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--muted);
    transition: color 0.2s, background-color 0.2s;
}
.topic-tab .icon { width: 18px; height: 18px; }
.topic-tab:hover { color: var(--text); background: var(--surface-2); }
.topic-tab.is-active { color: #fff; background: var(--grad); box-shadow: 0 8px 20px -10px var(--coral); }

.news-search {
    display: flex; align-items: center; gap: 10px; max-width: 560px; padding: 6px 6px 6px 18px;
    border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-strong);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.news-search:focus-within { border-color: var(--coral); box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 15%, transparent); }
.news-search > .icon { color: var(--muted); }
.news-search input[type="search"] {
    flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text);
    font: 400 1rem/1.4 var(--font-body); padding: 8px 0;
}
.news-search input[type="search"]:focus { outline: none; }

.news-section { padding-top: 32px; }
.news-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
    padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--line);
}
.news-count { margin: 0; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.news-count strong { color: var(--text); font-family: var(--font-display); }
.clear-link { color: var(--coral-ink); font-weight: 600; }
.news-updated { display: inline-flex; align-items: center; gap: 6px; font: 400 0.85rem/1 var(--font-mono); }
.news-updated .icon { width: 15px; height: 15px; }

.source-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
    text-decoration: none; font-size: 0.88rem; font-weight: 500; color: var(--muted);
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip.is-active { color: var(--bg); background: var(--text); border-color: var(--text); }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
    display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s var(--ease);
}
.news-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.news-card.is-extra { display: none; }

.news-media { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: var(--surface-2); }
.news-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.news-card:hover .news-media img { transform: scale(1.04); }
.news-media-fallback {
    display: grid; place-items: center; padding: 20px; color: #fff;
    background: linear-gradient(135deg, var(--coral), var(--indigo));
}
.news-media-fallback::before {
    content: ""; position: absolute; inset: 0; opacity: 0.25;
    background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
    background-size: 28px 28px;
}
.news-media-fallback.variant-1 { background: linear-gradient(135deg, var(--indigo), #1f1030); }
.news-media-fallback.variant-2 { background: linear-gradient(135deg, #f0708f, var(--coral)); }
.news-media-fallback.variant-3 { background: linear-gradient(135deg, #1f1030, var(--coral)); }
.news-media-fallback span {
    position: relative; font: 500 1.05rem/1.2 var(--font-mono); letter-spacing: -0.01em;
    text-align: center; overflow-wrap: anywhere; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.news-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 20px; }
.news-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 0.85rem; color: var(--muted); }
.source-badge {
    padding: 4px 10px; border-radius: 999px; font: 600 0.72rem/1.3 var(--font-mono);
    letter-spacing: 0.04em; text-transform: uppercase;
}
.source-devto { background: color-mix(in srgb, var(--indigo) 14%, transparent); color: var(--indigo-ink); }
.source-hn { background: color-mix(in srgb, var(--coral) 14%, transparent); color: var(--coral-ink); }

.news-title { font-size: 1.15rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.news-title a { text-decoration: none; }
/* Makes the whole card clickable while keeping a single real link. */
.news-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.news-card:hover .news-title a { color: var(--coral-ink); }
.news-card:has(.news-title a:focus-visible) { outline: 2px solid var(--coral); outline-offset: 3px; }
.news-title a:focus-visible { outline: none; }
.news-excerpt { color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.news-card .tags { margin: 0 0 16px; }

.news-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto;
    padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted);
}
.news-byline { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-stats { display: flex; align-items: center; gap: 12px; flex: none; }
.news-stats > * { display: inline-flex; align-items: center; gap: 4px; }
.news-stats .icon { width: 15px; height: 15px; }
.news-comments { position: relative; z-index: 2; text-decoration: none; border-radius: 6px; }
.news-comments:hover { color: var(--coral-ink); }

.news-card.is-featured { grid-column: span 2; flex-direction: row; }
.news-card.is-featured .news-media { flex: 0 0 52%; aspect-ratio: auto; min-height: 300px; }
.news-card.is-featured .news-body { padding: 32px; }
.news-card.is-featured .news-title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }

.news-more { display: flex; justify-content: center; margin-top: 40px; }
.news-more [hidden] { display: none; }

.news-empty {
    display: grid; justify-items: center; gap: 6px; text-align: center; padding: 72px 24px;
    border-radius: var(--radius); border: 1.5px dashed var(--line-strong);
}
.news-empty > .icon { width: 44px; height: 44px; color: var(--coral); margin-bottom: 10px; }
.news-empty h2 { font-size: 1.4rem; }
.news-empty p { color: var(--muted); margin-bottom: 14px; }

.news-attribution { margin: 48px 0 0; text-align: center; font-size: 0.85rem; color: var(--muted); }
.news-attribution a { color: var(--text); }

.news-cta { padding: 72px 0; }
.news-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.news-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.news-cta p:not(.kicker) { color: var(--muted); margin: 0; }

@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-card.is-featured { grid-column: auto; flex-direction: column; }
    .news-card.is-featured .news-media { flex: none; aspect-ratio: 2 / 1; min-height: 0; }
    .news-card.is-featured .news-body { padding: 22px 24px 20px; }
    .topic-tabs { display: flex; border-radius: var(--radius-sm); }
    .topic-tab { flex: 1 1 auto; justify-content: center; padding: 10px 12px; }
}

/* ---------- Footer ---------- */

.site-footer { background: #140c22; color: #d8cfe6; padding-top: 72px; }
.site-footer a { color: #d8cfe6; text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: #fff; }

.newsletter {
    display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
    padding: 36px; border-radius: var(--radius); margin-bottom: 64px;
    background: linear-gradient(120deg, rgba(242, 84, 45, 0.16), rgba(70, 82, 168, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.newsletter h2 { color: #fff; font-size: 1.6rem; margin-bottom: 8px; }
.newsletter p { margin: 0; color: #b6abc8; }
.newsletter-form {
    display: flex; gap: 6px; padding: 6px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
}
.newsletter-form:focus-within { border-color: #ff8a6b; }
.newsletter-form input {
    flex: 1; min-width: 0; padding: 0 18px; border: 0; background: transparent; color: #fff;
    font: 400 1rem/1 var(--font-body);
}
.newsletter-form input::placeholder { color: #8f84a3; }
.newsletter-form input:focus { outline: none; }
.notice { margin: 12px 0 0 18px !important; font-weight: 500; }
.notice-success { color: #4cd08c !important; }
.notice-error { color: #ff8a8a !important; }

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 48px; }
.footer-brand { color: #fff !important; margin-bottom: 12px; }
.footer-brand b { color: #b6abc8; }
.footer-grid p { color: #8f84a3; }
.footer-grid h3 { font-size: 0.8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: #8f84a3; margin-bottom: 16px; font-weight: 500; }
.footer-grid li { padding: 5px 0; overflow-wrap: anywhere; }

.footer-bottom {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 24px 0 32px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.9rem; color: #8f84a3;
}
.footer-bottom p { margin: 0; }

/* ---------- Scroll reveal (only hides content when JS is running) ---------- */

/* Uses `translate` (not `transform`) so hover transforms keep working; the
   script removes the reveal classes once the entrance has finished. */
.js .reveal {
    opacity: 0; translate: 0 24px;
    transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
    transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; translate: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 72px; }
    .hero-visual { max-width: 560px; }
    .terminal { transform: none; }
    .estimator { grid-template-columns: 1fr; }
    .summary { position: relative; top: 0; }
    .timeline { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
    .timeline::before { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .menu-btn { display: inline-flex; }
    .header-cta { display: none; }
    .site-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
        padding: 12px 20px 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
    }
    .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
    .site-nav a { padding: 14px 8px; font-size: 1.05rem; border-radius: 10px; }
    .site-nav a.is-active::after { left: auto; right: 12px; top: 50%; transform: translateY(-50%); }
    .header-actions { margin-left: auto; }

    .about-grid, .contact-grid, .newsletter { grid-template-columns: 1fr; }
    .about-grid { gap: 24px; }
    .values { grid-template-columns: 1fr; margin-top: 16px; }
    .bento { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .plans { grid-template-columns: 1fr; }
    .contact-grid { gap: 40px; }
}

@media (max-width: 560px) {
    .hero { padding-top: calc(var(--header-h) + 40px); min-height: 0; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .timeline { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .float-chip { font-size: 0.78rem; padding: 8px 12px; }
    .terminal-body { font-size: 0.8rem; min-height: 220px; }
    .newsletter { padding: 24px; }
    .newsletter-form { flex-direction: column; border-radius: var(--radius-sm); }
    .newsletter-form input { padding: 12px; }
    .brand span { font-size: 1rem; }
}

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