/* ==========================================================================
   Kania Design — Styles
   White + graphite palette, elegant interior design portfolio
   ========================================================================== */

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

:root {
    --color-bg: #ffffff;
    --color-text: #2a2a2a;
    --color-text-light: #5a5a5a;
    --color-text-muted: #8a8a8a;
    --color-graphite: #3a3a3a;
    --color-border: #e8e8e8;
    --color-surface: #f7f7f5;
    --color-accent: #3a3a3a;
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --section-padding: clamp(4rem, 8vw, 8rem);
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--color-graphite);
    color: #fff;
    font-size: 0.85rem;
    z-index: 999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0.5rem;
    opacity: 1;
}

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.7;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.text-center {
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-graphite);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    margin-bottom: 0.5rem;
}

p + p {
    margin-top: 1rem;
}

.lead {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--color-graphite);
    margin: 1rem auto 0;
}

/* --- Button --- */
.btn {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 1px solid var(--color-graphite);
    color: var(--color-graphite);
    background: transparent;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
}

.btn:hover {
    background: var(--color-graphite);
    color: #fff;
    opacity: 1;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: 0 1px 20px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo img {
    height: 55px;
    width: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.main-nav a {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-graphite);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-graphite);
    transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover {
    opacity: 1;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--color-graphite);
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem clamp(1.25rem, 4vw, 2.5rem);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 2.5rem;
    color: var(--color-graphite);
}

.hero h1 em {
    font-style: italic;
    font-weight: 300;
}

.hero-image {
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 75vh;
    max-height: 650px;
    object-fit: cover;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
    padding: var(--section-padding) 0;
}

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.about-text h2 {
    margin-bottom: 2rem;
}

.about-text p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.about-signature {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--color-graphite);
    margin-top: 1.5rem;
}

.about-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.about-badge img {
    width: 60px;
    height: 60px;
}

.about-badge span {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

/* --- Accent section --- */
.section--accent {
    background: var(--color-surface);
    padding: var(--section-padding) 0;
}

.section--accent h2 {
    margin-bottom: 2rem;
}

.section--accent .lead + .lead {
    margin-top: 1.2rem;
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.service-card {
    padding: 2.5rem;
    border: 1px solid var(--color-border);
    transition: border-color 0.3s;
}

.service-card:hover {
    border-color: var(--color-graphite);
}

.service-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--color-border);
    line-height: 1;
    margin-bottom: 1.2rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.service-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ==========================================================================
   Portfolio
   ========================================================================== */
.section--portfolio {
    background: var(--color-bg);
}

.project {
    margin-bottom: 5rem;
    padding-bottom: 5rem;
    border-bottom: 1px solid var(--color-border);
}

.project:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.project-header {
    margin-bottom: 1rem;
}

.project-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.project-description {
    max-width: 720px;
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* Gallery grids */
.gallery-grid {
    display: grid;
    gap: 8px;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.4s, filter 0.4s;
}

.gallery-grid img:hover {
    filter: brightness(0.92);
}

/* Adaptive gallery layouts */
.gallery-grid--1 {
    grid-template-columns: 1fr;
    max-width: 800px;
}

.gallery-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-grid--5 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-grid--5 img:nth-child(4),
.gallery-grid--5 img:nth-child(5) {
    grid-column: span 1;
}

.gallery-grid--5 img:nth-child(1) {
    grid-column: span 2;
    height: 350px;
}

.gallery-grid--8 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-grid--8 img {
    height: 280px;
}

.gallery-grid--8 img:nth-child(1),
.gallery-grid--8 img:nth-child(2) {
    grid-column: span 2;
    height: 350px;
}

.gallery-grid--9 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-grid--9 img {
    height: 280px;
}

.gallery-grid--9 img:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    height: 100%;
}

.gallery-grid--10 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-grid--10 img {
    height: 250px;
}

.gallery-grid--10 img:nth-child(1) {
    grid-column: span 2;
    height: 350px;
}

.gallery-grid--10 img:nth-child(2) {
    grid-column: span 2;
    height: 350px;
}

/* Video */
.project-video {
    margin-top: 2.5rem;
}

.video-label {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.project-video video {
    width: 100%;
    max-width: 800px;
    background: #000;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.section--faq {
    background: var(--color-bg);
}

.faq-list {
    max-width: 780px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
    padding: 1.4rem 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--color-graphite);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--color-text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item summary:hover {
    color: var(--color-text-light);
}

.faq-answer {
    padding: 0 0 1.5rem;
}

.faq-answer p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 680px;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.section--contact {
    background: var(--color-surface);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.contact-intro {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--color-graphite);
    margin-bottom: 2.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.contact-item svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.contact-item a:hover {
    opacity: 0.6;
}

.contact-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--color-border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo img {
    height: 40px;
    width: auto;
    opacity: 0.6;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.footer-social a {
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--color-graphite);
    opacity: 1;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.footer-legal a {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.footer-legal a:hover {
    color: var(--color-graphite);
    opacity: 1;
}

.footer-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.2rem 0 0;
    margin-top: 1.2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.footer-credit img {
    height: 18px;
    width: auto;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.footer-credit a:hover img {
    opacity: 0.85;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 210;
    padding: 1rem;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #fff;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .gallery-grid--8 {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid--8 img:nth-child(1),
    .gallery-grid--8 img:nth-child(2) {
        grid-column: span 1;
        height: 280px;
    }

    .gallery-grid--10 {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid--10 img:nth-child(1),
    .gallery-grid--10 img:nth-child(2) {
        grid-column: span 1;
        height: 280px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .header-inner {
        height: 64px;
    }

    .logo img {
        height: 42px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        padding: 6rem 2rem 2rem;
        transition: right 0.35s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1.8rem;
    }

    .main-nav a {
        font-size: 0.9rem;
    }

    /* Hero */
    .hero {
        padding-top: 64px;
        min-height: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 3rem;
        padding-bottom: 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .hero-image img {
        height: 50vh;
        max-height: 400px;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        height: 300px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.8rem;
    }

    /* Gallery */
    .gallery-grid--5,
    .gallery-grid--8,
    .gallery-grid--9,
    .gallery-grid--10 {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid--5 img:nth-child(1),
    .gallery-grid--9 img:nth-child(1) {
        grid-column: span 2;
        grid-row: span 1;
        height: 250px;
    }

    .gallery-grid--8 img,
    .gallery-grid--9 img,
    .gallery-grid--10 img {
        height: 200px;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-image {
        order: -1;
    }

    .contact-image img {
        height: 250px;
    }

    .contact-intro {
        font-size: 1.25rem;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Portfolio */
    .project {
        margin-bottom: 3rem;
        padding-bottom: 3rem;
    }

    /* Lightbox */
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 480px) {
    .gallery-grid--5,
    .gallery-grid--8,
    .gallery-grid--9,
    .gallery-grid--10 {
        grid-template-columns: 1fr;
    }

    .gallery-grid--5 img:nth-child(1),
    .gallery-grid--9 img:nth-child(1) {
        grid-column: span 1;
    }

    .gallery-grid img {
        height: 220px !important;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .service-number {
        font-size: 2rem;
    }
}
