@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg: #FAFAF7;
    --text: #141414;
    --muted: #5C5C57;
    --accent: #C8553D;
    --line: #DCD9D0;
    --sans: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    
    /* MATHEMATICAL KINEMATIC TOKENS */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

/* 12-Column Master Grid */
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px 140px 40px; position: relative; display: flex; flex-direction: column; min-height: 100vh; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }

/* Navigation */
nav { display: flex; justify-content: space-between; align-items: flex-end; padding: 32px 0; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.logo-box { font-weight: 900; font-size: 1.2rem; letter-spacing: normal; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* Typography */
h1 { font-size: clamp(44px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -0.02em; font-weight: 900; margin: 0; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 24px; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--text); margin: 0; }
p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.hero-brand { color: var(--accent); }

/* =========================================
   LIQUID FILL MECHANICS (Global Buttons)
   ========================================= */
.btn, .filter-btn, .tab-btn { 
    position: relative; display: inline-block; background: transparent; color: var(--text); 
    border: 1px solid var(--line); padding: 16px 24px; font-size: 13px; font-weight: 700; 
    cursor: pointer; text-align: center; letter-spacing: 0.04em; text-transform: uppercase; 
    overflow: hidden; z-index: 1; transition: color 0.3s, border-color 0.3s;
}
.btn::before, .filter-btn::before, .tab-btn::before {
    content: ''; position: absolute; inset: 0; background: var(--text); z-index: -1;
    transform: scaleY(0); transform-origin: bottom center; 
    transition: transform 0.4s var(--ease-out-expo);
}
.btn:hover, .filter-btn:hover, .tab-btn:hover { color: var(--bg); border-color: var(--text); }
.btn:hover::before, .filter-btn:hover::before, .tab-btn:hover::before { 
    transform: scaleY(1); transform-origin: top center; 
}
/* Active states for filters/tabs */
.filter-btn.active, .tab-btn.active { color: var(--bg); border-color: var(--text); }
.filter-btn.active::before, .tab-btn.active::before { 
    transform: scaleY(1); transform-origin: top center; 
}

/* Hero Spec Rows */
.hero-layout { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-content: start; padding-bottom: 40px; }
.hero-text { grid-column: 1 / 9; align-self: start; }
.hero-meta { grid-column: 9 / 13; align-self: end; padding-bottom: 12px; display: flex; flex-direction: column; gap: 24px; }
.hero-meta p { font-size: 18px; color: var(--text); font-weight: 500; }
.feature-list { grid-column: 1 / 13; border-bottom: 1px solid var(--line); margin-top: 40px; }
.feature-item { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: baseline; padding: 32px 0; border-top: 1px solid var(--line); }
.feature-num { grid-column: 1 / 2; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); }
.feature-title { grid-column: 2 / 6; font-size: 21px; font-weight: 700; line-height: 1.25; color: var(--text); }
.feature-desc { grid-column: 6 / 10; font-size: 15px; line-height: 1.6; color: var(--muted); }
.feature-metric { grid-column: 10 / 12; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* =========================================
   AI SANDBOX KINETIC SHUTTER (ai-studio.html)
   ========================================= */
.studio-layout { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-top: 40px; margin-bottom: 80px; }
.sidebar { grid-column: 1 / 5; display: flex; flex-direction: column; }
.sidebar .tab-btn { text-align: left; border: none; border-bottom: 1px solid var(--line); padding: 20px 0; }
.sidebar .tab-btn::before { display: none; } /* Sidebar uses simple text fill, no block fill */
.sidebar .tab-btn:hover, .sidebar .tab-btn.active { color: var(--accent); font-weight: 700; }
.sidebar .tab-btn.active::after { content: ' >'; }

.workspace { grid-column: 5 / 13; border: 1px solid var(--text); display: flex; flex-direction: column; min-height: 460px; background: #141414; position: relative; overflow: hidden; }
.term-header { border-bottom: 1px solid #333; padding: 16px 20px; display: flex; justify-content: space-between; color: #6B6A68; font-family: var(--mono); font-size: 12px; }
.term-body { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.term-line { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: #fff; }
.term-line .prompt { color: var(--accent); margin-right: 8px; }
.term-line.user-input { color: #A9A8A6; }
.term-line.ai-response { color: #FAFAF7; border-left: 2px solid var(--accent); padding-left: 12px; }
.term-input-bar { border-top: 1px solid #333; padding: 16px 20px; display: flex; gap: 12px; }
.term-input-bar input { flex: 1; background: transparent; border: none; color: #fff; font-family: var(--mono); font-size: 13px; outline: none; }
.term-input-bar button { background: var(--accent); color: #fff; border: none; padding: 8px 16px; font-family: var(--mono); cursor: pointer; font-weight: 700; }

/* The Shutter Curtain */
.shutter-curtain {
    position: absolute; inset: 0; background: #141414; z-index: 15; 
    display: flex; align-items: center; justify-content: center; pointer-events: none;
    clip-path: inset(0 0 100% 0);
}
.shutter-text { color: var(--bg); font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; opacity: 0; }
.shutter-curtain.animating { animation: architecturalShutter 0.68s var(--ease-in-out-quart) forwards; }
.shutter-curtain.animating .shutter-text { animation: textFlash 0.68s ease forwards; }

@keyframes architecturalShutter {
    0% { clip-path: inset(0 0 100% 0); }
    42% { clip-path: inset(0 0 0% 0); }
    58% { clip-path: inset(0 0 0% 0); }
    100% { clip-path: inset(100% 0 0 0); }
}
@keyframes textFlash {
    0%, 30% { opacity: 0; }
    45%, 55% { opacity: 1; }
    70%, 100% { opacity: 0; }
}

/* --- AI RECEPTIONIST HARDWARE LOCK --- */
#ai-trigger { 
    position: fixed; bottom: 32px; right: 32px; z-index: 9998; 
    background-color: var(--bg); color: var(--text); 
    border: 1px solid var(--text); box-shadow: 3px 3px 0px var(--text); 
    padding: 12px 18px; font-family: var(--mono); font-size: 12px; font-weight: 700; 
    letter-spacing: 0.06em; text-transform: uppercase; border-radius: 2px; 
    display: inline-flex; align-items: center; gap: 10px; 
    transition: transform 0.12s ease, box-shadow 0.12s ease; cursor: pointer; 
}
#ai-trigger:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0px var(--text); border-color: var(--accent); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

#ai-drawer { 
    position: fixed; bottom: 0; right: 0; width: 450px; height: 100dvh; max-height: 750px; 
    background: var(--bg); border-left: 1px solid var(--line); border-top: 1px solid var(--line); 
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    z-index: 9999; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,0.05); 
}
#ai-drawer.open { transform: translateY(0); }
.msg.user { align-self: flex-end; background: var(--text); color: var(--bg); padding: 16px 20px; max-width: 85%; font-size: 17px; line-height: 1.6; border-radius: 2px; }
.msg.ai { align-self: flex-start; background: transparent; padding: 16px 20px; max-width: 90%; border-left: 3px solid #B85032; font-size: 17px; line-height: 1.6; color: var(--text); }

/* UNIFIED FOOTER SIGNATURE */
.site-footer {
    margin-top: 96px;
    padding-top: 32px;
    padding-bottom: 64px;
    border-top: 1px solid var(--line);
    width: 100%;
}
.footer-signature {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}
.footer-brand {
    color: #B85032;
    font-weight: 700;
}
.global-footer-strip {
    border-top: 1px solid var(--line);
    margin-top: 96px;
    padding-top: 32px;
    padding-bottom: 64px;
    width: 100%;
}

@media (max-width: 1024px) {
    .container { padding: 0 24px 120px 24px; }
    .grid-12, .hero-layout, .hero-meta, .feature-item, .studio-layout { display: flex; flex-direction: column; gap: 24px; }
    .nav-links { display: none; }
    .sidebar { flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
    .sidebar .tab-btn { padding: 16px; white-space: nowrap; border-bottom: none; border-right: 1px solid var(--line); }
    #ai-drawer { width: 100vw; height: 100dvh; max-height: none; }
}
