/* =========================================================
   HAAS WOODSHOP — Refined Editorial
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Outfit:wght@200;300;400;500;600&display=swap');

:root {
    --bg:           #0c0a08;
    --bg-elev:      #131110;
    --bg-deep:      #060504;
    --ink:          #f4ede1;
    --ink-soft:     #c9bfae;
    --ink-mute:     #807868;
    --rule:         #1f1c18;
    --accent:       #b87a3d;
    --accent-soft:  #d49a5e;
    --grain:        rgba(244, 237, 225, 0.015);

    --serif:        'Cormorant Garamond', 'EB Garamond', Georgia, serif;
    --sans:         'Outfit', system-ui, sans-serif;

    --container:    1280px;
    --gutter:       2rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle grain overlay across entire site */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    background-image:
        radial-gradient(circle at 1px 1px, var(--grain) 1px, transparent 0);
    background-size: 3px 3px;
    opacity: 0.6;
    mix-blend-mode: overlay;
}

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

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

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

.display {
    font-family: var(--serif);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }

.eyebrow {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent-soft);
    display: inline-block;
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--accent);
    vertical-align: middle;
    margin-right: 12px;
    margin-bottom: 3px;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container-wide {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* =========================================================
   HEADER / NAV
   ========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    background: rgba(12, 10, 8, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
    border-bottom-color: var(--rule);
    padding: 1rem 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-mark {
    height: 38px;
    width: auto;
    filter: invert(1) brightness(1.05);
    transition: opacity 0.2s ease;
}

.brand:hover .brand-mark { opacity: 0.85; }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--ink);
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--ink);
    margin: 6px 0;
    transition: all 0.3s ease;
}

/* =========================================================
   HERO (HOMEPAGE)
   ========================================================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(184, 122, 61, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(184, 122, 61, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.hero-inner {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 1s ease 0.2s forwards;
}

.hero-title {
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 0.95;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 1.2s ease 0.4s forwards;
}

.hero-title em {
    font-style: italic;
    font-weight: 300;
    color: var(--accent-soft);
}

.hero-logo {
    width: clamp(240px, 38vw, 440px);
    height: auto;
    margin: 0 auto 2.5rem;
    filter: invert(1) brightness(1.05);
    opacity: 0;
    animation: fadeUp 1.2s ease 0.4s forwards;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--ink-soft);
    max-width: 540px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 1.2s ease 0.6s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: 1px solid var(--ink-soft);
    color: var(--ink);
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeUp 1.2s ease 0.8s forwards;
}

.hero-cta:hover {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
}

.hero-cta .arrow {
    transition: transform 0.3s ease;
}

.hero-cta:hover .arrow { transform: translateX(4px); }

.hero-mark {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--ink-mute);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 1s ease 1.2s forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   PHILOSOPHY / INTRO SECTIONS
   ========================================================= */

.section {
    padding: 8rem 0;
    position: relative;
}

.section-tight {
    padding: 5rem 0;
}

.philosophy {
    border-top: 1px solid var(--rule);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 6rem;
    align-items: start;
}

.section-label {
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ink-mute);
    padding-top: 0.5rem;
    border-top: 1px solid var(--rule);
}

.lede {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 2.6vw, 2.4rem);
    line-height: 1.35;
    font-weight: 300;
    color: var(--ink);
}

.lede em {
    font-style: italic;
    color: var(--accent-soft);
}

.body-text {
    color: var(--ink-soft);
    line-height: 1.75;
    margin-top: 2rem;
    max-width: 60ch;
}

.body-text p + p { margin-top: 1.2rem; }

/* =========================================================
   PORTFOLIO PAGE
   ========================================================= */

.page-header {
    padding: 12rem 0 5rem;
    text-align: center;
    border-bottom: 1px solid var(--rule);
}

.page-title {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 1.5rem 0;
}

.page-title em { font-style: italic; color: var(--accent-soft); }

.page-sub {
    color: var(--ink-soft);
    max-width: 540px;
    margin: 0 auto;
    font-size: 1rem;
}

.category {
    padding: 7rem 0;
    border-bottom: 1px solid var(--rule);
}

.category:last-of-type { border-bottom: none; }

.category-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: end;
    margin-bottom: 4rem;
}

.category-num {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.category-title {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.015em;
    margin-top: 1rem;
}

.category-title em { font-style: italic; color: var(--accent-soft); }

.category-desc {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 42ch;
    justify-self: end;
}

/* Asymmetric portfolio grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    background: var(--bg-deep);
    cursor: pointer;
    aspect-ratio: 4/5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
    filter: brightness(0.95) contrast(1.02);
}

.gallery-item:hover img {
    transform: scale(1.04);
    filter: brightness(1.05) contrast(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(6, 5, 4, 0.5));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after { opacity: 1; }

/* Span variations */
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.aspect-square { aspect-ratio: 1/1; }
.aspect-tall { aspect-ratio: 3/4; }
.aspect-wide { aspect-ratio: 16/10; }
.aspect-portrait { aspect-ratio: 4/5; }

/* Disclaimer */
.disclaimer {
    padding: 3rem 0 5rem;
    text-align: center;
}

.disclaimer p {
    font-size: 0.78rem;
    color: var(--ink-mute);
    font-style: italic;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =========================================================
   ORDERS PAGE
   ========================================================= */

.orders-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 0 6rem;
    text-align: center;
}

.orders-inner {
    max-width: 640px;
}

.orders-eyebrow { margin-bottom: 2rem; }

.orders-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 2.5rem;
}

.orders-title em { font-style: italic; color: var(--accent-soft); }

.orders-text {
    font-family: var(--serif);
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 3rem;
}

.orders-divider {
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto 3rem;
}

.orders-note {
    color: var(--ink-soft);
    line-height: 1.75;
    max-width: 50ch;
    margin: 0 auto;
}

.orders-note strong {
    color: var(--ink);
    font-weight: 400;
}

/* =========================================================
   FEATURED HOME GRID
   ========================================================= */

.featured {
    padding: 8rem 0;
    border-top: 1px solid var(--rule);
}

.featured-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 4rem;
    gap: 3rem;
    flex-wrap: wrap;
}

.featured-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.015em;
    line-height: 1;
    max-width: 14ch;
}

.featured-title em { font-style: italic; color: var(--accent-soft); }

.featured-link {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--rule);
    padding-bottom: 0.5rem;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.featured-link:hover {
    color: var(--ink);
    border-color: var(--accent);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.featured-card {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-deep);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.featured-card:hover img { transform: scale(1.05); }

.featured-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(6, 5, 4, 0.85) 0%, transparent 50%);
}

.featured-card-label {
    position: absolute;
    bottom: 1.75rem;
    left: 1.75rem;
    z-index: 2;
    color: var(--ink);
}

.featured-card-num {
    font-family: var(--serif);
    font-style: italic;
    color: var(--accent-soft);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.featured-card-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.1;
}

/* =========================================================
   ORIGIN STRIP
   ========================================================= */

.origin {
    padding: 6rem 0;
    text-align: center;
    border-top: 1px solid var(--rule);
}

.origin-text {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 300;
    color: var(--ink);
    line-height: 1.4;
    max-width: 28ch;
    margin: 0 auto;
}

.origin-text .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
    margin: 0 0.7rem 0.3rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    border-top: 1px solid var(--rule);
    padding: 4rem 0 2rem;
    background: var(--bg-deep);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-mark {
    height: 32px;
    width: auto;
    filter: invert(1) brightness(0.95);
    margin-bottom: 1rem;
}

.footer-tag {
    color: var(--ink-mute);
    font-size: 0.85rem;
    max-width: 32ch;
    line-height: 1.7;
}

.footer-col h4 {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent-soft);
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: var(--ink-soft);
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
    border-top: 1px solid var(--rule);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    color: var(--ink-mute);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    flex-wrap: wrap;
    gap: 1rem;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; gap: 2rem; }
    .category-head { grid-template-columns: 1fr; gap: 1rem; }
    .category-desc { justify-self: start; }

    /* Collapse asymmetric grid into 2-up on tablet */
    .span-4, .span-5, .span-7, .span-8 { grid-column: span 6; }

    .featured-grid { grid-template-columns: 1fr 1fr; }
    .featured-card:nth-child(3) { grid-column: span 2; aspect-ratio: 16/10; }

    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }

    .nav-links { gap: 1.5rem; }
}

@media (max-width: 640px) {
    :root { --gutter: 1.25rem; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-elev);
        flex-direction: column;
        padding: 1.5rem var(--gutter);
        gap: 1.25rem;
        border-bottom: 1px solid var(--rule);
    }

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

    .nav-toggle { display: block; }

    .section { padding: 5rem 0; }

    .category { padding: 4rem 0; }

    .gallery { gap: 0.75rem; }

    .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }

    .featured-grid { grid-template-columns: 1fr; }
    .featured-card:nth-child(3) { grid-column: span 1; aspect-ratio: 3/4; }

    .page-header { padding: 9rem 0 4rem; }

    .footer-bottom { flex-direction: column; }
}
