/* ==========================================================================
   Korepotech: software design & engineering
   Palette drawn from the KoRepo brand marks (navy, sky blue, teal, silver).
   ========================================================================== */

:root {
    --ink: #0B1B2E;
    --text: #33475E;
    --muted: #5B6B7F;
    --navy: #12355B;
    --navy-900: #081626;
    --navy-800: #0B1F36;
    --navy-700: #12294A;
    --blue: #1A6FB0;
    --blue-400: #4BA3E3;
    --teal: #1C8288;
    --teal-300: #5CC8C2;
    --silver: #8A96A3;
    --surface: #F4F7FA;
    --line: #E2E8EF;
    --white: #FFFFFF;

    --font-head: 'Manrope', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(11, 27, 46, .05), 0 1px 3px rgba(11, 27, 46, .07);
    --shadow-md: 0 12px 28px -10px rgba(11, 27, 46, .16), 0 2px 6px rgba(11, 27, 46, .05);
    --shadow-lg: 0 40px 80px -28px rgba(11, 27, 46, .32), 0 8px 24px -12px rgba(11, 27, 46, .12);

    --container: 1200px;
    --gutter: 24px;
    --header-h: 72px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.02em;
}

p { margin: 0; }

:focus-visible {
    outline: 3px solid rgba(26, 111, 176, .45);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--white); }

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---------- Buttons & links ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .975rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
    white-space: nowrap;
}
.btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s var(--ease);
}
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 6px 16px -6px rgba(18, 53, 91, .55);
}
.btn-primary:hover {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 10px 22px -8px rgba(26, 111, 176, .6);
    transform: translateY(-1px);
}

.btn-ghost {
    background: var(--white);
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover {
    color: var(--navy);
    border-color: #C5D2E0;
    background: var(--surface);
}

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

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.link-arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s var(--ease);
}
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Typography helpers ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 16px;
}
.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}
.eyebrow-light { color: var(--teal-300); }

.text-gradient {
    background: linear-gradient(100deg, var(--navy) 0%, var(--blue) 55%, var(--teal) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    font-size: 1.175rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 6px 20px -16px rgba(11, 27, 46, .35);
}

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .14em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
.site-nav a:not(.btn) {
    position: relative;
    padding: 8px 14px;
    color: var(--text);
    font-weight: 500;
    font-size: .95rem;
    border-radius: 8px;
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.site-nav a:not(.btn):hover { color: var(--ink); background: var(--surface); }
.site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--blue);
}
.nav-cta { margin-inline-start: 10px; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    position: relative;
}
.nav-toggle span {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 72px 0 0;
    overflow: hidden;
    isolation: isolate;
}
.hero::before {
    /* soft brand glow */
    content: '';
    position: absolute;
    top: -20%;
    inset-inline-end: -10%;
    width: 900px;
    height: 900px;
    background:
        radial-gradient(closest-side, rgba(75, 163, 227, .20), transparent 70%),
        radial-gradient(closest-side at 30% 70%, rgba(92, 200, 194, .16), transparent 70%);
    z-index: -1;
}
.hero::after {
    /* engineering grid */
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(18, 53, 91, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 53, 91, .055) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
    z-index: -2;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}

.hero h1 {
    font-size: clamp(2.4rem, 4.6vw, 3.9rem);
    line-height: 1.06;
    letter-spacing: -0.035em;
    font-weight: 800;
    margin-bottom: 24px;
}
.hero h1 .text-gradient { display: inline; }
.hero .lead { max-width: 560px; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.hero-note {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 28px;
    font-size: .925rem;
    color: var(--muted);
}
.hero-note a { font-weight: 600; }
.hero-note .dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px rgba(28, 130, 136, .15);
    transform: translateY(-1px);
}

/* Hero visual: a product-design composition built in CSS */
.hero-visual {
    position: relative;
    padding-block: 36px 56px;
    padding-inline: 36px 28px;
}

.mock-window {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.mock-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.mock-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D5DEE8;
}
.mock-url {
    margin-inline-start: 14px;
    flex: 1;
    max-width: 240px;
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: .7rem;
    color: var(--silver);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-body {
    display: grid;
    grid-template-columns: 56px 1fr;
    min-height: 330px;
}
.mock-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    border-inline-end: 1px solid var(--line);
    background: #FAFCFD;
}
.mock-side b {
    width: 22px;
    height: 6px;
    border-radius: 4px;
    background: #E3EAF1;
}
.mock-side b.is-active { background: var(--blue); }
.mock-side .mock-logo {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--navy), var(--teal));
    margin-bottom: 8px;
}

.mock-main { padding: 20px 22px 22px; }
.mock-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.mock-head b {
    width: 42%;
    height: 10px;
    border-radius: 5px;
    background: var(--ink);
    opacity: .85;
}
.mock-pill {
    width: 72px;
    height: 24px;
    border-radius: 999px;
    background: var(--navy);
}

.mock-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.mock-kpis > div {
    position: relative;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.mock-kpis b,
.mock-kpis strong,
.mock-kpis em { display: block; border-radius: 4px; }
.mock-kpis b { width: 60%; height: 6px; background: #E3EAF1; margin-bottom: 10px; }
.mock-kpis strong { width: 70%; height: 12px; background: #C8D4E1; }
.mock-kpis em {
    position: absolute;
    inset-inline-end: 10px;
    top: 10px;
    width: 26px;
    height: 12px;
    border-radius: 999px;
    background: rgba(138, 150, 163, .25);
}
.mock-kpis em.up { background: rgba(28, 130, 136, .22); }

.mock-chart {
    height: 120px;
    padding: 8px 0 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
}
.mock-chart svg { width: 100%; height: 100%; }
.mock-chart .grid { stroke: #EEF2F6; stroke-width: 1; fill: none; }
.mock-chart .line {
    fill: none;
    stroke: var(--blue);
    stroke-width: 2.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}
.mock-chart .line-2 { stroke: var(--teal-300); stroke-width: 2; stroke-dasharray: 5 5; }

.mock-rows { display: grid; gap: 8px; }
.mock-rows b {
    display: block;
    height: 10px;
    border-radius: 5px;
    background: #EEF2F6;
}
.mock-rows b:nth-child(2) { width: 86%; }
.mock-rows b:nth-child(3) { width: 64%; }

.float-card,
.float-chip {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.design-card {
    top: 0;
    inset-inline-start: 0;
    width: 178px;
    padding: 14px 16px 16px;
    animation: float 7s ease-in-out infinite;
}
.fc-label {
    display: block;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
}
.swatches { display: flex; gap: 6px; margin-bottom: 12px; }
.swatches i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--c);
}
.type-sample { display: flex; align-items: center; gap: 10px; }
.type-sample span {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--ink);
}
.type-sample small {
    font-size: .68rem;
    line-height: 1.35;
    color: var(--muted);
}

.code-card {
    inset-inline-end: 0;
    bottom: 0;
    width: 280px;
    padding: 16px 18px;
    background: var(--navy-800);
    border-color: rgba(255, 255, 255, .08);
    animation: float 8s ease-in-out -2s infinite;
}
.code-card pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: .74rem;
    line-height: 1.7;
    color: #DCE6F2;
    white-space: pre;
    overflow: hidden;
}
.code-card .c { color: #7D8FA6; }
.code-card .k { color: var(--blue-400); }
.code-card .s { color: var(--teal-300); }

.status-chip {
    top: 52%;
    inset-inline-start: -4px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 12px;
    padding-inline: 14px 16px;
    border-radius: 999px;
    animation: float 6s ease-in-out -4s infinite;
}
.status-chip strong {
    display: block;
    font-size: .8rem;
    color: var(--ink);
    line-height: 1.2;
}
.status-chip small {
    display: block;
    font-size: .72rem;
    color: var(--muted);
}
.pulse {
    position: relative;
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16A36A;
}
.pulse::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(22, 163, 106, .35);
    animation: ping 2s ease-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes ping {
    0% { transform: scale(.6); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Proof strip */
.proof-strip {
    list-style: none;
    margin: 72px 0 0;
    padding: 28px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.proof-strip li {
    padding: 4px 28px;
    border-inline-start: 1px solid var(--line);
}
.proof-strip li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.proof-strip strong {
    display: block;
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 4px;
}
.proof-strip span {
    display: block;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--muted);
}

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-tint { background: var(--surface); }

.section-head {
    max-width: 720px;
    margin-bottom: 56px;
}
.section-head h2,
.about-copy h2,
.contact-copy h2 {
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}
.section-head > p:last-child {
    font-size: 1.1rem;
    color: var(--muted);
}

.icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--blue);
    background: linear-gradient(135deg, rgba(26, 111, 176, .10), rgba(28, 130, 136, .10));
    border: 1px solid rgba(26, 111, 176, .12);
}
.icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.service-card {
    position: relative;
    padding: 32px 28px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.service-card::after {
    content: '';
    position: absolute;
    left: 28px;
    right: 28px;
    top: 0;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #D3DDE8;
}
.service-card:hover::after { transform: scaleX(1); }
.service-card h3 {
    font-size: 1.15rem;
    margin: 22px 0 10px;
}
.service-card p { font-size: .96rem; color: var(--muted); }

/* Approach */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 28px 24px 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.step::before {
    /* connector line between steps */
    content: '';
    position: absolute;
    top: 47px;
    inset-inline-start: calc(100% + 1px);
    width: 19px;
    height: 2px;
    background: linear-gradient(90deg, var(--line), #C9D5E2);
}
.step:last-child::before { display: none; }
.step-num {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: .85rem;
    color: var(--white);
    background: linear-gradient(135deg, var(--navy), var(--blue));
    box-shadow: 0 6px 14px -6px rgba(18, 53, 91, .6);
}
.step h3 { font-size: 1.15rem; margin: 20px 0 8px; }
.step > p { font-size: .95rem; color: var(--muted); }
.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 18px 0 0;
    padding: 0;
}
.tags li {
    padding: 4px 10px;
    font-size: .76rem;
    font-weight: 500;
    color: var(--navy);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
}

/* Products (dark) */
.section-dark {
    position: relative;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(75, 163, 227, .18), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(92, 200, 194, .12), transparent 60%),
        linear-gradient(180deg, var(--navy-800), var(--navy-900));
    color: #B8C6D6;
    overflow: hidden;
}
.section-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
    mask-image: linear-gradient(180deg, #000, transparent 70%);
    pointer-events: none;
}
.section-dark .container { position: relative; }
.section-dark h2 { color: var(--white); }
.section-dark .section-head > p:last-child { color: #A9B8C9; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .7);
}
.product-logo {
    display: grid;
    place-items: center;
    height: 200px;
    padding: 28px;
    background:
        radial-gradient(circle at 50% 120%, rgba(26, 111, 176, .10), transparent 65%),
        linear-gradient(180deg, #FFFFFF, #F3F7FB);
    border-bottom: 1px solid var(--line);
}
.product-logo img {
    width: auto;
    height: auto;
    max-height: 140px;
    max-width: 78%;
    object-fit: contain;
}
.product-body { padding: 28px 28px 30px; color: var(--text); }
.product-role {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 8px;
}
.product-body h3 { font-size: 1.35rem; margin-bottom: 10px; }
.product-body > p { font-size: .95rem; color: var(--muted); }

.checks {
    list-style: none;
    margin: 20px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
}
.checks li {
    position: relative;
    padding-inline-start: 28px;
    font-size: .92rem;
    font-weight: 500;
    color: var(--ink);
}
.checks li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(28, 130, 136, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C8288' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.products-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 40px;
    padding: 24px 28px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .03);
}
.products-foot p { color: var(--white); font-weight: 500; font-size: 1.05rem; }
.products-foot .link-arrow { color: var(--blue-400); }
.products-foot .link-arrow:hover { color: var(--white); }

/* About / Why */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 72px;
    align-items: center;
}
.about-copy p:not(.eyebrow) {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 18px;
}
.about-copy .btn { margin-top: 12px; }

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.why-item {
    padding: 28px 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--white), #FAFCFD);
}
.why-item:nth-child(2),
.why-item:nth-child(4) { transform: translateY(28px); }
.why-item h3 { font-size: 1.08rem; margin: 18px 0 8px; }
.why-item p { font-size: .94rem; color: var(--muted); }

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 64px;
    align-items: start;
}
.contact-copy > p:not(.eyebrow) {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 480px;
}

.contact-line {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
    padding-block: 14px;
    padding-inline: 14px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    font-weight: 600;
    font-size: 1.05rem;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.contact-line:hover {
    color: var(--ink);
    border-color: #C5D2E0;
    box-shadow: var(--shadow-md);
}
.contact-line small {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.3;
}
.contact-line .icon { width: 44px; height: 44px; }

.next-steps {
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
    display: grid;
    gap: 16px;
    counter-reset: next;
}
.next-steps li {
    position: relative;
    padding-inline-start: 44px;
    font-size: .96rem;
    color: var(--muted);
    counter-increment: next;
}
.next-steps li strong { display: block; color: var(--ink); font-weight: 600; }
.next-steps li::before {
    content: counter(next);
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--line);
}

.contact-form {
    padding: 36px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.field { margin-bottom: 18px; }
.field label {
    display: block;
    margin-bottom: 7px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink);
}
.field .optional { font-weight: 400; color: var(--muted); }
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: .96rem;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #D3DCE6;
    border-radius: var(--radius-sm);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}
.field select {
    padding-inline-end: 40px;
    background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B7F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(26, 111, 176, .14);
}
.field [aria-invalid="true"] { border-color: #C2413A; }

.form-error {
    margin: -4px 0 16px;
    font-size: .88rem;
    color: #B3372F;
}
.form-note {
    margin-top: 14px;
    font-size: .8rem;
    text-align: center;
    color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-900);
    color: #93A4B8;
    padding: 72px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
}
.brand-light { color: var(--white); }
.brand-light:hover { color: var(--white); }
.brand-badge {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--white);
}
.brand-badge img { width: 32px; height: 32px; }
.footer-brand p {
    margin: 18px 0 14px;
    max-width: 320px;
    font-size: .95rem;
}
.footer-email { color: var(--white); font-weight: 600; }
.footer-email:hover { color: var(--blue-400); }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
    font-family: var(--font-mono);
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 6px;
}
.footer-col a { color: #93A4B8; font-size: .94rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-top: 24px;
    padding-bottom: 28px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .86rem;
}
.footer-bottom .tagline {
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6F8298;
}

/* ---------- Language switch ---------- */
.site-nav { margin-inline-start: auto; }
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.lang-switch:hover {
    color: var(--ink);
    border-color: #C5D2E0;
    background: var(--surface);
}
.lang-switch svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lang-switch[lang="ar"],
.footer-lang[lang="ar"] { font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
.footer-lang { color: #93A4B8; font-weight: 600; }
.footer-lang:hover { color: var(--white); }

@media (max-width: 640px) {
    .header-inner { gap: 12px; }
    .header-actions { gap: 8px; }
    .lang-switch { height: 38px; padding: 0 12px; font-size: .85rem; }
    .lang-switch svg { display: none; }
    .brand { gap: 8px; }
    .brand img { width: 34px; height: 34px; }
    .brand-name { font-size: 15px; letter-spacing: .12em; }
}
@media (max-width: 359px) {
    .brand-name { display: none; }
}

/* ---------- Right-to-left layout ---------- */
[dir="rtl"] .btn svg,
[dir="rtl"] .link-arrow svg { transform: scaleX(-1); }
[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .link-arrow:hover svg { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .service-card::after {
    transform-origin: right;
    background: linear-gradient(270deg, var(--blue), var(--teal));
}
[dir="rtl"] .step::before { background: linear-gradient(270deg, var(--line), #C9D5E2); }
[dir="rtl"] .field select { background-position: left 14px center; }
[dir="rtl"] .hero::after {
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 20%, transparent 75%);
}
[dir="rtl"] .code-card pre { text-align: left; }

/* ---------- Arabic typography ---------- */
.brand-name { font-family: 'Manrope', 'Inter', system-ui, sans-serif; }

:root[lang="ar"] {
    font-size: 106.25%;
    --font-head: 'IBM Plex Sans Arabic', 'Manrope', system-ui, sans-serif;
    --font-body: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif;
}
[lang="ar"] body { line-height: 1.85; }
[lang="ar"] h1,
[lang="ar"] h2,
[lang="ar"] h3,
[lang="ar"] h4,
[lang="ar"] .proof-strip strong { letter-spacing: 0; }
[lang="ar"] .hero h1 {
    font-size: clamp(2.1rem, 3.9vw, 3.3rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
}
[lang="ar"] .hero h1 .text-gradient { display: block; }
[lang="ar"] .section-head h2,
[lang="ar"] .about-copy h2,
[lang="ar"] .contact-copy h2 {
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}
[lang="ar"] .service-card h3,
[lang="ar"] .step h3,
[lang="ar"] .why-item h3 { line-height: 1.5; }
[lang="ar"] .eyebrow,
[lang="ar"] .product-role,
[lang="ar"] .fc-label,
[lang="ar"] .footer-col h4,
[lang="ar"] .footer-bottom .tagline {
    font-family: var(--font-body);
    letter-spacing: 0;
    text-transform: none;
}
[lang="ar"] .eyebrow { font-size: .95rem; font-weight: 600; }
[lang="ar"] .product-role { font-size: .88rem; font-weight: 600; }
[lang="ar"] .fc-label { font-size: .78rem; }
[lang="ar"] .footer-col h4 { font-size: .95rem; font-weight: 600; }
[lang="ar"] .footer-bottom .tagline { font-size: .9rem; }
[lang="ar"] .btn { font-size: 1rem; line-height: 1.2; padding-block: 12px; }
[lang="ar"] .btn-sm { padding-block: 9px; font-size: .95rem; }
[lang="ar"] .lead { line-height: 1.9; }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .why-item.reveal.is-visible:nth-child(2),
.js .why-item.reveal.is-visible:nth-child(4) { transform: translateY(28px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-copy { max-width: 720px; }
    .hero-visual { max-width: 620px; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .step::before { display: none; }
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .why-item:nth-child(2),
    .why-item:nth-child(4),
    .js .why-item.reveal.is-visible:nth-child(2),
    .js .why-item.reveal.is-visible:nth-child(4) { transform: none; }
}

@media (max-width: 960px) {
    .services-grid,
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .proof-strip { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
    .proof-strip li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
    .contact-grid { grid-template-columns: 1fr; gap: 48px; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }

    .nav-toggle { display: block; }
    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px var(--gutter) 24px;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 40px -24px rgba(11, 27, 46, .3);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
    }
    .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
    .site-nav a:not(.btn) { padding: 14px 12px; font-size: 1rem; }
    .site-nav a.is-active::after { display: none; }
    .nav-cta { margin: 12px 0 0; padding: 14px 18px; }
}

@media (max-width: 640px) {
    :root { --gutter: 16px; --header-h: 64px; }
    .section { padding: 80px 0; }
    .hero { padding-top: 40px; }
    .hero-actions .btn { flex: 1 1 auto; }
    .hero-visual { padding: 24px 0 48px 0; }
    .mock-body { min-height: 260px; grid-template-columns: 44px 1fr; }
    .mock-main { padding: 14px; }
    .design-card { width: 150px; padding: 12px; inset-inline-start: -4px; top: -4px; }
    .swatches i { width: 22px; height: 22px; }
    .code-card { width: 230px; inset-inline-end: -4px; }
    .code-card pre { font-size: .66rem; }
    .status-chip { display: none; }
    .proof-strip { grid-template-columns: 1fr; margin-top: 56px; }
    .proof-strip li { border-inline-start: 0; padding: 0; }
    .services-grid,
    .products-grid,
    .steps,
    .why-grid,
    .field-row { grid-template-columns: 1fr; }
    .field-row { gap: 0; }
    .section-head { margin-bottom: 40px; }
    .contact-form { padding: 24px 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

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