/* ==============================================================
   Kovine Gorsek — Homepage Redesign 2026
   Dark industrial theme. All classes prefixed with kg- to avoid
   collisions with style.css / modern.css (shared by other pages).
   ============================================================== */

:root {
    --kg-bg: #0a0e14;
    --kg-bg-alt: #0e141d;
    --kg-panel: #121a26;
    --kg-line: rgba(255, 255, 255, 0.08);
    --kg-blue: #005eb8;
    --kg-cyan: #2ea3f2;
    --kg-text: #aab4c3;
    --kg-text-bright: #eef2f7;
    --kg-glow: rgba(46, 163, 242, 0.35);
}

body.kg-home {
    background-color: var(--kg-bg);
}

/* ---------- Shared section primitives ---------- */

.kg-section {
    position: relative;
    padding: 110px 0;
    background: var(--kg-bg);
    overflow: hidden;
}

.kg-section.kg-alt {
    background: var(--kg-bg-alt);
}

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

.kg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--kg-cyan);
    margin-bottom: 18px;
}

.kg-eyebrow::before {
    content: '';
    display: block;
    width: 34px;
    height: 2px;
    background: linear-gradient(90deg, var(--kg-blue), var(--kg-cyan));
}

.kg-h2 {
    font-size: clamp(30px, 4.4vw, 46px);
    line-height: 1.12;
    color: var(--kg-text-bright);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 22px;
}

.kg-lead {
    font-size: 17px;
    line-height: 1.8;
    color: var(--kg-text);
    max-width: 640px;
}

/* Faint blueprint grid backdrop */
.kg-grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(46, 163, 242, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 163, 242, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    z-index: 1;
}

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

.kg-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 34px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
    will-change: transform;
}

.kg-btn svg {
    transition: transform 0.3s ease;
}

.kg-btn:hover svg {
    transform: translateX(4px);
}

.kg-btn-primary {
    background: linear-gradient(120deg, var(--kg-blue) 0%, #0a78dd 100%);
    color: #fff !important;
    box-shadow: 0 8px 28px rgba(0, 94, 184, 0.35);
}

.kg-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.55s ease;
}

.kg-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 94, 184, 0.5);
    color: #fff;
}

.kg-btn-primary:hover::after {
    left: 130%;
}

.kg-btn-ghost {
    background: transparent;
    color: var(--kg-text-bright) !important;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(4px);
}

.kg-btn-ghost:hover {
    transform: translateY(-3px);
    border-color: var(--kg-cyan);
    color: var(--kg-cyan) !important;
    box-shadow: 0 10px 30px rgba(46, 163, 242, 0.18);
}

/* ==============================================================
   HERO
   ============================================================== */

.kg-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--kg-bg);
}

.kg-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.kg-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kg-kenburns 24s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes kg-kenburns {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.12) translate(-1.5%, -1%); }
}

.kg-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(7, 11, 17, 0.94) 30%, rgba(7, 11, 17, 0.55) 65%, rgba(7, 11, 17, 0.35) 100%),
        linear-gradient(to top, var(--kg-bg) 0%, transparent 28%);
}

/* blueprint grid over the hero photo */
.kg-hero-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(46, 163, 242, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 163, 242, 0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, black 30%, transparent 75%);
    pointer-events: none;
}

.kg-hero-inner {
    position: relative;
    z-index: 2;
    width: 88%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 0 90px;
}

.kg-hero .kg-eyebrow {
    opacity: 0;
    animation: kg-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.kg-hero-title {
    font-size: clamp(40px, 6.6vw, 78px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--kg-text-bright);
    margin-bottom: 8px;
    max-width: 14ch;
}

/* staggered word reveal */
.kg-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.kg-word > span {
    display: inline-block;
    transform: translateY(110%);
    animation: kg-word-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.kg-word:nth-of-type(1) > span { animation-delay: 0.25s; }
.kg-word:nth-of-type(2) > span { animation-delay: 0.34s; }
.kg-word:nth-of-type(3) > span { animation-delay: 0.43s; }
.kg-word:nth-of-type(4) > span { animation-delay: 0.52s; }
.kg-word:nth-of-type(5) > span { animation-delay: 0.61s; }
.kg-word:nth-of-type(6) > span { animation-delay: 0.70s; }

@keyframes kg-word-up {
    to { transform: translateY(0); }
}

.kg-hero-title .kg-accent {
    background: linear-gradient(92deg, var(--kg-cyan) 0%, #7cc7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* the "toolpath" line that machines itself across */
.kg-toolpath {
    width: min(420px, 70%);
    height: 14px;
    margin: 22px 0 26px;
    opacity: 0;
    animation: kg-fade-in 0.4s ease 0.9s forwards;
}

.kg-toolpath path {
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: kg-draw 1.6s cubic-bezier(0.65, 0, 0.35, 1) 1s forwards;
}

.kg-toolpath circle {
    opacity: 0;
    animation: kg-fade-in 0.3s ease 2.5s forwards, kg-pulse 2.2s ease-in-out 2.6s infinite;
}

@keyframes kg-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes kg-pulse {
    0%, 100% { r: 4; opacity: 1; }
    50%      { r: 6; opacity: 0.5; }
}

.kg-hero-sub {
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.75;
    color: var(--kg-text);
    max-width: 560px;
    margin-bottom: 38px;
    opacity: 0;
    animation: kg-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.05s forwards;
}

.kg-hero-sub strong {
    color: var(--kg-text-bright);
    font-weight: 700;
}

.kg-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    opacity: 0;
    animation: kg-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.25s forwards;
}

/* quick trust chips under CTAs */
.kg-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 42px;
    opacity: 0;
    animation: kg-fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.45s forwards;
}

.kg-hero-chips span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--kg-text);
    letter-spacing: 0.4px;
}

.kg-hero-chips svg {
    flex: none;
    color: var(--kg-cyan);
}

/* scroll cue */
.kg-scroll-cue {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    opacity: 0;
    animation: kg-fade-in 0.6s ease 2s forwards;
}

.kg-scroll-cue::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--kg-cyan);
    animation: kg-scroll-drop 1.8s ease-in-out infinite;
}

@keyframes kg-scroll-drop {
    0%   { transform: translateY(0); opacity: 1; }
    70%  { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

@keyframes kg-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes kg-fade-in {
    to { opacity: 1; }
}

/* ==============================================================
   STATS BAND
   ============================================================== */

.kg-stats {
    position: relative;
    background: var(--kg-bg);
    padding: 0 0 90px;
}

.kg-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--kg-line);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    overflow: hidden;
}

.kg-stat {
    padding: 38px 28px;
    text-align: center;
    position: relative;
}

.kg-stat + .kg-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22%;
    height: 56%;
    width: 1px;
    background: var(--kg-line);
}

.kg-stat-num {
    font-size: clamp(38px, 4.6vw, 56px);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--kg-text-bright);
    line-height: 1;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.kg-stat-num .kg-suffix {
    color: var(--kg-cyan);
}

.kg-stat-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--kg-text);
}

.kg-stat-tick {
    width: 26px;
    height: 3px;
    margin: 0 auto 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--kg-blue), var(--kg-cyan));
    box-shadow: 0 0 14px var(--kg-glow);
}

/* ==============================================================
   SERVICES — tilt cards
   ============================================================== */

.kg-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 50px;
}

.kg-card {
    position: relative;
    background: var(--kg-panel);
    border: 1px solid var(--kg-line);
    border-radius: 12px;
    padding: 36px 28px;
    transform-style: preserve-3d;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
    will-change: transform;
}

.kg-card:hover {
    border-color: rgba(46, 163, 242, 0.45);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(46, 163, 242, 0.12);
}

.kg-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(46, 163, 242, 0.10), transparent 45%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.kg-card:hover::before {
    opacity: 1;
}

.kg-card-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 24px;
    color: var(--kg-cyan);
    transform: translateZ(30px);
}

.kg-card-icon svg {
    width: 100%;
    height: 100%;
}

/* icons draw themselves in on reveal */
.kg-draw-icon path,
.kg-draw-icon circle,
.kg-draw-icon rect,
.kg-draw-icon line,
.kg-draw-icon polygon,
.kg-draw-icon polyline {
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
}

.kg-revealed .kg-draw-icon path,
.kg-revealed .kg-draw-icon circle,
.kg-revealed .kg-draw-icon rect,
.kg-revealed .kg-draw-icon line,
.kg-revealed .kg-draw-icon polygon,
.kg-revealed .kg-draw-icon polyline {
    animation: kg-draw-icon 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes kg-draw-icon {
    to { stroke-dashoffset: 0; }
}

.kg-card h3 {
    font-size: 19px;
    color: var(--kg-text-bright);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
    transform: translateZ(20px);
}

.kg-card p {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--kg-text);
    margin: 0;
    transform: translateZ(10px);
}

/* ==============================================================
   CAPABILITIES (image + checklist)
   ============================================================== */

.kg-cap-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 64px;
    align-items: center;
}

.kg-cap-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.kg-cap-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.kg-cap-media:hover img {
    transform: scale(1.05);
}

.kg-cap-media::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    pointer-events: none;
}

/* corner brackets, like a measurement viewport */
.kg-cap-media .kg-bracket {
    position: absolute;
    width: 34px;
    height: 34px;
    border-color: var(--kg-cyan);
    border-style: solid;
    border-width: 0;
    z-index: 2;
}

.kg-cap-media .kg-bracket.tl { top: 14px; left: 14px; border-top-width: 3px; border-left-width: 3px; }
.kg-cap-media .kg-bracket.br { bottom: 14px; right: 14px; border-bottom-width: 3px; border-right-width: 3px; }

.kg-checklist {
    list-style: none;
    margin: 34px 0 40px;
    padding: 0;
    display: grid;
    gap: 18px;
}

.kg-checklist li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    font-size: 16px;
    color: var(--kg-text);
    line-height: 1.6;
}

.kg-checklist li strong {
    color: var(--kg-text-bright);
}

.kg-check {
    flex: none;
    width: 26px;
    height: 26px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(46, 163, 242, 0.12);
    border: 1px solid rgba(46, 163, 242, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kg-cyan);
}

/* ==============================================================
   QUOTE TOOL SPOTLIGHT
   ============================================================== */

.kg-quote {
    background:
        radial-gradient(900px 420px at 78% 50%, rgba(0, 94, 184, 0.16), transparent 70%),
        var(--kg-bg-alt);
}

.kg-quote-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.kg-quote-steps {
    display: grid;
    gap: 14px;
    margin: 30px 0 38px;
}

.kg-quote-step {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15.5px;
    color: var(--kg-text);
}

.kg-quote-step b {
    color: var(--kg-text-bright);
    font-weight: 700;
}

.kg-step-num {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--kg-panel);
    border: 1px solid var(--kg-line);
    color: var(--kg-cyan);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kg-note {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    max-width: 560px;
    margin: 0 0 34px;
    padding: 15px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 193, 90, 0.32);
    background: rgba(255, 193, 90, 0.07);
    font-size: 14px;
    line-height: 1.65;
    color: var(--kg-text);
}

.kg-note svg {
    flex: none;
    margin-top: 1px;
    color: #ffc15a;
}

.kg-note strong {
    color: var(--kg-text-bright);
    font-weight: 700;
}

/* the scanner panel */
.kg-scanner {
    position: relative;
    aspect-ratio: 1 / 0.92;
    max-width: 460px;
    margin: 0 auto;
    background: var(--kg-panel);
    border: 1px solid var(--kg-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.kg-scanner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(46, 163, 242, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 163, 242, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
}

.kg-scanner-part {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kg-scanner-part svg {
    width: 62%;
    height: 62%;
    color: var(--kg-cyan);
    animation: kg-rotate 26s linear infinite;
    filter: drop-shadow(0 0 18px rgba(46, 163, 242, 0.25));
}

@keyframes kg-rotate {
    to { transform: rotate(360deg); }
}

.kg-scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--kg-cyan), transparent);
    box-shadow: 0 0 24px 4px var(--kg-glow);
    animation: kg-scan 3.4s ease-in-out infinite;
}

@keyframes kg-scan {
    0%, 100% { top: 8%; }
    50%      { top: 90%; }
}

.kg-scanner-readout {
    position: absolute;
    left: 18px;
    bottom: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--kg-cyan);
    opacity: 0.9;
}

.kg-scanner-readout span {
    display: block;
    line-height: 1.7;
}

.kg-blink {
    animation: kg-blink 1.1s step-end infinite;
}

@keyframes kg-blink {
    50% { opacity: 0; }
}

/* ==============================================================
   WORK GALLERY
   ============================================================== */

.kg-work-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.kg-work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 230px;
    gap: 16px;
    margin-top: 50px;
}

.kg-work-grid .gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--kg-line);
}

.kg-work-grid .gallery-item.kg-tall { grid-row: span 2; }
.kg-work-grid .gallery-item.kg-wide { grid-column: span 2; }

.kg-work-grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
    filter: saturate(0.85);
}

.kg-work-grid .gallery-item:hover img {
    transform: scale(1.08);
    filter: saturate(1.05);
}

.kg-work-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 44px 18px 14px;
    background: linear-gradient(to top, rgba(7, 11, 17, 0.92), transparent);
    color: var(--kg-text-bright);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
    pointer-events: none;
}

.kg-work-grid .gallery-item:hover .kg-work-caption {
    transform: translateY(0);
    opacity: 1;
}

.kg-link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--kg-cyan) !important;
    white-space: nowrap;
}

.kg-link-arrow svg {
    transition: transform 0.3s ease;
}

.kg-link-arrow:hover svg {
    transform: translateX(5px);
}

/* ==============================================================
   VIDEO
   ============================================================== */

.kg-video-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--kg-line);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.kg-video-wrap video {
    display: block;
    width: 100%;
    height: auto;
}

/* ==============================================================
   INDUSTRIES MARQUEE
   ============================================================== */

.kg-marquee-section {
    padding: 90px 0;
}

.kg-marquee {
    overflow: hidden;
    margin-top: 44px;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.kg-marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: kg-marquee 36s linear infinite;
}

.kg-marquee:hover .kg-marquee-track {
    animation-play-state: paused;
}

.kg-marquee.kg-reverse .kg-marquee-track {
    animation-direction: reverse;
    animation-duration: 42s;
}

.kg-marquee + .kg-marquee {
    margin-top: 16px;
}

@keyframes kg-marquee {
    to { transform: translateX(-50%); }
}

.kg-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: var(--kg-panel);
    border: 1px solid var(--kg-line);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: var(--kg-text-bright);
    white-space: nowrap;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.kg-chip:hover {
    border-color: rgba(46, 163, 242, 0.5);
    color: var(--kg-cyan);
}

.kg-chip svg {
    color: var(--kg-cyan);
    flex: none;
}

/* ==============================================================
   ABOUT / SEO BLOCK
   ============================================================== */

.kg-about p {
    color: var(--kg-text);
    font-size: 16px;
    line-height: 1.85;
    max-width: 820px;
}

.kg-about .kg-h2 {
    max-width: 880px;
    font-size: clamp(26px, 3.4vw, 38px);
}

/* ==============================================================
   FINAL CTA
   ============================================================== */

.kg-cta {
    position: relative;
    padding: 150px 0;
    overflow: hidden;
    text-align: center;
}

.kg-cta-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: kg-kenburns 26s ease-in-out infinite alternate;
}

.kg-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(7, 11, 17, 0.86);
}

.kg-cta .kg-container {
    z-index: 3;
}

.kg-cta .kg-h2 {
    margin-left: auto;
    margin-right: auto;
}

.kg-cta .kg-lead {
    margin: 0 auto 42px;
}

.kg-cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==============================================================
   SCROLL REVEAL (driven by home-redesign.js)
   ============================================================== */

.kg-reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--kg-delay, 0s);
}

.kg-reveal.kg-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================================================
   RESPONSIVE
   ============================================================== */

@media (max-width: 1024px) {
    .kg-services-grid { grid-template-columns: repeat(2, 1fr); }
    .kg-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .kg-stat:nth-child(3)::before { display: none; }
    .kg-stat:nth-child(-n+2) { border-bottom: 1px solid var(--kg-line); }
    .kg-cap-grid, .kg-quote-grid { grid-template-columns: 1fr; gap: 44px; }
    .kg-work-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 210px; }
}

@media (max-width: 640px) {
    .kg-section { padding: 76px 0; }
    .kg-hero-inner { padding: 120px 0 80px; }
    .kg-services-grid { grid-template-columns: 1fr; }
    .kg-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .kg-stat { padding: 28px 14px; }
    .kg-work-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
    .kg-work-grid .gallery-item.kg-wide { grid-column: span 1; }
    .kg-work-grid .gallery-item.kg-tall { grid-row: span 1; }
    .kg-hero-ctas .kg-btn { width: 100%; justify-content: center; }
    .kg-cta { padding: 100px 0; }
    .kg-scroll-cue { display: none; }
}

/* ==============================================================
   REDUCED MOTION — respect user preference
   ============================================================== */

@media (prefers-reduced-motion: reduce) {
    .kg-hero-media img,
    .kg-cta-bg,
    .kg-scanner-part svg,
    .kg-scan-line,
    .kg-marquee-track,
    .kg-scroll-cue::before {
        animation: none !important;
    }

    .kg-hero .kg-eyebrow,
    .kg-hero-sub,
    .kg-hero-ctas,
    .kg-hero-chips,
    .kg-toolpath,
    .kg-scroll-cue {
        opacity: 1;
        animation: none !important;
    }

    .kg-word > span {
        transform: none;
        animation: none !important;
    }

    .kg-toolpath path { stroke-dashoffset: 0; animation: none !important; }
    .kg-toolpath circle { opacity: 1; animation: none !important; }

    .kg-draw-icon path, .kg-draw-icon circle, .kg-draw-icon rect,
    .kg-draw-icon line, .kg-draw-icon polygon, .kg-draw-icon polyline {
        stroke-dashoffset: 0 !important;
        animation: none !important;
    }

    .kg-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .kg-marquee-track {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
}
