/* ==========================================================================
   Efisia — home page sections and product mockups.
   ========================================================================== */

.accent-efisia { --accent: var(--violet); --accent-glow: var(--violet-glow); }
.accent-lara { --accent: var(--cyan); --accent-glow: var(--cyan-glow); }
.accent-cargo { --accent: var(--amber); --accent-glow: var(--amber-glow); }

/* ---------- Sections ---------- */

.section {
    position: relative;
    padding: 112px 0;
    /* Rotating decorations grow their bounding box; clip (unlike hidden) keeps sticky/scroll behaviour intact. */
    overflow-x: clip;
}

.section-alt {
    background:
        radial-gradient(900px 400px at 100% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
        var(--bg-alt);
    border-block: 1px solid var(--border);
}

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }

.section-head h2 {
    font-size: clamp(2rem, 4.2vw, 3.1rem);
}

.section-lead {
    font-size: 1.12rem;
    color: var(--text-muted);
    margin: 0;
}

.sub-title { font-size: 1.2rem; margin: 0 0 14px; }
.sub-title--center { text-align: center; margin-bottom: 36px; }

.split {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 56px;
    align-items: center;
}

.split--project { grid-template-columns: 1fr 1fr; gap: 72px; }

/* Grid items default to min-width:auto; long code lines must not widen the column. */
.split > *, .hero-inner > *, .team-vision > * { min-width: 0; }
.split--reverse .mockup-stage { order: -1; }

.how { margin-top: 96px; }

@media (max-width: 980px) {
    .section { padding: 84px 0; }
    .split, .split--project { grid-template-columns: 1fr; gap: 48px; }
    .split--reverse .mockup-stage { order: 0; }
    .how { margin-top: 72px; }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: calc(var(--header-h) * -1);
    padding-top: calc(var(--header-h) + 56px);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: drift 18s ease-in-out infinite alternate;
}

.blob-1 { width: 520px; height: 520px; top: -120px; left: -140px; background: var(--violet); }
.blob-2 { width: 460px; height: 460px; top: 10%; right: -160px; background: var(--cyan); animation-delay: -6s; }
.blob-3 { width: 380px; height: 380px; bottom: -160px; left: 35%; background: var(--pink); opacity: 0.32; animation-delay: -12s; }

:root[data-theme="dark"] .blob { opacity: 0.32; }
:root[data-theme="dark"] .blob-3 { opacity: 0.22; }

.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}

.hero-inner {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    padding-bottom: 72px;
}

.hero-title {
    font-size: clamp(2.5rem, 5.4vw, 4.3rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

.hero-title .text-gradient { display: inline-block; }

.hero-lead {
    max-width: 580px;
    font-size: 1.15rem;
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0 40px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-stats li { display: flex; flex-direction: column; }

.hero-stats strong {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1.1;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-stats span { font-size: 0.88rem; color: var(--text-muted); }

/* Stagger the hero copy. */
.hero-copy > :nth-child(2) { --reveal-delay: 0.08s; }
.hero-copy > :nth-child(3) { --reveal-delay: 0.16s; }
.hero-copy > :nth-child(4) { --reveal-delay: 0.24s; }
.hero-copy > :nth-child(5) { --reveal-delay: 0.32s; }
.hero-visual { --reveal-delay: 0.2s; }

.hero-visual {
    position: relative;
    padding: 28px 16px;
}

.code-window {
    position: relative;
    border-radius: 18px;
    background: var(--code-bg);
    color: #e6edf3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 30px 80px -30px rgba(15, 23, 42, 0.55),
        0 0 0 1px rgba(124, 58, 237, 0.15),
        0 0 60px -20px var(--violet-glow);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    transition: transform 0.4s var(--ease);
    overflow: hidden;
}

.file-name { color: #8b949e; font-size: 0.8rem; }

.code {
    padding: 18px 20px;
    overflow-x: auto;
    line-height: 1.75;
}

.ln {
    white-space: pre;
    opacity: 0;
    animation: type-in 0.45s var(--ease) forwards;
    animation-delay: calc(var(--i) * 0.16s + 0.5s);
}

.ln .k { color: #c084fc; }
.ln .t { color: #67e8f9; }
.ln .s { color: #fda4af; }
.ln .m { color: #fde68a; }
.ln .c { color: #7d8590; font-style: italic; }

.caret {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    margin-left: 4px;
    vertical-align: -0.2em;
    background: #22d3ee;
    box-shadow: 0 0 10px #22d3ee;
    animation: blink 1s steps(1) infinite;
}

.terminal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.78rem;
    color: #e6edf3;
    opacity: 0;
    animation: type-in 0.5s var(--ease) 2.3s forwards;
}

.terminal .ok { display: inline-grid; color: #4ade80; }
.terminal .muted { color: #8b949e; }

.float-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-md);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.85rem;
    animation: float 6s ease-in-out infinite;
}

.chip-1 { top: 0; left: 0; color: var(--violet); }
.chip-2 { top: 34%; right: -6px; color: var(--cyan); animation-delay: -1.5s; }
.chip-3 { bottom: 18%; left: -10px; color: var(--pink); animation-delay: -3s; }
.chip-4 { bottom: 0; right: 16%; animation-delay: -4.5s; }
.chip-4 .icon { color: var(--amber); }
.chip-5 { top: -4px; right: 18%; padding: 9px; color: var(--green); animation-delay: -2.2s; }

@media (max-width: 980px) {
    .hero { min-height: 0; }
    .hero-inner { grid-template-columns: 1fr; gap: 24px; padding-bottom: 56px; }
    .hero-visual { max-width: 600px; }
}

@media (max-width: 520px) {
    .hero-visual { padding: 20px 4px; }
    .code-window { font-size: 0.72rem; }
    .chip-3, .chip-5 { display: none; }
    .hero-cta .fx-btn { flex: 1 1 100%; }
}

/* ---------- Tech marquee ---------- */

.marquee {
    position: relative;
    padding: 18px 0;
    border-block: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 42s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-list {
    display: flex;
    gap: 48px;
    margin: 0;
    padding: 0 48px 0 0;
    list-style: none;
}

.marquee-list li {
    display: inline-flex;
    align-items: center;
    gap: 48px;
    white-space: nowrap;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.marquee-list li::after {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    transform: rotate(45deg);
    background: var(--gradient);
}

/* ---------- Team vision ---------- */

.team-vision {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 40px;
    align-items: center;
    margin-top: 24px;
}

.team-vision h3 { font-size: 1.45rem; }
.team-vision p { color: var(--text-muted); }

.principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.principles li {
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    transition: transform 0.3s var(--ease), border-color 0.3s;
}

.principles li:hover { transform: translateY(-4px); border-color: var(--accent); }
.principles .icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 12px; }
.principles strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.principles span { font-size: 0.92rem; color: var(--text-muted); }

@media (max-width: 980px) {
    .team-vision { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
    .principles { grid-template-columns: 1fr; }
    .panel { padding: 22px; }
}

/* ---------- Project cards ---------- */

.project-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 330px;
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    transition: box-shadow 0.35s var(--ease), border-color 0.35s, opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.project-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0.2);
    opacity: 0.6;
    transition: transform 0.5s var(--ease), opacity 0.5s;
}

.project-card:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
    box-shadow: 0 24px 60px -24px var(--accent-glow), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}

.project-card:hover::after { transform: scaleX(1); opacity: 1; }

.project-cards .project-card:nth-child(2) { --reveal-delay: 0.1s; }
.project-cards .project-card:nth-child(3) { --reveal-delay: 0.2s; }

.project-mark {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 28px;
    border-radius: 20px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    box-shadow: 0 0 30px -10px var(--accent-glow);
    transition: transform 0.5s var(--ease);
}

.project-card:hover .project-mark { transform: rotate(-8deg) scale(1.08); }
.project-mark .icon { width: 30px; height: 30px; }
.project-mark .efisia-logo { width: 36px; height: 36px; }

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.project-card h3 { font-size: 1.75rem; margin: 6px 0 10px; }
.project-card p { flex: 1; color: var(--text-muted); }

.card-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--accent);
}

.card-more .icon { transition: transform 0.3s var(--ease); }
.project-card:hover .card-more .icon { transform: translateX(5px); }

@media (max-width: 980px) {
    .project-cards { grid-template-columns: 1fr; }
    .project-card { min-height: 0; }
}

/* ---------- Efisia ---------- */

.emblem {
    position: relative;
    width: min(100%, 360px);
    aspect-ratio: 1;
    margin-inline: auto;
}

.orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed var(--border-strong);
    animation: spin 26s linear infinite;
}

.orbit i {
    position: absolute;
    top: -6px;
    left: calc(50% - 6px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--violet);
    box-shadow: 0 0 16px 2px var(--violet-glow);
}

.orbit-2 { inset: 14%; animation-duration: 17s; animation-direction: reverse; }
.orbit-2 i { background: var(--cyan); box-shadow: 0 0 16px 2px var(--cyan-glow); }
.orbit-3 { inset: 28%; animation-duration: 11s; border-style: solid; border-color: var(--border); }
.orbit-3 i { background: var(--pink); box-shadow: 0 0 16px 2px var(--pink-glow); }

.emblem-logo {
    position: absolute;
    inset: 36%;
    width: 28%;
    height: 28%;
    filter: drop-shadow(0 0 22px var(--violet-glow));
    animation: float 6s ease-in-out infinite;
}

.values {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 64px 0 0;
    padding: 0;
    list-style: none;
}

.values h3 { font-size: 1.15rem; margin-bottom: 6px; }
.values p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.values li:nth-child(2) { --reveal-delay: 0.08s; }
.values li:nth-child(3) { --reveal-delay: 0.16s; }
.values li:nth-child(4) { --reveal-delay: 0.24s; }

.team-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.team-card {
    position: relative;
    display: flex;
    gap: 24px;
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.35s var(--ease), border-color 0.35s, opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.team-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-glow); }
.team-cards .team-card:nth-child(2) { --reveal-delay: 0.12s; --accent: var(--cyan); --accent-glow: var(--cyan-glow); }

.avatar {
    position: relative;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
}

.avatar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--violet), var(--cyan), var(--pink), var(--violet));
    animation: spin 8s linear infinite;
}

.avatar span {
    position: relative;
    display: grid;
    place-items: center;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    background: var(--surface);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: -0.04em;
    color: var(--accent);
}

.team-body h3 { font-size: 1.45rem; margin: 0 0 4px; }

.team-role {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    margin-bottom: 14px;
}

.team-body p:not(.team-role) { color: var(--text-muted); }

@media (max-width: 980px) {
    .values { grid-template-columns: repeat(2, 1fr); }
    .team-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .values { grid-template-columns: 1fr; }
    .team-card { flex-direction: column; padding: 24px; }
}

/* ---------- Mockups (shared) ---------- */

.project-copy .section-head { margin-bottom: 32px; }
.project-copy .kicker .icon { width: 15px; height: 15px; }

.why-card { margin-bottom: 28px; }
.why-card p { margin: 0; color: var(--text-muted); }

.mockup-stage {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    padding: 24px 0;
}

.glow-ring {
    position: absolute;
    inset: 8%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 65%);
    filter: blur(30px);
    animation: breathe 5s ease-in-out infinite;
}

/* ---------- LARA mockup ---------- */

.app-window {
    width: min(100%, 460px);
    border-radius: 22px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    box-shadow: var(--shadow-md), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent), 0 30px 80px -30px var(--accent-glow);
    overflow: hidden;
    transition: transform 0.4s var(--ease);
}

.app-window .window-bar { border-bottom-color: var(--border); }

.app-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
}

.lara-avatar {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #06b6d4, #7c3aed);
    box-shadow: 0 0 16px -2px var(--cyan-glow);
}

.lara-avatar .icon { width: 16px; height: 16px; }

.app-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.app-status .live-dot { width: 7px; height: 7px; }

.chat {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px 12px;
}

.bubble {
    max-width: 88%;
    margin: 0;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bubble--user {
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    color: #fff;
    background: linear-gradient(135deg, #0891b2, #7c3aed);
}

.bubble--bot {
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border: 1px solid var(--border);
    background: var(--surface-2);
}

.bubble--bot p { margin: 12px 0 0; }

.mini-chart {
    padding: 12px 14px 26px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.mini-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.trend {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--green);
}

.bars {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 84px;
    margin-top: 8px;
}

.bars span {
    position: relative;
    flex: 1;
    height: var(--h);
    border-radius: 8px 8px 4px 4px;
    background: color-mix(in srgb, var(--accent) 30%, transparent);
    transform-origin: bottom;
}

.bars span.is-peak {
    background: linear-gradient(to top, #0891b2, #22d3ee);
    box-shadow: 0 0 18px -2px var(--cyan-glow);
}

.is-visible .bars span { animation: grow 1s var(--ease) both; }
.is-visible .bars span:nth-child(2) { animation-delay: 0.15s; }
.is-visible .bars span:nth-child(3) { animation-delay: 0.3s; }

.bars b {
    position: absolute;
    bottom: -22px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--text-muted);
}

.chat-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.typing {
    display: inline-flex;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    align-self: flex-start;
}

.typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: bounce 1.2s infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

.chat-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 16px 16px;
    padding: 8px 8px 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.88rem;
}

.send {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #0891b2, #7c3aed);
}

.send .icon { width: 16px; height: 16px; }

/* ---------- Steps ---------- */

.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 26px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    counter-increment: step;
    transition: border-color 0.35s, box-shadow 0.35s var(--ease), opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.step:hover { border-color: var(--accent); box-shadow: 0 16px 40px -20px var(--accent-glow); }

.step::after {
    content: "0" counter(step);
    position: absolute;
    top: 18px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.steps .step:nth-child(2) { --reveal-delay: 0.1s; }
.steps .step:nth-child(3) { --reveal-delay: 0.2s; }
.steps .step:nth-child(4) { --reveal-delay: 0.3s; }

.step-icon {
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 6%, transparent);
}

.step-icon .icon { width: 22px; height: 22px; }
.step strong { display: block; margin: 16px 0 6px; font-family: var(--font-display); font-size: 1.12rem; }
.step span:last-child { display: block; font-size: 0.93rem; color: var(--text-muted); }

/* Animated pipeline line with a travelling "parcel". */
.steps--pipeline { margin-top: 64px; }

.steps--pipeline::before {
    content: "";
    position: absolute;
    top: -26px;
    left: 4%;
    right: 4%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 18px);
    opacity: 0.5;
}

.steps--pipeline::after {
    content: "";
    position: absolute;
    top: -32px;
    left: 4%;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--accent);
    box-shadow: 0 0 18px 2px var(--accent-glow);
    animation: travel 6s ease-in-out infinite;
}

@media (max-width: 980px) {
    .steps { grid-template-columns: repeat(2, 1fr); }
    .steps--pipeline { margin-top: 0; }
    .steps--pipeline::before, .steps--pipeline::after { display: none; }
}

@media (max-width: 560px) {
    .steps { grid-template-columns: 1fr; }
}

/* ---------- CargoFlow ---------- */

.carl-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
}

.carl-card p { margin: 0; color: var(--text-muted); }

.carl-avatar {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #db2777);
    box-shadow: 0 0 24px -4px var(--amber-glow);
}

.carl-avatar .icon { width: 26px; height: 26px; }
.carl-avatar--sm { width: 30px; height: 30px; border-radius: 10px; }
.carl-avatar--sm .icon { width: 16px; height: 16px; }

.phone {
    position: relative;
    width: min(100%, 310px);
    padding: 12px;
    border-radius: 46px;
    background: #0b0f1c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 0 2px #1d2338,
        var(--shadow-md),
        0 40px 90px -30px var(--amber-glow);
    transition: transform 0.4s var(--ease);
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    z-index: 2;
    width: 96px;
    height: 24px;
    transform: translateX(-50%);
    border-radius: 0 0 16px 16px;
    background: #0b0f1c;
}

.phone-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 38px 14px 18px;
    border-radius: 36px;
    background: linear-gradient(180deg, #121830, #0d1122);
    color: #e8ecff;
}

.phone-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
}

.scan-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    white-space: nowrap;
}

.scan-chip .icon { width: 12px; height: 12px; animation: blink 1.2s steps(2) infinite; }

.photo {
    position: relative;
    aspect-ratio: 4 / 3.4;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.35) 62%),
        linear-gradient(160deg, #3a4466, #1b2138 70%);
}

.scene, .crate, .pallet, .detect, .scanline { position: absolute; }
.scene { inset: 0; }

.crate {
    border-radius: 4px;
    background: linear-gradient(160deg, #d9a66b, #a8743f);
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12), 0 6px 14px rgba(0, 0, 0, 0.35);
}

.crate-1 { left: 22%; bottom: 34%; width: 32%; height: 31%; }
.crate-2 { left: 52%; bottom: 34%; width: 27%; height: 24%; background: linear-gradient(160deg, #cf9a5f, #9c6a37); }

.tape {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 44%;
    width: 12%;
    background: rgba(240, 205, 150, 0.7);
}

.sticker {
    position: absolute;
    top: 18%;
    right: 8%;
    width: 28%;
    height: 24%;
    border-radius: 2px;
    background: repeating-linear-gradient(180deg, #fff 0 3px, #cfd6e4 3px 4px);
}

.pallet {
    left: 16%;
    right: 16%;
    bottom: 25%;
    height: 9%;
    background: repeating-linear-gradient(90deg, #8b6b45 0 16%, #4c3a26 16% 22%);
    border-radius: 2px;
}

.detect {
    border: 2px solid #fbbf24;
    border-radius: 6px;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.55), inset 0 0 14px rgba(251, 191, 36, 0.18);
    opacity: 0;
    animation: detect 5s ease-in-out infinite;
}

.detect b {
    position: absolute;
    top: -20px;
    left: -2px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #fbbf24;
    color: #111;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
}

.detect-1 { left: 20%; bottom: 32.5%; width: 36%; height: 34.5%; animation-delay: 0.6s; }
.detect-2 { left: 50.5%; bottom: 32.5%; width: 30.5%; height: 27.5%; animation-delay: 1s; }
.detect-2 b { left: auto; right: -2px; }
.detect-3 { left: 14%; bottom: 23%; width: 72%; height: 13%; animation-delay: 1.4s; border-color: #22d3ee; box-shadow: 0 0 14px rgba(34, 211, 238, 0.5); }
.detect-3 b { top: auto; bottom: -20px; background: #22d3ee; }

.scanline {
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: #fbbf24;
    box-shadow: 0 0 16px 4px rgba(251, 191, 36, 0.6);
    animation: scan 5s ease-in-out infinite;
}

.carl-bubble {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.carl-bubble p { margin: 0; font-size: 0.76rem; line-height: 1.45; color: #cdd3ee; }

.carl-bubble strong {
    display: block;
    margin-bottom: 2px;
    color: #fbbf24;
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.status-pill {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(74, 222, 128, 0.14);
    color: #4ade80;
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.status-pill .icon { width: 13px; height: 13px; }

/* ---------- Contact ---------- */

.contact-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
    padding: 56px;
    border-radius: 30px;
    border: 1.5px solid transparent;
    background:
        linear-gradient(var(--surface), var(--surface)) padding-box,
        var(--gradient-hot) border-box;
    box-shadow: 0 40px 100px -40px var(--violet-glow);
    overflow: hidden;
    isolation: isolate;
}

.contact-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 420px;
    height: 420px;
    right: -120px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cyan-glow), transparent 65%);
    filter: blur(20px);
}

.contact-main h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
.contact-main .section-lead { margin-bottom: 32px; }

.contact-email {
    margin: 14px 0 0;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.contact-meta {
    display: grid;
    gap: 10px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    color: var(--text-muted);
}

.contact-meta li { display: flex; align-items: center; gap: 10px; }

.contact-social h3 { font-size: 1.2rem; margin-bottom: 18px; }

.socials {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s var(--ease), border-color 0.25s;
}

a.social:hover { color: var(--text); border-color: var(--violet); transform: translateX(4px); }
.social .icon { width: 20px; height: 20px; color: var(--violet); }
.social-external { margin-left: auto; opacity: 0.5; }

.social em {
    margin-left: auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--violet) 12%, transparent);
    color: var(--violet);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.social.is-soon { color: var(--text-muted); }

@media (max-width: 860px) {
    .contact-card { grid-template-columns: 1fr; gap: 40px; padding: 32px 24px; }
}

/* ---------- Keyframes ---------- */

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.12); }
    100% { transform: translate(-40px, 20px) scale(0.95); }
}

@keyframes type-in {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: none; }
}

@keyframes blink { 50% { opacity: 0; } }

@keyframes marquee { to { transform: translateX(-50%); } }

@keyframes grow { from { transform: scaleY(0); } }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

@keyframes breathe {
    0%, 100% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    45% { top: calc(100% - 2px); opacity: 1; }
    55%, 100% { top: calc(100% - 2px); opacity: 0; }
}

@keyframes detect {
    0%, 8% { opacity: 0; transform: scale(1.12); }
    16%, 82% { opacity: 1; transform: scale(1); }
    92%, 100% { opacity: 0; transform: scale(1); }
}

@keyframes travel {
    0% { left: 4%; transform: rotate(0deg); }
    50% { left: calc(96% - 14px); transform: rotate(180deg); }
    100% { left: 4%; transform: rotate(360deg); }
}
