/* ==========================================================================
   Kryni Softech - Website styles (frontend only)
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
    --blue: #0a5bd8;
    --blue-600: #0849ad;
    --blue-400: #2f7cf0;
    --blue-50: #ecf3ff;
    --orange: #ec8a0c;
    --orange-600: #d87500;
    --yellow: #f2b705;
    --orange-50: #fff4e3;
    --ink: #161b26;
    --text: #444d5c;
    --muted: #6b7484;
    --line: #e4e8f0;
    --bg: #ffffff;
    --bg-alt: #f5f7fb;
    --success: #16a34a;
    --danger: #dc2626;

    --gradient-brand: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 100%);
    --gradient-blue: linear-gradient(135deg, #1279ec 0%, #0a4fc4 100%);

    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(22, 27, 38, .06), 0 1px 3px rgba(22, 27, 38, .08);
    --shadow: 0 10px 30px -12px rgba(22, 27, 38, .18);
    --shadow-lg: 0 24px 60px -20px rgba(10, 40, 100, .30);
    --header-h: 76px;
    --container: 1180px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
    margin: 0 0 .5em;
    color: var(--ink);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.35rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue-600); }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid rgba(10, 91, 216, .45); outline-offset: 2px; }

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.icon { width: 20px; height: 20px; flex-shrink: 0; }

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

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--orange-600);
}

.lead { font-size: 1.15rem; color: var(--text); }

/* ---------- 3. Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-weight: 600;
    font-size: .98rem;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, color .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .7; cursor: wait; transform: none; }

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(10, 91, 216, .6); }
.btn-primary:hover { background: var(--blue-600); color: #fff; }

.btn-secondary { background: var(--gradient-brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(236, 138, 12, .6); }
.btn-secondary:hover { color: #fff; filter: brightness(1.05); }

.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { color: var(--blue-600); box-shadow: var(--shadow); }

.btn-outline-light { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .1); color: #fff; }

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

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
}
.link-btn .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-btn:hover .icon { transform: translateX(4px); }

/* ---------- 4. Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }

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

.brand img { width: auto; height: 50px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav ul a {
    position: relative;
    display: block;
    padding: 8px 14px;
    font-weight: 600;
    font-size: .97rem;
    color: var(--ink);
    border-radius: 999px;
}
.site-nav ul a:hover { color: var(--blue); background: var(--blue-50); }
.site-nav ul a.active { color: var(--blue); }
.site-nav ul a.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 3px;
    margin-left: -9px;
    border-radius: 3px;
    background: var(--gradient-brand);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle-close { display: none; }
.nav-open .nav-toggle-open { display: none; }
.nav-open .nav-toggle-close { display: block; }

/* ---------- 5. Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 96px;
    background:
        radial-gradient(900px 480px at 92% 8%, rgba(10, 91, 216, .10), transparent 60%),
        radial-gradient(700px 420px at 0% 100%, rgba(242, 183, 5, .12), transparent 60%),
        var(--bg);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}

.hero-text .lead { max-width: 560px; margin-bottom: 30px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.hero-points { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; color: var(--ink); }
.hero-points .icon { width: 20px; height: 20px; color: var(--success); }

.hero-visual { position: relative; padding: 30px 20px; }

.mock-window {
    position: relative;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
}
.mock-bar { display: flex; gap: 7px; padding: 14px 16px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: #d6dbe5; }
.mock-bar span:first-child { background: #ff6159; }
.mock-bar span:nth-child(2) { background: #ffbd2e; }
.mock-bar span:nth-child(3) { background: #28c941; }
.mock-body { padding: 22px; }
.mock-hero { height: 120px; border-radius: 12px; background: var(--gradient-blue); margin-bottom: 18px; position: relative; overflow: hidden; }
.mock-hero::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--gradient-brand);
    opacity: .9;
}
.mock-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.mock-card { height: 64px; border-radius: 10px; background: var(--blue-50); }
.mock-card:nth-child(2) { background: var(--orange-50); }
.mock-line { height: 10px; border-radius: 6px; background: var(--line); margin-bottom: 10px; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-80 { width: 80%; }

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    animation: float 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: .92rem; color: var(--ink); }
.float-card small { display: block; font-size: .8rem; color: var(--muted); }
.float-card-1 { left: -10px; bottom: 30px; }
.float-card-2 { right: -6px; top: 6px; animation-delay: -3s; }
.float-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #fff; }
.float-icon .icon { width: 19px; height: 19px; }
.icon-blue { background: var(--gradient-blue); }
.icon-orange { background: var(--gradient-brand); }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---------- 6. Page hero (inner pages) ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 60px;
    background: var(--gradient-blue);
    color: rgba(255, 255, 255, .88);
}
.page-hero::before,
.page-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.page-hero::before { right: -80px; top: -120px; width: 340px; height: 340px; background: var(--gradient-brand); opacity: .22; }
.page-hero::after { left: -60px; bottom: -160px; width: 300px; height: 300px; border: 40px solid rgba(255, 255, 255, .06); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { max-width: 640px; margin: 0; font-size: 1.1rem; }

.breadcrumb { display: flex; gap: 8px; margin-bottom: 14px; font-size: .9rem; }
.breadcrumb a { color: rgba(255, 255, 255, .8); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255, 255, 255, .6); }
.breadcrumb [aria-current] { color: var(--yellow); }

/* ---------- 7. Sections & grids ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 680px; margin: 0 auto 50px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.section-foot { margin-top: 44px; text-align: center; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.split-text p { color: var(--text); }
.split-text .btn { margin-top: 10px; }

/* ---------- 8. Cards ---------- */
.icon-box {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: var(--blue-50);
    color: var(--blue);
    flex-shrink: 0;
}
.icon-box .icon { width: 26px; height: 26px; }
.icon-box-orange { background: var(--orange-50); color: var(--orange-600); }

.service-card,
.feature-card,
.contact-card {
    position: relative;
    padding: 30px 28px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.service-card:hover,
.feature-card:hover,
a.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: transparent;
}
.service-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--gradient-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card p,
.feature-card p { margin: 0; color: var(--muted); font-size: .97rem; }

.feature-card { padding: 26px 24px; }
.feature-card h3 { font-size: 1.05rem; }

/* Process */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; counter-reset: step; }
.process-step {
    position: relative;
    padding: 28px 22px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}
.process-num {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.process-step p { margin: 0; font-size: .95rem; color: var(--muted); }
.process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 44px;
    right: -16px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--line);
    border-right: 2px solid var(--line);
    transform: rotate(45deg);
}

/* Projects */
.project-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-card.is-hidden { display: none; }

.project-card { position: relative; }
.project-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-alt);
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.project-card:hover .project-media img { transform: scale(1.05); }

.project-industry {
    display: block;
    margin-bottom: 6px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--orange-600);
}
.project-body h3 a { color: var(--ink); }
/* Whole card is clickable through the title link. */
.project-body h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.project-body h3 a:hover,
.project-card:hover h3 a { color: var(--blue); }

.project-cat {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 1;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: var(--ink);
    font-size: .78rem;
    font-weight: 700;
}

.project-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.project-body p { color: var(--muted); font-size: .96rem; }
.project-body .link-btn { margin-top: auto; align-self: flex-start; }
.project-card:hover .link-btn .icon { transform: translateX(4px); }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
}

.filter-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter-btn {
    padding: 9px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
    font-size: .93rem;
    color: var(--text);
    cursor: pointer;
    transition: all .2s;
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

.empty-state { margin: 30px 0 0; text-align: center; color: var(--muted); }

/* Lists */
.check-list { display: grid; gap: 8px; margin-bottom: 20px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-size: .97rem; }
.check-list .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--success); stroke-width: 2.4; }

.tech-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 900px; margin: 0 auto; }
.tech-list li {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--line);
    font-weight: 600;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), border-color .2s, color .2s;
}
.tech-list li:hover { transform: translateY(-3px); border-color: var(--blue); color: var(--blue); }

/* Services page */
.service-detail {
    display: flex;
    gap: 22px;
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    transition: box-shadow .25s, transform .25s var(--ease);
}
.service-detail:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.service-detail h2 { font-size: 1.35rem; }
.service-detail p { color: var(--muted); }

/* About page */
.value-stack { display: grid; gap: 18px; }
.value-card {
    display: flex;
    gap: 18px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.value-card .icon-box { margin: 0; }
.value-card p { margin: 0; color: var(--muted); }
.value-card h3 { margin-bottom: 4px; }

/* ---------- 9. CTA ---------- */
.cta-section { padding: 0 0 90px; }
.section-alt + .cta-section,
.cta-section:first-child { padding-top: 90px; }
.cta-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 56px;
    border-radius: var(--radius-lg);
    background: var(--gradient-blue);
    color: rgba(255, 255, 255, .88);
    overflow: hidden;
}
.cta-box::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: var(--gradient-brand);
    opacity: .3;
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 { color: #fff; margin-bottom: 8px; }
.cta-box p { margin: 0; max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ---------- 10. Forms ---------- */
.form-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.contact-cards { margin-bottom: 50px; }
.contact-card { display: block; text-align: center; color: inherit; }
.contact-card:hover { color: inherit; }
.contact-card .icon-box { margin-bottom: 14px; }
.contact-card h3 { margin-bottom: 4px; font-size: 1.05rem; }
.contact-card p { margin: 0; color: var(--muted); font-size: .95rem; word-break: break-word; }

.form-card,
.side-card {
    padding: 36px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.form-card h2,
.side-card h2 { font-size: 1.5rem; }
.form-intro { color: var(--muted); font-size: .93rem; }

.side-card { position: sticky; top: calc(var(--header-h) + 24px); background: var(--bg-alt); box-shadow: none; }
.side-card p { color: var(--muted); }

.next-steps { counter-reset: next; display: grid; gap: 18px; margin-bottom: 26px; }
.next-steps li { position: relative; padding-left: 48px; counter-increment: next; }
.next-steps li::before {
    content: counter(next);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
}
.next-steps strong { display: block; color: var(--ink); }
.next-steps span { color: var(--muted); font-size: .94rem; }

.side-contact { display: grid; gap: 10px; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.side-contact p { margin: 0; font-weight: 600; color: var(--ink); }
.side-contact a,
.side-contact span { display: flex; align-items: center; gap: 10px; font-weight: 600; word-break: break-word; }
.side-contact span { color: var(--text); font-weight: 500; }
.side-contact .icon { width: 18px; height: 18px; }
.side-card .btn { margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 600; font-size: .93rem; color: var(--ink); }
.req { color: var(--danger); }

.form-group input,
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: .98rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7484' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(10, 91, 216, .12);
}
.form-group .is-invalid { border-color: var(--danger); }
.form-group .is-invalid:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }

.field-error { display: block; margin-top: 6px; font-size: .85rem; color: var(--danger); }
.field-error:empty { display: none; }

.form-alert {
    margin-bottom: 22px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
}
.form-alert.is-success { background: #e9f8ef; color: #136c35; border: 1px solid #bfe8cf; }
.form-alert.is-error { background: #fdecec; color: #a11d1d; border: 1px solid #f5c6c6; }

/* Honeypot: hidden from people, visible to bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 11. Case study page ---------- */
.case-hero { padding-bottom: 150px; }
.case-hero h1 { max-width: 860px; }
.case-hero p { max-width: 760px; }
.case-industry {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
}
.case-meta { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 30px 0 0; }
.case-meta dt { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.case-meta dd { margin: 2px 0 0; font-weight: 600; color: #fff; }

.case-cover {
    position: relative;
    z-index: 2;
    margin-top: -110px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #1a1f2b;
}
.case-cover img { width: 100%; }

.case-section { padding-top: 70px; }
.case-story { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.story-card { padding: 34px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.story-card p { margin: 0; font-size: 1.04rem; }
.story-label {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--blue-50);
    color: var(--blue);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.story-label-orange { background: var(--orange-50); color: var(--orange-600); }

.results-band {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 24px;
    padding: 30px 34px;
    border-radius: var(--radius);
    background: var(--gradient-blue);
}
.results-band h2 { margin: 0; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.results-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; flex: 1; }
.results-list li { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; color: #fff; line-height: 1.45; }
.result-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gradient-brand); flex-shrink: 0; }
.result-icon .icon { width: 15px; height: 15px; stroke-width: 3; }

.deliver-card { padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.deliver-card h3 { margin-bottom: 18px; font-size: 1.2rem; }
.deliver-card .check-list { margin: 0; gap: 12px; }

/* 2 or 3 screenshots: columns adjust to the number of images. */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.gallery-item { margin: 0; }
.gallery-item a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    transition: transform .25s var(--ease), box-shadow .25s;
}
.gallery-item a:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-item figcaption { margin-top: 12px; font-size: .93rem; color: var(--muted); text-align: center; }

.case-tech { margin-top: 50px; text-align: center; }
.case-tech h3 { margin-bottom: 14px; }
.case-tech .tag-list { justify-content: center; }
.case-tech .tag-list li { padding: 7px 16px; font-size: .9rem; background: #fff; }

/* ---------- 12. Modal + lightbox ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13, 18, 30, .6); animation: fade-in .2s; }
.lightbox .modal-backdrop { background: rgba(8, 11, 18, .9); }
.lightbox-figure {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0;
    animation: pop-in .3s var(--ease);
}
.lightbox-figure img { width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: var(--radius); }
.lightbox-figure figcaption { margin-top: 14px; color: rgba(255, 255, 255, .85); text-align: center; font-size: .95rem; }
.lightbox .modal-close { right: 10px; top: 10px; }
.lightbox-nav {
    position: absolute;
    top: calc(50% - 40px);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow);
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-nav:hover { color: var(--blue); }
.modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
body.modal-open { overflow: hidden; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(20px) scale(.97); } }

/* ---------- 13. Footer ---------- */
.site-footer { background: #0f1420; color: rgba(255, 255, 255, .68); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-top: 70px; padding-bottom: 50px; }
.footer-logo {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: #fff;
}
.footer-logo img { height: 42px; width: auto; }
.footer-brand p { max-width: 340px; }
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .8);
    transition: background-color .2s, color .2s;
}
.footer-social a:hover { background: var(--gradient-brand); color: #fff; }
.footer-social .icon { width: 19px; height: 19px; }
.footer-title { margin-bottom: 18px; font-size: 1rem; color: #fff; }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: rgba(255, 255, 255, .68); }
.footer-links a:hover { color: var(--yellow); }
.footer-contact { display: grid; gap: 14px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 12px; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--yellow); }
.footer-contact a { color: rgba(255, 255, 255, .8); word-break: break-word; }
.footer-contact a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 22px; padding-bottom: 22px; font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* ---------- 14. Floating buttons ---------- */
.whatsapp-float,
.back-to-top {
    position: fixed;
    right: 22px;
    z-index: 90;
    display: grid;
    place-items: center;
    border-radius: 50%;
    box-shadow: var(--shadow);
    transition: transform .2s var(--ease), opacity .2s, visibility .2s;
}
.whatsapp-float { bottom: 22px; width: 54px; height: 54px; background: #25d366; color: #fff; }
.whatsapp-float:hover { color: #fff; transform: scale(1.08); }
.whatsapp-float .icon { width: 28px; height: 28px; }
.back-to-top {
    bottom: 88px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); color: var(--blue); }

/* ---------- 15. Scroll reveal (enabled by main.js) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 16. Responsive ---------- */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .process { grid-template-columns: repeat(3, 1fr); }
    .process-step::after { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
    :root { --header-h: 68px; }

    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px 20px 26px;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: transform .25s var(--ease), opacity .25s, visibility .25s;
    }
    .nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
    .site-nav ul { flex-direction: column; gap: 2px; }
    .site-nav ul a { padding: 12px 14px; border-radius: var(--radius-sm); }
    .site-nav ul a.active { background: var(--blue-50); }
    .site-nav ul a.active::after { display: none; }
    .site-nav .btn { padding: 13px 20px; }

    .brand img { height: 42px; }

    .hero { padding: 48px 0 70px; }
    .hero-grid,
    .split,
    .form-layout { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .side-card { position: static; }
    .case-story,
    .gallery-grid { grid-template-columns: 1fr; }
    .results-band { flex-direction: column; align-items: flex-start; gap: 20px; }
    .results-list { grid-template-columns: 1fr; gap: 14px; }
    .case-hero { padding-bottom: 110px; }
    .case-cover { margin-top: -80px; }
    .cta-box { flex-direction: column; align-items: flex-start; padding: 40px 32px; }
    .section { padding: 70px 0; }
    .cta-section { padding-bottom: 70px; }
    .section-alt + .cta-section { padding-top: 70px; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .grid-2,
    .grid-3,
    .grid-4,
    .form-row { grid-template-columns: 1fr; }
    .form-row { gap: 0; }
    .process { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 50px; }
    .service-detail { flex-direction: column; padding: 26px 22px; gap: 4px; }
    .form-card,
    .side-card { padding: 26px 20px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .float-card-1 { left: 0; bottom: 6px; }
    .float-card-2 { right: 0; top: 0; }
    .mock-window { transform: none; }
    .cta-box { padding: 32px 22px; }
    .cta-actions,
    .cta-actions .btn { width: 100%; }
    .story-card,
    .deliver-card { padding: 24px 20px; }
    .case-meta { gap: 12px 28px; }
    .lightbox-nav { width: 38px; height: 38px; }
    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
    .section-head { margin-bottom: 36px; }
}

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