/**
 * Kahina Studio — Main Stylesheet
 * © Kahina Studio. Tous droits réservés.
 */

/* ══════════════════════════════════════════
   Fonts
   ══════════════════════════════════════════ */
@font-face {
    font-family: 'NHaasGrotesk';
    src: url('../fonts/NHaasGroteskDSPro-75Bd.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'NHaasGrotesk';
    src: url('../fonts/NHaasGroteskDSPro-55Rg.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ══════════════════════════════════════════
   CSS Variables (overridden by Customizer)
   ══════════════════════════════════════════ */
:root {
    --kahina-primary: #050505;
    --kahina-accent: #ff4444;
    --kahina-bg: #F9F9F9;
    --kahina-preloader-bg: #050505;
    --kahina-text: #050505;
    --kahina-text-muted: #666666;
    --kahina-border: rgba(0, 0, 0, 0.1);

    --kahina-header-height: 80px;
    --kahina-container: 1340px;
    --kahina-gutter: 20px;
    --kahina-header-gutter: 50px;   /* v7.1: logo/burger distance from screen edge */

    --kahina-font-body: 'NHaasGrotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --kahina-font-display: 'NHaasGrotesk', var(--kahina-font-body);

    --kahina-ease: cubic-bezier(0.76, 0, 0.24, 1);
    --kahina-ease-out: cubic-bezier(0.33, 1, 0.68, 1);
}


/* ══════════════════════════════════════════
   Reset
   ══════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--kahina-font-body);
    background-color: var(--kahina-bg);
    color: var(--kahina-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

ul, ol {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}


/* ══════════════════════════════════════════
   Layout
   ══════════════════════════════════════════ */
.container {
    width: 100%;
    max-width: var(--kahina-container);
    margin: 0 auto;
    padding: 0 var(--kahina-gutter);
}


/* ══════════════════════════════════════════
   Preloader
   ══════════════════════════════════════════ */
.preloader {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10099;
}

.preloader .bg {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--kahina-preloader-bg);
    backface-visibility: hidden;
    will-change: transform;
}

.preloader .preloader-container {
    width: 100%;
    padding: 0 var(--kahina-header-gutter);
}

/* v7: match header-inner centering for seamless logo handoff */
.preloader .logo-outer {
    height: var(--kahina-header-height);
    display: flex;
    align-items: center;
}

.preloader .logo-preload {
    width: 137px;
    height: 20px;
    position: relative;
    transform: translate3d(0px, calc(50vh - 50%), 0px);
    overflow: hidden;
}

.preloader .logo-preload path {
    fill: #F9F9F9;
}

.preloader .logo-preload .letter {
    transform: translateY(150%);
}

.preloader .logo-preload .copy {
    opacity: 0;
}


/* ══════════════════════════════════════════
   Header
   ══════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    padding: 0 var(--kahina-header-gutter);
    background: transparent;
}

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

.site-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

/* v7: consolidated logo sizing — .site-logo .logo-img wins specificity (0,2,0) */
.site-logo img,
.site-logo .custom-logo {
    height: auto;
    width: auto;
    max-height: 30px;
}

.site-logo .logo-img {
    width: 137px;
    height: 20px;
    transition: filter 0.6s var(--kahina-ease);
}

/* Hide header elements during preloader (revealed by preloader.js) */
.has-preloader .logo-img,
.has-preloader .menu-toggle .bar {
    opacity: 0;
}

/* Nav list — always fullscreen overlay */
.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.nav-list a {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    display: inline-block;
    color: var(--kahina-text);
}

.nav-text {
    display: inline-block;
    transition: transform 0.3s var(--kahina-ease);
}

.nav-list a:hover .nav-text {
    transform: translateY(-2px);
}

/* Menu toggle (hamburger) — always visible */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    padding: 10px;
    margin-right: -10px;            /* v7.1: compensate padding so bars sit at edge */
}

.menu-toggle .bar {
    display: block;
    width: 28px;
    height: 2px;
    background: #fff;
    transition: background 0.6s var(--kahina-ease), transform 0.3s var(--kahina-ease), opacity 0.3s var(--kahina-ease);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Fullscreen nav overlay — sits OUTSIDE header in DOM to avoid stacking context */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--kahina-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    z-index: 10050;
    visibility: hidden;
}

.main-nav.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* When menu is open — force dark logo + dark burger */
body.menu-open .logo-img {
    filter: brightness(0) !important;
}
body.menu-open .menu-toggle .bar {
    background: var(--kahina-primary) !important;
}
/* Header, burger & logo must sit above overlay when menu is open */
body.menu-open .site-header {
    z-index: 10051;
}
body.menu-open .menu-toggle {
    z-index: 10052;
}
body.menu-open .site-logo {
    z-index: 10052;
    position: relative;
}

/* ── Header color states (synced with hero flip) ── */
/* Default: dark hero bg → white logo/burger (SVG is white) */
.site-header.hero-dark .logo-img { filter: none; }
.site-header.hero-dark .menu-toggle .bar { background: #fff; }

/* After flip: light hero bg → dark logo/burger */
.site-header.hero-light .logo-img { filter: brightness(0); }
.site-header.hero-light .menu-toggle .bar { background: var(--kahina-primary); }

/* When menu overlay is open — handled by body.menu-open rules above */

/* Smooth transitions for header color flip */
.site-logo img,
.site-logo svg,
.custom-logo-link { transition: filter 0.6s var(--kahina-ease); }


/* ══════════════════════════════════════════
   Main content
   ══════════════════════════════════════════ */
.site-main {
    min-height: 100vh;
    padding-top: var(--kahina-header-height);
}

/* Front page: hero goes behind transparent header */
.home .site-main {
    padding-top: 0;
}


/* ══════════════════════════════════════════
   Hero (base — à personnaliser)
   ══════════════════════════════════════════ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem var(--kahina-gutter);
}

.hero-title {
    font-family: var(--kahina-font-display);
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--kahina-text-muted);
    margin-top: 1rem;
    font-weight: 300;
}


/* ══════════════════════════════════════════
   Hero — Pixel Flip (Three.js)
   ══════════════════════════════════════════ */
.hero-pixel-flip {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    cursor: crosshair;
    background: var(--kahina-primary);
}

.hero-pixel-flip canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#pixel-flip-lines {
    z-index: 1;
    pointer-events: none;
}

/* ── Hero overlays (above Three.js, below lines) ── */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s var(--kahina-ease);
}

.hero-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── STATE 1 — Photo only (right half, after flip) ── */
.hero-state-1 {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
}

/* ── Image half ── */
.hero-state-1-image {
    width: 50%;
    position: relative;
    overflow: hidden;
}

.hero-parallax-wrap {
    position: absolute;
    inset: -20% 0;   /* extra height for parallax travel */
    will-change: transform;
}

.hero-parallax-wrap img,
.hero-parallax-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ══════════════════════════════════════════
   Shared — Sections
   ══════════════════════════════════════════ */
.section {
    padding: 120px 0;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kahina-text-muted);
    margin-bottom: 24px;
}

.section-heading {
    font-family: var(--kahina-font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--kahina-text);
    transition: gap 0.3s var(--kahina-ease);
}

.text-link:hover {
    gap: 14px;
}

.text-link .arrow {
    transition: transform 0.3s var(--kahina-ease);
}

.text-link:hover .arrow {
    transform: translateX(4px);
}


/* ══════════════════════════════════════════
   Section — Intro
   ══════════════════════════════════════════ */
.section-intro {
    padding: 140px 0 120px;
}

.section-intro .container {
    max-width: 960px;
}

.intro-heading {
    font-family: var(--kahina-font-display);
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.intro-body p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--kahina-text-muted);
    margin-bottom: 24px;
    max-width: 600px;
}


/* ══════════════════════════════════════════
   Section — Services
   ══════════════════════════════════════════ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--kahina-border);
    border: 1px solid var(--kahina-border);
}

.service-card {
    background: var(--kahina-bg);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: background 0.3s var(--kahina-ease);
}

.service-card:hover {
    background: var(--kahina-text);
    color: var(--kahina-bg);
}

.service-index {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--kahina-text-muted);
    transition: color 0.3s var(--kahina-ease);
}

.service-card:hover .service-index {
    color: rgba(249, 249, 249, 0.5);
}

.service-title {
    font-family: var(--kahina-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.service-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--kahina-text-muted);
    flex: 1;
    transition: color 0.3s var(--kahina-ease);
}

.service-card:hover .service-desc {
    color: rgba(249, 249, 249, 0.7);
}

.service-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s var(--kahina-ease);
    align-self: flex-end;
}

.service-card:hover .service-arrow {
    transform: translateX(6px);
}


/* ══════════════════════════════════════════
   Section — Work (Masonry)
   ══════════════════════════════════════════ */
.section-work-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
}

.section-work-header .section-heading {
    margin-bottom: 0;
}

.work-masonry {
    display: grid;
    grid-template-columns: 32fr 28fr 27fr;
    grid-template-rows: 200px 200px 200px 200px;
    gap: 12px;
}

.work-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.work-thumbnail {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.04);
    position: relative;
}

.work-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.08) 100%);
}

.work-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--kahina-ease);
}

.work-card:hover .work-thumbnail img {
    transform: scale(1.04);
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0 0;
}

.work-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.work-category {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--kahina-text-muted);
}

/* Grid placement — wireframe layout
   4 rows x 3 cols, each row 200px
   1: col1, row1-2 (tall left)
   2: col2, row1 (top mid)
   3: col3, row1 (short top right)
   4: col2, row2 (under 2)
   5: col3, row2-4 (tall right, bottom-aligned with 6,7)
   6: col1, row3-4 (bottom left)
   7: col2, row3-4 (bottom mid)
*/
.work-card--1 { grid-column: 1; grid-row: 1 / 3; }
.work-card--2 { grid-column: 2; grid-row: 1; }
.work-card--3 { grid-column: 3; grid-row: 1; }
.work-card--4 { grid-column: 2; grid-row: 2; }
.work-card--5 { grid-column: 3; grid-row: 2 / 5; }
.work-card--6 { grid-column: 1; grid-row: 3 / 5; }
.work-card--7 { grid-column: 2; grid-row: 3 / 5; }


/* ══════════════════════════════════════════
   Section — Approach
   ══════════════════════════════════════════ */
.approach-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.approach-step {
    padding-top: 24px;
    border-top: 1px solid var(--kahina-border);
}

.step-num {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--kahina-text-muted);
    display: block;
    margin-bottom: 16px;
}

.step-title {
    font-family: var(--kahina-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--kahina-text-muted);
}


/* ══════════════════════════════════════════
   Section — Testimonials
   ══════════════════════════════════════════ */
.testimonials-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
}

.testimonial {
    border: none;
    padding: 0;
    margin: 0;
    font-style: normal;
}

.testimonial-quote {
    font-family: var(--kahina-font-display);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.testimonial-role {
    font-size: 0.8rem;
    color: var(--kahina-text-muted);
}


/* ══════════════════════════════════════════
   Section — CTA
   ══════════════════════════════════════════ */
.section-cta {
    padding: 140px 0;
    text-align: center;
}

.cta-heading {
    font-family: var(--kahina-font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.cta-sub {
    font-size: 1.1rem;
    color: var(--kahina-text-muted);
    margin-bottom: 40px;
}

.btn-primary {
    display: inline-block;
    padding: 16px 48px;
    background: var(--kahina-text);
    color: var(--kahina-bg);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--kahina-text);
    transition: all 0.3s var(--kahina-ease);
}

.btn-primary:hover {
    background: transparent;
    color: var(--kahina-text);
}


/* ══════════════════════════════════════════
   Footer
   ══════════════════════════════════════════ */
.site-footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--kahina-border);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.footer-logo img {
    width: 120px;
    height: auto;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--kahina-text-muted);
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--kahina-text-muted);
    margin-bottom: 16px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 0.9rem;
    color: var(--kahina-text);
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--kahina-text-muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--kahina-border);
}

.footer-bottom p,
.footer-bottom a {
    font-size: 0.8rem;
    color: var(--kahina-text-muted);
}

.footer-bottom a:hover {
    color: var(--kahina-text);
}


/* ══════════════════════════════════════════
   Utility classes
   ══════════════════════════════════════════ */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border: 1px solid var(--kahina-text);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s var(--kahina-ease);
}

.btn:hover {
    background: var(--kahina-text);
    color: var(--kahina-bg);
}

/* 404 */
.error-404 {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-404 h1 {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 800;
    line-height: 1;
    opacity: 0.2;
}

.error-404 p {
    margin: 1rem 0 2rem;
    font-size: 1.2rem;
    color: var(--kahina-text-muted);
}

/* Lock scroll when menu is open */
body.menu-open {
    overflow: hidden;
}


/* ══════════════════════════════════════════
   Header — scrolled state (transparent, no bg)
   ══════════════════════════════════════════ */


/* ══════════════════════════════════════════
   Scroll progress bar
   ══════════════════════════════════════════ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--kahina-accent);
    transform-origin: left center;
    transform: scaleX(0);
    z-index: 1001;
}


/* ══════════════════════════════════════════
   Archive
   ══════════════════════════════════════════ */
.archive-section {
    padding: 6rem 0;
}

.archive-header {
    margin-bottom: 3rem;
}

.archive-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
}

.archive-description {
    color: var(--kahina-text-muted);
    margin-top: 0.5rem;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.archive-item-image {
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.archive-item-image img {
    transition: transform 0.6s var(--kahina-ease);
}

.archive-item-image:hover img {
    transform: scale(1.05);
}

.archive-item-content {
    margin-top: 1rem;
}

.archive-item-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.archive-item-content h2 a:hover {
    color: var(--kahina-accent);
}

.entry-excerpt {
    color: var(--kahina-text-muted);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}


/* ══════════════════════════════════════════
   Pagination
   ══════════════════════════════════════════ */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--kahina-border);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.pagination a:hover {
    border-color: var(--kahina-text);
}

.pagination .current {
    background: var(--kahina-text);
    color: var(--kahina-bg);
    border-color: var(--kahina-text);
}


/* ══════════════════════════════════════════
   Search
   ══════════════════════════════════════════ */
.search-section {
    padding: 6rem 0;
}

.search-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
}

.search-title span {
    color: var(--kahina-accent);
}

.search-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--kahina-border);
}

.search-item h2 {
    font-size: 1.2rem;
}

.search-item h2 a:hover {
    color: var(--kahina-accent);
}

.search-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--kahina-border);
    color: var(--kahina-text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    border-color: var(--kahina-text);
}

.no-results {
    text-align: center;
    padding: 4rem 0;
}

.no-results p {
    margin-bottom: 2rem;
    color: var(--kahina-text-muted);
}

.no-results .search-form {
    margin: 0 auto;
}


/* ══════════════════════════════════════════
   Comments
   ══════════════════════════════════════════ */
.comments-area {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--kahina-border);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
}

.comment-list .comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--kahina-border);
}

.comment-list .comment .comment-author {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.comment-list .comment .comment-meta {
    font-size: 0.8rem;
    color: var(--kahina-text-muted);
    margin-bottom: 0.5rem;
}

.comment-respond {
    margin-top: 2rem;
}

.comment-respond .comment-reply-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--kahina-text-muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid var(--kahina-border);
    color: var(--kahina-text);
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--kahina-text);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
}


/* ══════════════════════════════════════════
   Sidebar layout
   ══════════════════════════════════════════ */
.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.widget-area {
    position: sticky;
    top: calc(var(--kahina-header-height) + 2rem);
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--kahina-border);
}


/* ══════════════════════════════════════════
   Cursor
   ══════════════════════════════════════════ */
.has-custom-cursor,
.has-custom-cursor * {
    cursor: none !important;
}

.cursor {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: #050505;
    border-radius: 50%;
    position: fixed;
    top: -4px;
    left: -4px;
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    position: fixed;
    top: -20px;
    left: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #050505;
    white-space: nowrap;
    opacity: 0;
}

/* ══════════════════════════════════════════
   Page — Contact
   ══════════════════════════════════════════ */
.contact-hero {
    padding: 160px 0 80px;
}

.contact-hero-title {
    font-family: var(--kahina-font-display);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.contact-hero-sub {
    font-size: 1.1rem;
    color: var(--kahina-text-muted);
    line-height: 1.6;
}

/* ── Form + Info grid ── */
.contact-body {
    padding: 0 0 120px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    align-items: start;
}

/* ── Form ── */
.kahina-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.kahina-contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--kahina-text-muted);
}

.form-group label .required {
    color: var(--kahina-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 0;
    font-family: var(--kahina-font-body);
    font-size: 1rem;
    color: var(--kahina-text);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--kahina-border);
    border-radius: 0;
    outline: none;
    transition: border-color 0.3s var(--kahina-ease);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-bottom-color: var(--kahina-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    border: 1px solid var(--kahina-border);
    padding: 14px 16px;
}

.form-group textarea:focus {
    border-color: var(--kahina-primary);
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.btn-submit {
    align-self: flex-start;
    padding: 16px 48px;
    font-family: var(--kahina-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--kahina-bg);
    background: var(--kahina-primary);
    border: 1px solid var(--kahina-primary);
    cursor: pointer;
    transition: background 0.3s var(--kahina-ease), color 0.3s var(--kahina-ease);
}

.btn-submit:hover {
    background: transparent;
    color: var(--kahina-primary);
}

/* ── Feedback messages ── */
.form-feedback {
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-success {
    background: rgba(0, 128, 0, 0.06);
    border: 1px solid rgba(0, 128, 0, 0.2);
    color: #1a6b1a;
}

.form-error {
    background: rgba(255, 0, 0, 0.04);
    border: 1px solid rgba(255, 0, 0, 0.15);
    color: var(--kahina-accent);
}

/* ── Contact info column ── */
.contact-info-col {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 8px;
}

.contact-info-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kahina-text-muted);
    margin-bottom: 8px;
}

.contact-info-value {
    font-size: 1.05rem;
    color: var(--kahina-text);
    line-height: 1.5;
}

a.contact-info-value {
    transition: color 0.3s var(--kahina-ease);
}

a.contact-info-value:hover {
    color: var(--kahina-text-muted);
}

.contact-socials {
    display: flex;
    gap: 20px;
}

.contact-socials a {
    font-size: 1rem;
    color: var(--kahina-text);
    transition: color 0.3s var(--kahina-ease);
}

.contact-socials a:hover {
    color: var(--kahina-text-muted);
}

.contact-info-note {
    margin-top: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--kahina-border);
}

.contact-info-note p {
    font-size: 0.9rem;
    color: var(--kahina-text-muted);
    font-style: italic;
}

/* ── What happens next — 3 steps ── */
.contact-process {
    border-top: 1px solid var(--kahina-border);
}

.contact-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.contact-step {
    padding-top: 24px;
    border-top: 1px solid var(--kahina-border);
}

.contact-step-index {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--kahina-text-muted);
    display: block;
    margin-bottom: 16px;
}

.contact-step-title {
    font-family: var(--kahina-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.contact-step-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--kahina-text-muted);
}


@media (hover: none) {
    .cursor { display: none; }
}


/* ══════════════════════════════════════════
   Full-width template
   ══════════════════════════════════════════ */
.page-fullwidth .entry-content {
    max-width: 100%;
}


/* ══════════════════════════════════════════
   Page content
   ══════════════════════════════════════════ */
.page-content,
.single-content {
    padding: 4rem 0;
}

.page-title,
.entry-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

.entry-thumbnail {
    margin-bottom: 2rem;
    border-radius: 4px;
    overflow: hidden;
}

.entry-content p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
}

.entry-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
}

.entry-content img {
    border-radius: 4px;
    margin: 1.5rem 0;
}

.entry-content a {
    color: var(--kahina-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    opacity: 0.8;
}

.entry-content blockquote {
    border-left: 3px solid var(--kahina-accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    color: var(--kahina-text-muted);
    font-style: italic;
}

.entry-content pre {
    background: rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.85rem;
}

.entry-content code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}


/* ══════════════════════════════════════════
   Screen reader text
   ══════════════════════════════════════════ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}


/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media screen and (max-width: 768px) {

    :root {
        --kahina-header-height: 60px;
        --kahina-gutter: 16px;
        --kahina-header-gutter: 20px;
    }

    /* Preloader mobile */
    .preloader .logo-preload {
        width: 108px;
        height: 17px;
        transform: translate3d(0px, calc(50dvh - 9px), 0px);
    }

    /* v7: header logo matches preloader on mobile */
    .site-logo .logo-img {
        width: 108px;
        height: 17px;
    }

    /* Sections — reduce padding */
    .section { padding: 80px 0; }
    .section-intro { padding: 100px 0 80px; }
    .section-cta { padding: 100px 0; }

    /* Hero states — mobile */
    .hero-state-1 {
        flex-direction: column;
        justify-content: flex-end;
    }

    .hero-state-1-image {
        width: 100%;
        height: 40vh;
        position: relative;
    }

    .hero-parallax-wrap {
        inset: -10% 0;
    }

    /* Services — stack */
    .services-grid { grid-template-columns: 1fr; }

    /* Work — single column */
    .work-masonry {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .work-card--1,
    .work-card--2,
    .work-card--3,
    .work-card--4,
    .work-card--5,
    .work-card--6,
    .work-card--7 {
        grid-column: auto;
        grid-row: auto;
    }
    .work-thumbnail { min-height: 200px; }
    .section-work-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .section-work-header .section-heading { margin-bottom: 0; }

    /* Approach — 2 columns then stack */
    .approach-steps { grid-template-columns: repeat(2, 1fr); gap: 24px; }

    /* Testimonials — stack */
    .testimonials-list { grid-template-columns: 1fr; gap: 32px; }

    /* Footer — stack */
    .footer-top {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    /* Sidebar goes full width */
    .layout-sidebar {
        grid-template-columns: 1fr;
    }

    .widget-area {
        position: static;
    }

    /* Archive grid single column */
    .archive-grid {
        grid-template-columns: 1fr;
    }

    /* Contact page — stack */
    .contact-hero { padding: 120px 0 60px; }
    .contact-grid { grid-template-columns: 1fr; gap: 60px; }
    .contact-info-col { order: -1; }
    .contact-steps { grid-template-columns: 1fr; gap: 32px; }
    .form-row { grid-template-columns: 1fr; }

    /* Search form stacks */
    .search-form {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    .approach-steps { grid-template-columns: 1fr; }
}
