/* ===========================================================
   TECHSOULS DESIGN SYSTEM
   Principles: clarity, hierarchy, whitespace, technical credibility.
   =========================================================== */

:root {
    /* Brand palette — a warm-red-to-deep-indigo gradient, used for dark sections, the primary accent and all decorative color */
    --brand-red: #E05454;
    --brand-magenta: #C13383;
    --brand-purple: #792CA2;
    --brand-indigo: #443199;

    /* Core surfaces */
    --bg-primary: #1C1633;        /* deep muted navy-violet (dark sections) — calmer than raw brand indigo */
    --text-primary: #F8F6FF;      /* soft white (on dark) */
    --bg-secondary: #FAF9FF;      /* soft off-white with a hint of violet (light sections) */
    --text-secondary: #1E1730;    /* deep indigo-black (on light) */
    --surface-dark: #2A2247;      /* raised surface on dark */
    --surface-light: #FFFFFF;     /* raised surface on light */
    --border-subtle: rgba(248, 246, 255, 0.14);
    --border-dark: rgba(30, 23, 48, 0.09);

    /* Soft tinted section backgrounds — used to give light sections rhythm/variety instead of flat white everywhere */
    --tint-violet: #F6F1FB;
    --tint-blue: #F8F0F6;
    --tint-green: #FBF0F5;
    --tint-warm: #FDF1EE;

    /* Single distinctive accent: brand purple (slightly deepened so it reads as rich, not neon) */
    --accent: #6A2C91;
    --accent-dim: #55226F;
    --accent-contrast: #ffffff;
    --accent-tint: rgba(106, 44, 145, 0.10);
    --accent-on-dark: #CDB0F2;    /* light lavender for accent *text* on dark sections */

    /* Status */
    --success: #1FAA6E;
    --warning: #C98A1C;
    --error: #E05454;

    /* Spectrum — the 4 brand colors, cycled across icon tiles / badges / tags instead of one flat accent. */
    --spec-red: #E05454;
    --spec-magenta: #C13383;
    --spec-purple: #792CA2;
    --spec-indigo: #443199;

    /* Muted text (computed via opacity on parents, kept here for reference) */
    --muted-on-dark: rgba(245, 245, 247, 0.45);
    --muted-on-light: rgba(18, 18, 18, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

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

/* ---------- Layout primitives ---------- */

section {
    padding: 8rem 6vw;
    position: relative;
}

.section-tight { padding: 5rem 6vw; }

/* Explicit top clearance for hero sections that sit directly under the fixed nav.
   Kept as its own rule (not a Tailwind utility) so it reliably wins over .section-tight's shorthand. */
.hero-pad { padding-top: 9rem; }
@media (min-width: 768px) { .hero-pad { padding-top: 10rem; } }

.container-wide {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.container-narrow {
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.light-section { background-color: var(--bg-secondary); color: var(--text-secondary); }
.dark-section  { background-color: var(--bg-primary); color: var(--text-primary); }

/* On dark backgrounds the saturated brand hues lose contrast, so text/icon uses switch to lighter tints.
   Light cards placed inside a dark section (.product-card, .compare-col, etc.) reset these below. */
.dark-section {
    --spec-red: #FF9A9A;
    --spec-magenta: #F39AD0;
    --spec-purple: #CDB0F2;
    --spec-indigo: #B9B0F5;
}
.dark-section .product-card,
.dark-section .service-card,
.dark-section .benefit-card,
.dark-section .compare-col,
.dark-section .compare-table-wrap,
.dark-section .qa-facts,
.dark-section .mock-browser,
.dark-section .nav-dropdown-card {
    --spec-red: #E05454;
    --spec-magenta: #C13383;
    --spec-purple: #792CA2;
    --spec-indigo: #443199;
    color: var(--text-secondary);
}
.dark-section .section-label.accent,
.dark-section .eyebrow-accent { color: var(--accent-on-dark); }

/* Tinted section variants — apply to .light-section for rhythm/variety across a long page */
.light-section.tint-violet { background-color: var(--tint-violet); }
.light-section.tint-blue   { background-color: var(--tint-blue); }
.light-section.tint-green  { background-color: var(--tint-green); }
.light-section.tint-warm   { background-color: var(--tint-warm); }

/* ---------- Typography ---------- */

.display-large {
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.display-medium {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    margin-bottom: 1.5rem;
    display: inline-block;
    opacity: 0.6;
}

.section-label.accent { opacity: 1; color: var(--accent); }

.eyebrow-accent { color: var(--accent); }

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

.btn-outline {
    border: 1.5px solid currentColor;
    padding: 0.95rem 2.25rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
}

.dark-section .btn-outline:hover,
nav:not(.nav-light-theme) .btn-outline:hover { background: var(--text-primary); color: var(--bg-primary); }

.light-section .btn-outline:hover { background: var(--text-secondary); color: var(--bg-secondary); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1.5px solid var(--accent);
    padding: 0.95rem 2.25rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); transform: translateY(-1px); }

.btn-ghost {
    padding: 0.95rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-ghost:hover { opacity: 1; }

/* ---------- Navigation ---------- */

nav {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(28, 22, 51, 0.78);
    border-bottom: 1px solid var(--border-subtle);
    transition: color 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

.nav-link { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em; transition: opacity 0.3s ease; cursor: pointer; }
.nav-link:hover { opacity: 0.55; }

.nav-light-theme { color: var(--text-secondary) !important; border-bottom-color: var(--border-dark) !important; background-color: rgba(250, 249, 255, 0.78) !important; }

.nav-dropdown { position: relative; }
/* .nav-dropdown-panel is an invisible hit-box flush against the trigger (top:100%, no gap) so
   :hover never breaks while the pointer travels from the trigger down to the menu — pointer-events
   flips to `none` the instant hover is lost, with no transition, so any gap here makes links unclickable.
   The visible card is a separate inner element (.nav-dropdown-card) offset down via padding-top instead. */
.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    pointer-events: auto;
}
.nav-dropdown-card {
    min-width: 320px;
    background: var(--surface-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.25);
    padding: 0.75rem;
}
.nav-dropdown-item { display: flex; flex-direction: row; padding: 0.7rem 0.9rem; border-radius: 7px; transition: background 0.2s ease; }
.nav-dropdown-item:hover { background: var(--tint-violet); }
.nav-dropdown-item .icon-tile { flex-shrink: 0; }
.nav-dropdown-item .title { font-weight: 700; font-size: 0.85rem; }
.nav-dropdown-item .desc { font-size: 0.72rem; opacity: 0.55; margin-top: 0.15rem; }

.mobile-menu { display: none; }
.mobile-menu.open { display: block; }
.mobile-accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.mobile-accordion-panel.open { max-height: 600px; }

/* ---------- Reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: all 0.9s cubic-bezier(0.2, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.4s; }

/* ---------- Cards ---------- */

.minimal-card { border: 1px solid var(--border-subtle); padding: 3rem; transition: background 0.4s ease; }
.light-section .minimal-card { border: 1px solid var(--border-dark); }

.product-card {
    border: 1px solid var(--border-dark);
    border-radius: 14px;
    background: var(--surface-light);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: transform 0.35s cubic-bezier(0.2,1,0.3,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -20px rgba(0,0,0,0.18); border-color: var(--accent); }

.product-card .icon-tile,
.icon-tile {
    width: 3rem; height: 3rem;
    border-radius: 10px;
    background: var(--accent-tint);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Spectrum icon-tile variants — cycle these across a grid instead of repeating one accent color. */
.icon-tile.c-red     { background: rgba(224,84,84,0.13); color: var(--spec-red); }
.icon-tile.c-magenta { background: rgba(193,51,131,0.13); color: var(--spec-magenta); }
.icon-tile.c-purple  { background: rgba(121,44,162,0.13); color: var(--spec-purple); }
.icon-tile.c-indigo  { background: rgba(68,49,153,0.13); color: var(--spec-indigo); }

.dark-section .icon-tile.c-red     { background: rgba(224,84,84,0.22); }
.dark-section .icon-tile.c-magenta { background: rgba(193,51,131,0.24); }
.dark-section .icon-tile.c-purple  { background: rgba(160,110,220,0.24); }
.dark-section .icon-tile.c-indigo  { background: rgba(255,255,255,0.14); }

/* Thin signature gradient bar — the one deliberately "colorful" motif, used sparingly. */
.spectrum-bar {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--spec-red), var(--spec-magenta), var(--spec-purple), var(--spec-indigo));
}

.feature-pill {
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.9rem; opacity: 0.75; line-height: 1.4;
}
.feature-pill i { color: var(--accent); margin-top: 0.2rem; font-size: 0.8rem; }

.service-card {
    border: 1px solid var(--border-dark);
    border-radius: 14px;
    padding: 2.25rem;
    background: var(--surface-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -18px rgba(0,0,0,0.16); }

/* ---------- Dashboard / product mockups (illustrative only) ---------- */

.mock-browser {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-dark);
    background: var(--surface-light);
    box-shadow: 0 30px 60px -24px rgba(0,0,0,0.25);
}
.mock-browser .mock-topbar {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-dark);
    background: #FAFAFA;
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: #E2E2E2; }
.mock-browser .mock-body { padding: 1.5rem; background: #FCFCFB; }
.mock-skeleton { background: linear-gradient(90deg, #EEEEEC 25%, #F5F5F3 37%, #EEEEEC 63%); background-size: 400% 100%; animation: shimmer 2.4s ease infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.mock-label {
    font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em;
    color: var(--muted-on-light); text-align: center; margin-top: 0.9rem;
}

/* ---------- Flow / ecosystem diagrams ---------- */

.flow-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; min-width: 0; }
.flow-node {
    border: 1px solid var(--border-dark);
    border-radius: 999px;
    padding: 0.6rem 1.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--surface-light);
    white-space: nowrap;
}
.dark-section .flow-node { background: var(--surface-dark); border-color: var(--border-subtle); }
.flow-node.accent { border-color: var(--accent); color: var(--accent); }
.dark-section .flow-node.accent { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.flow-node.c-red     { border-color: var(--spec-red); color: var(--spec-red); }
.flow-node.c-magenta { border-color: var(--spec-magenta); color: var(--spec-magenta); }
.flow-node.c-purple  { border-color: var(--spec-purple); color: var(--spec-purple); }
.flow-node.c-indigo  { border-color: var(--text-primary); color: var(--text-primary); }
.light-section .flow-node.c-indigo { border-color: var(--spec-indigo); color: var(--spec-indigo); }
.flow-arrow { opacity: 0.3; font-size: 1rem; }

.flow-vertical { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.flow-vertical .flow-arrow { transform: rotate(90deg); }

/* ---------- Compare table ---------- */

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border-dark); border-radius: 14px; overflow: hidden; }
.compare-col { padding: 2.5rem; color: var(--text-secondary); }
.compare-col.old { background: #F1F1EF; }
.compare-col.new { background: var(--surface-light); border-left: 1px solid var(--border-dark); }
.compare-col h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; margin-bottom: 1.5rem; opacity: 0.6; }
.compare-item { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.65rem 0; font-size: 0.92rem; }
.compare-item.negative i { color: var(--error); }
.compare-item.positive i { color: var(--success); }

/* ---------- Bubble icons & step badges (liveliness system) ---------- */

.bubble-icon {
    width: 3.25rem; height: 3.25rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.bubble-icon.c-red     { background: rgba(224,84,84,0.14); color: var(--spec-red); }
.bubble-icon.c-magenta { background: rgba(193,51,131,0.14); color: var(--spec-magenta); }
.bubble-icon.c-purple  { background: rgba(121,44,162,0.14); color: var(--spec-purple); }
.bubble-icon.c-indigo  { background: rgba(68,49,153,0.12); color: var(--spec-indigo); }
.dark-section .bubble-icon.c-red     { background: rgba(224,84,84,0.24); }
.dark-section .bubble-icon.c-magenta { background: rgba(193,51,131,0.26); }
.dark-section .bubble-icon.c-purple  { background: rgba(160,110,220,0.26); }
.dark-section .bubble-icon.c-indigo  { background: rgba(255,255,255,0.16); }

.step-badge {
    width: 2.75rem; height: 2.75rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.benefit-card {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 1.25rem 1.4rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.benefit-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px rgba(0,0,0,0.16); }
.benefit-card .bubble-icon { width: 2.5rem; height: 2.5rem; font-size: 0.9rem; }
.benefit-card span { font-size: 0.95rem; font-weight: 600; line-height: 1.4; padding-top: 0.35rem; }

.integration-slot {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
    height: 6rem;
    border: 1px dashed var(--border-dark);
    border-radius: 12px;
    opacity: 0.7;
}
.integration-slot i { font-size: 1rem; opacity: 0.5; }
.integration-slot span { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.55; }

.faq-item .faq-question .bubble-icon { width: 2rem; height: 2rem; font-size: 0.7rem; margin-bottom: 0; }

/* ---------- FAQ ---------- */

.faq-item { border-bottom: 1px solid var(--border-dark); }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; cursor: pointer; font-weight: 700; font-size: 1rem; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; opacity: 0.7; font-size: 0.95rem; line-height: 1.6; }
.faq-item.open .faq-answer { max-height: 800px; padding-bottom: 1.5rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.3s ease; }

/* ---------- Forms ---------- */

.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-field label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.55; }
.form-field input, .form-field select, .form-field textarea {
    background: transparent;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: inherit;
    transition: border-color 0.25s ease;
}
.light-section .form-field input,
.light-section .form-field select,
.light-section .form-field textarea { background: var(--surface-light); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); }

/* ---------- Badges / placeholders ---------- */

.placeholder-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
    padding: 0.3rem 0.7rem; border-radius: 999px;
    background: rgba(201, 138, 28, 0.12); color: var(--warning);
    border: 1px solid rgba(201, 138, 28, 0.3);
}

.logo-slot {
    height: 2.25rem; display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--border-dark); border-radius: 8px; opacity: 0.35;
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}

/* ---------- Photography ---------- */

.photo-frame {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-dark);
    box-shadow: 0 30px 60px -24px rgba(0,0,0,0.28);
    aspect-ratio: 4 / 3;
}
.dark-section .photo-frame { border-color: var(--border-subtle); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nav-logo-mark-wrap {
    width: 26px; height: 26px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    flex-shrink: 0;
    border: 1.5px solid rgba(247, 246, 255, 0.3);
}
.nav-light-theme .nav-logo-mark-wrap,
.light-section .nav-logo-mark-wrap { border-color: rgba(26, 23, 48, 0.14); }
.nav-logo-mark {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scale(1.45);
    display: block;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumb { font-size: 0.78rem; opacity: 0.5; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { opacity: 0.7; text-decoration: underline; }

/* ---------- Scroll indicator / network bg (from original hero) ---------- */

.scroll-indicator { width: 1px; height: 56px; background: linear-gradient(to bottom, currentColor, transparent); opacity: 0.2; }

.network-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.15; z-index: 1; }
.node { fill: currentColor; animation: pulse 4s infinite alternate; }
.connection { stroke: currentColor; stroke-width: 0.5; opacity: 0.3; stroke-dasharray: 4; animation: flow 20s linear infinite; }
@keyframes pulse { from { r: 2; opacity: 0.4; } to { r: 4; opacity: 1; } }
@keyframes flow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

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

@media (max-width: 768px) {
    section { padding: 5rem 6vw; }
    .compare-grid { grid-template-columns: 1fr; }
    .compare-col.new { border-left: none; border-top: 1px solid var(--border-dark); }
    .nav-dropdown-panel { display: none; }
}


/* ---------- FAQ question heading (h3 inside the toggle row) ---------- */
.faq-q-text { font: inherit; margin: 0; }
.faq-question:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- Quick answer: fact list ---------- */
.qa-facts { display: grid; gap: 1.1rem; padding: 2rem; background: var(--surface-light); }
.qa-facts dt { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 0.25rem; }
.qa-facts dd { margin: 0; font-size: 0.95rem; line-height: 1.5; opacity: 0.8; }

/* ---------- Comparison table ---------- */
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--border-dark); border-radius: 14px; background: var(--surface-light); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.92rem; text-align: left; }
.compare-table th, .compare-table td { padding: 1rem 1.25rem; vertical-align: top; border-bottom: 1px solid var(--border-dark); line-height: 1.5; }
.compare-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; background: #F1F1EF; }
.compare-table tbody th { font-weight: 700; width: 22%; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table .is-ours { background: var(--accent-tint); }
.compare-table thead th.is-ours { color: var(--accent); }
