/* ============================================================
   H.HAUS — Interior Design Studio
   style.css
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
    --cream:       #F3EDE4;
    --parchment:   #ECE4D8;
    --charcoal:    #1C1917;
    --dark-brown:  #2E2924;
    --mid-brown:   #6B5F56;
    --sand:        #A08B6E;
    --gold:        #C4A87A;
    --border:      #DDD4C7;
    --white:       #FAF7F3;

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;

    --nav-h:        72px;
    --pad-x:        clamp(24px, 5vw, 72px);
    --section-pad:  clamp(80px, 10vw, 140px);
    --max-w:        1380px;

    --ease-expo:    cubic-bezier(0.19, 1, 0.22, 1);
    --ease-smooth:  cubic-bezier(0.76, 0, 0.24, 1);
}

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

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

body {
    background-color: var(--cream);
    color: var(--charcoal);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }

/* ---------- Grain Texture Overlay ---------- */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* ---------- Scroll Reveal ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease-expo), transform 1s var(--ease-expo);
}
[data-reveal][data-delay="100"] { transition-delay: 0.1s; }
[data-reveal][data-delay="200"] { transition-delay: 0.2s; }
[data-reveal][data-delay="300"] { transition-delay: 0.3s; }
[data-reveal][data-delay="400"] { transition-delay: 0.4s; }

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--nav-h);
    transition: background 0.5s var(--ease-smooth),
                backdrop-filter 0.5s,
                border-color 0.5s;
    border-bottom: 1px solid transparent;
}

#nav.scrolled {
    background: rgba(243, 237, 228, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-color: var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--charcoal);
    transition: color 0.3s;
}
.nav-brand:hover { color: var(--sand); }

.nav-links {
    display: flex;
    gap: clamp(20px, 4vw, 52px);
    align-items: center;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--mid-brown);
    transition: color 0.3s;
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--sand);
    transition: width 0.4s var(--ease-expo);
}

.nav-link:hover         { color: var(--charcoal); }
.nav-link:hover::after  { width: 100%; }

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 36px;
    height: 36px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--charcoal);
    transform-origin: center;
    transition: transform 0.35s var(--ease-expo), opacity 0.35s;
}

.nav-toggle.open span:first-child  { transform: rotate(45deg) translate(3px, 3px); }
.nav-toggle.open span:last-child   { transform: rotate(-45deg) translate(3px, -3px); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--nav-h) var(--pad-x) 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 25% 55%, rgba(160, 139, 110, 0.1) 0%, transparent 65%),
        radial-gradient(ellipse at 78% 18%, rgba(196, 168, 122, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 60% 85%, rgba(160, 139, 110, 0.05) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 2.5vw, 32px);
}

.hero-logo-wrap {
    width: clamp(140px, 22vw, 280px);
}

.hero-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 24px rgba(160, 139, 110, 0.15));
}

.hero-tagline {
    font-family: var(--font-body);
    font-weight: 200;
    font-size: clamp(10px, 1vw, 12px);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--sand);
}

.hero-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.hero-scroll:hover { opacity: 0.6; }

.scroll-label {
    font-size: 9px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--mid-brown);
    opacity: 0.55;
}

.scroll-line {
    width: 1px;
    height: 52px;
    background: linear-gradient(to bottom, var(--sand) 0%, transparent 100%);
    animation: scrollPulse 2.4s var(--ease-expo) infinite;
}

@keyframes scrollPulse {
    0%   { opacity: 0.3; transform: scaleY(0.7) translateY(-8px); }
    60%  { opacity: 1;   transform: scaleY(1) translateY(0); }
    100% { opacity: 0.3; transform: scaleY(1.1) translateY(4px); }
}

/* Decorative vertical lines flanking hero */
.hero-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.deco-line {
    position: absolute;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border) 30%, var(--border) 70%, transparent);
    opacity: 0.5;
}
.deco-line--left  { left: clamp(24px, 4vw, 60px); }
.deco-line--right { right: clamp(24px, 4vw, 60px); }

/* ============================================================
   SECTION SHARED
   ============================================================ */
section {
    padding: var(--section-pad) var(--pad-x);
    max-width: var(--max-w);
    margin: 0 auto;
}

#work, #about, #contact {
    border-top: 1px solid var(--border);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(28px, 3vw, 40px);
}

.label-num {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--gold);
}

.label-text {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--mid-brown);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(44px, 6.5vw, 84px);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--charcoal);
    margin-bottom: clamp(36px, 4vw, 60px);
}

.section-title em {
    font-style: italic;
    color: var(--sand);
    font-weight: 300;
}

/* Shared link style */
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--charcoal);
    transition: gap 0.4s var(--ease-expo), color 0.3s;
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
}
.text-link:hover {
    gap: 18px;
    color: var(--sand);
    border-color: var(--sand);
}

/* ============================================================
   FEATURED PROJECTS
   ============================================================ */
#featured {
    border-top: 1px solid var(--border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2.5vw, 28px);
}

.project-card {
    position: relative;
}

.project-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--parchment);
    margin-bottom: 16px;
}

.project-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.8s var(--ease-expo);
}

.project-link:hover .project-img-wrap img {
    transform: scale(1.04);
}

/* Placeholder shown until real images are added */
.project-img-placeholder {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(196, 168, 122, 0.15) 0%, transparent 60%),
        var(--parchment);
    position: relative;
    transition: background 0.4s;
}

.project-img-placeholder::after {
    content: 'Add cover image';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--border);
}

.project-link:hover .project-img-placeholder {
    background:
        radial-gradient(ellipse at 60% 60%, rgba(196, 168, 122, 0.2) 0%, transparent 60%),
        var(--parchment);
}

.project-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 2px;
}

.project-category {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
    padding-top: 4px;
}

.project-name {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(17px, 1.5vw, 22px);
    color: var(--charcoal);
    line-height: 1.25;
    flex: 1;
    transition: color 0.3s;
}

.project-link:hover .project-name { color: var(--sand); }

.project-arrow {
    color: var(--sand);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.3s, transform 0.4s var(--ease-expo);
    padding-top: 4px;
    flex-shrink: 0;
}

.project-link:hover .project-arrow {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   WORK / INSTAGRAM
   ============================================================ */
.instagram-title {
    font-size: clamp(28px, 3.5vw, 48px);
    text-align: center;
    margin-bottom: clamp(24px, 3vw, 40px);
}
.instagram-feed-wrap {
    width: 100%;
}

/* Fallback displayed until Behold.so widget is connected */
.instagram-fallback {
    display: flex;
    flex-direction: column;
    gap: clamp(40px, 5vw, 64px);
}

.fallback-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 200px 160px;
    gap: 2px;
}

.fallback-cell {
    background: var(--parchment);
    position: relative;
    overflow: hidden;
    transition: background 0.4s;
}

.fallback-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--border) 0%, transparent 60%);
    opacity: 0.4;
}

.fallback-cell--tall  { grid-row: span 2; }
.fallback-cell--wide  { grid-column: span 2; }

.fallback-cell:hover { background: color-mix(in srgb, var(--parchment) 70%, var(--sand) 30%); }

.fallback-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.fallback-text {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(22px, 2.8vw, 32px);
    color: var(--mid-brown);
}

.ig-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--charcoal);
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
    transition: color 0.3s, border-color 0.3s, gap 0.4s var(--ease-expo);
}
.ig-link:hover {
    color: var(--sand);
    border-color: var(--sand);
    gap: 14px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 7vw, 110px);
    align-items: center;
}

.about-text-col {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 2.5vw, 36px);
}

.about-body p {
    font-size: clamp(15px, 1.2vw, 17px);
    color: var(--dark-brown);
    line-height: 1.9;
    opacity: 0.85;
}
.about-body p + p { margin-top: 20px; }

/* Visual frame column */
.about-visual-col {
    position: relative;
}

.about-frame {
    position: relative;
    background: var(--parchment);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(320px, 38vw, 500px);
    overflow: hidden;
}

.about-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 80%, rgba(196, 168, 122, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 20%, rgba(160, 139, 110, 0.08) 0%, transparent 50%);
}

.about-frame-border {
    position: absolute;
    inset: 20px;
    border: 1px solid var(--border);
    pointer-events: none;
    z-index: 1;
}

.about-photo {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.8s var(--ease-expo);
}
.about-frame:hover .about-photo {
    transform: scale(1.03);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: clamp(48px, 7vw, 110px);
    align-items: start;
}

.contact-intro {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
}

.contact-intro p {
    font-size: clamp(14px, 1.1vw, 16px);
    color: var(--dark-brown);
    line-height: 1.85;
    opacity: 0.8;
}

.inline-link {
    color: var(--sand);
    border-bottom: 1px solid currentColor;
    transition: color 0.3s;
    padding-bottom: 1px;
}
.inline-link:hover { color: var(--gold); }

/* Form */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 2.5vw, 28px);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2.5vw, 28px);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-field label {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--mid-brown);
}

.form-field input,
.form-field textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 0 12px;
    font-family: var(--font-body);
    font-size: clamp(14px, 1.1vw, 15px);
    font-weight: 300;
    color: var(--charcoal);
    outline: none;
    resize: none;
    width: 100%;
    transition: border-color 0.35s;
    -webkit-appearance: none;
    border-radius: 0;
    caret-color: var(--sand);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--border);
    font-style: italic;
    font-family: var(--font-display);
    font-size: 1em;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--sand);
}

.form-footer-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 8px;
}

/* Submit button */
.submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--charcoal);
    color: var(--cream);
    border: none;
    padding: 16px 36px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: gap 0.4s var(--ease-expo);
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--sand);
    transform: translateX(-101%);
    transition: transform 0.5s var(--ease-expo);
}

.submit-btn:hover::before  { transform: translateX(0); }
.submit-btn:hover          { gap: 22px; }
.submit-btn:disabled       { opacity: 0.5; pointer-events: none; }

.btn-text, .btn-arrow { position: relative; z-index: 1; }

/* Form status message */
.form-status {
    min-height: 24px;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(16px, 1.3vw, 20px);
    color: var(--sand);
    transition: opacity 0.4s;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    border-top: 1px solid var(--border);
    padding: clamp(40px, 5vw, 64px) var(--pad-x);
    max-width: var(--max-w);
    margin: 0 auto;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.35em;
    color: var(--charcoal);
    transition: color 0.3s;
}
.footer-brand:hover { color: var(--sand); }

.footer-nav {
    display: flex;
    gap: 32px;
}

.footer-nav a {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--mid-brown);
    transition: color 0.3s;
}
.footer-nav a:hover { color: var(--sand); }

.footer-copy {
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--border);
    margin-top: 8px;
}

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

/* Tablet */
@media (max-width: 960px) {
    .about-inner,
    .contact-inner {
        grid-template-columns: 1fr;
    }

    .about-visual-col { order: -1; }

    .about-frame { min-height: 280px; }

    .contact-intro {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 640px) {
    :root {
        --nav-h: 60px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(243, 237, 228, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        z-index: 150;
    }

    .nav-links.open { display: flex; }

    .nav-link {
        font-size: 22px;
        font-family: var(--font-display);
        font-weight: 300;
        letter-spacing: 0.1em;
    }

    .nav-toggle { display: flex; }

    .hero-deco { display: none; }

    .fallback-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: 160px 160px 160px;
    }

    .fallback-cell--wide  { grid-column: span 1; }
    .fallback-cell--tall  { grid-row: span 1; }

    .deco-line { display: none; }
}

/* Very small */
@media (max-width: 380px) {
    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .grain, .nav-toggle, .hero-scroll, .hero-deco { display: none; }
    #nav { position: static; }
    [data-reveal] { opacity: 1; transform: none; }
}
