/* ============================================================
   Isolations J. Raymond — premium dark industrial design
   ============================================================ */

:root {
    --bg: #ffffff;
    --bg-raise: #f4f7f9;
    --line: rgba(16, 22, 28, 0.1);
    --text: #10161c;
    --muted: #5c6a75;
    --accent: #00aeef;
    --accent-soft: rgba(0, 174, 239, 0.1);
    --dark: #0c1014;
    --dark-line: rgba(255, 255, 255, 0.12);
    --light-on-dark: #eef2f5;
    --muted-on-dark: #93a0ab;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.container {
    width: min(1240px, 92vw);
    margin-inline: auto;
}

/* ===== Reveal animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(8px);
    transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Entrance stagger helpers */
.d1 { transition-delay: 0.05s; }
.d2 { transition-delay: 0.18s; }
.d3 { transition-delay: 0.32s; }
.d4 { transition-delay: 0.46s; }

/* Grid stagger */
.service-grid .service-card:nth-child(2), .contact-grid .contact-card:nth-child(2) { transition-delay: 0.1s; }
.service-grid .service-card:nth-child(3), .contact-grid .contact-card:nth-child(3) { transition-delay: 0.2s; }
.service-grid .service-card:nth-child(4), .contact-grid .contact-card:nth-child(4) { transition-delay: 0.3s; }
.service-grid .service-card:nth-child(5) { transition-delay: 0.4s; }
.service-grid .service-card:nth-child(6) { transition-delay: 0.5s; }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.12s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.24s; }
.value-list li:nth-child(2) { transition-delay: 0.08s; }
.value-list li:nth-child(3) { transition-delay: 0.16s; }
.value-list li:nth-child(4) { transition-delay: 0.24s; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: 4px;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Shine sweep on hover */
.btn-solid::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.6s var(--ease);
}

.btn-solid:hover::after { left: 130%; }

.btn-lg { padding: 18px 36px; font-size: 1rem; }

.btn-solid {
    background: var(--accent);
    color: #04121a;
}

.btn-solid:hover {
    background: #2fc0f7;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 174, 239, 0.25);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--light-on-dark);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ===== Header ===== */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 18px 0;
    transition: all 0.4s var(--ease);
}

.header.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.header.scrolled .brand-name { color: #10161c; }
.header.scrolled .nav-link { color: #4b565f; }
.header.scrolled .nav-link:hover { color: #10161c; }
.header.scrolled .lang-toggle { color: #4b565f; border-color: rgba(0, 0, 0, 0.15); }
.header.scrolled .lang-toggle:hover { color: var(--accent); border-color: var(--accent); }
.header.scrolled .menu-toggle span { background: #10161c; }
.header.scrolled .brand-logo { border: 1px solid rgba(0, 0, 0, 0.08); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    height: 46px;
    width: 46px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: var(--light-on-dark);
}

.brand-name strong { color: var(--accent); font-weight: 700; }

.nav {
    display: flex;
    gap: 36px;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(238, 242, 245, 0.75);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s var(--ease);
}

.nav-link:hover { color: var(--light-on-dark); }
.nav-link:hover::after { width: 100%; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-toggle {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(238, 242, 245, 0.75);
    border: 1px solid var(--dark-line);
    border-radius: 4px;
    padding: 8px 14px;
    transition: all 0.3s;
}

.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }

.header-cta { padding: 11px 22px; font-size: 0.88rem; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 7px;
    padding: 6px;
}

.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--light-on-dark);
    transition: all 0.35s var(--ease);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ===== Mobile menu ===== */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(12, 16, 20, 0.97);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease);
}

.mobile-menu.active { opacity: 1; visibility: visible; }

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--light-on-dark);
    transition: color 0.3s;
}

.mobile-link:hover { color: var(--accent); }

.mobile-cta { margin-top: 12px; }
.mobile-lang { margin-top: 4px; color: rgba(238, 242, 245, 0.75); border-color: var(--dark-line); }

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 120px;
    background: var(--dark);
    color: var(--light-on-dark);
}

.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    filter: grayscale(1);
    will-change: filter, transform;
    animation: heroZoom 8s var(--ease) forwards;
}

@keyframes heroZoom {
    to { transform: scale(1); }
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12,16,20,0.55) 0%, rgba(12,16,20,0.25) 40%, rgba(12,16,20,0.92) 100%),
        linear-gradient(90deg, rgba(12,16,20,0.82) 0%, rgba(12,16,20,0.35) 60%, rgba(12,16,20,0.2) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding-bottom: 64px;
}

.hero-kicker {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}

.kicker-line {
    display: inline-block;
    width: 56px;
    height: 2px;
    background: var(--accent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6.5vw, 5.2rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    max-width: 18ch;
}

.hero-title em,
.section-title em {
    font-style: normal;
    color: var(--accent);
}

.hero-lede {
    max-width: 54ch;
    font-size: 1.08rem;
    color: rgba(238, 242, 245, 0.82);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 28px 0 36px;
    gap: 32px;
    transition-delay: 0.25s;
}

.strip-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.strip-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-on-dark);
}

.strip-value {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 600;
}

/* ===== Sections ===== */
.section {
    padding: 130px 0;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.section-index {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

.section-tag {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    padding-left: 42px;
}

.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--line);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
    max-width: 22ch;
}

/* ===== About ===== */
.about {
    border-top: 1px solid var(--line);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
}

.about-grid .section-title { position: sticky; top: 120px; margin-bottom: 0; }

.about-body p {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.value-list {
    list-style: none;
    margin-top: 40px;
    display: grid;
    gap: 0;
}

.value-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
}

.value-list li:last-child { border-bottom: 1px solid var(--line); }

.value-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-soft);
    flex-shrink: 0;
    position: relative;
}

.value-check::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    width: 5px;
    height: 9px;
    border: solid var(--accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== Services ===== */
.services {
    background: var(--bg-raise);
    border-block: 1px solid var(--line);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 26px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: all 0.4s var(--ease);
}

.service-card:hover {
    border-color: rgba(0, 174, 239, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(16, 22, 28, 0.1);
}

.service-card.featured {
    border-color: rgba(0, 174, 239, 0.45);
    background: linear-gradient(160deg, rgba(0, 174, 239, 0.07) 0%, var(--bg) 55%);
}

.service-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.service-num {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--muted);
    transition: color 0.3s;
}

.service-card:hover .service-num { color: var(--accent); }

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.3;
}

.service-card p {
    color: var(--muted);
    font-size: 0.92rem;
}

.service-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.service-tags span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 30px;
    color: var(--muted);
    white-space: nowrap;
}

.service-tags .tag-accent {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* ===== Projects ===== */
.projects-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-auto-rows: 300px;
    gap: 24px;
}

.project-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--line);
}

.project-card.span-tall {
    grid-row: span 2;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.project-card:hover img { transform: scale(1.05); }

.project-info {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px;
    background: linear-gradient(180deg, transparent 0%, rgba(8, 11, 14, 0.92) 55%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateY(8px);
    transition: transform 0.5s var(--ease);
}

.project-card:hover .project-info { transform: translateY(0); }

.project-loc {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
}

.project-info p {
    color: rgba(238, 242, 245, 0.75);
    font-size: 0.9rem;
    max-width: 52ch;
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(8, 11, 14, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s var(--ease);
}

.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-figure {
    max-width: min(1100px, 88vw);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lightbox-figure img {
    max-height: 74vh;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    border-radius: 6px;
}

.lightbox-figure figcaption {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--muted-on-dark);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--muted-on-dark);
    transition: color 0.3s;
}

.lightbox-close:hover { color: var(--light-on-dark); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    line-height: 1;
    color: var(--muted-on-dark);
    padding: 20px;
    transition: color 0.3s;
}

.lightbox-nav:hover { color: var(--accent); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ===== Contact ===== */
.contact {
    background: var(--bg-raise);
    border-top: 1px solid var(--line);
}

.contact-lede {
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 52ch;
    margin: -24px 0 48px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 36px 32px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: all 0.4s var(--ease);
}

.contact-card:hover {
    border-color: rgba(0, 174, 239, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(16, 22, 28, 0.1);
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.contact-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
}

.contact-note {
    color: var(--muted);
    font-size: 0.9rem;
}

.contact-arrow {
    position: absolute;
    top: 28px;
    right: 28px;
    font-size: 1.3rem;
    color: var(--muted);
    transition: all 0.35s var(--ease);
}

.contact-card:hover .contact-arrow {
    color: var(--accent);
    transform: translate(3px, -3px);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--light-on-dark);
    padding: 64px 0 0;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 48px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 480px;
}

.footer-brand .brand-logo { height: 54px; width: 54px; }

.footer-brand p { color: var(--muted-on-dark); font-size: 0.95rem; }

.footer-nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-nav a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--muted-on-dark);
    transition: color 0.3s;
}

.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--dark-line);
    padding: 24px 0;
}

.footer-bottom p {
    color: var(--muted-on-dark);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
    .nav { display: none; }
    .header-cta { display: none; }
    .header .lang-toggle { display: none; }
    .menu-toggle { display: flex; }

    .service-grid { grid-template-columns: repeat(2, 1fr); }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-grid .section-title { position: static; }

    .hero-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 820px) {
    .section { padding: 90px 0; }

    .service-grid { grid-template-columns: 1fr; }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }

    .project-card.span-tall { grid-row: span 1; }

    .contact-grid { grid-template-columns: 1fr; }

    .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
    .hero-inner { padding-bottom: 40px; }

    .hero-strip {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 24px 0;
    }

    .hero-actions .btn { width: 100%; }

    .brand-name { display: none; }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; filter: none; transition: none; }
    .hero-media img { animation: none; transform: none; filter: none; }
    html { scroll-behavior: auto; }
}
