/* Habitline Studio - Design System */

:root {
    --bg-color: #FAFAF8;
    --bg-alt: #F1EFEA;
    --text-primary: #2C2B29;
    --text-secondary: #595753;
    --accent-color: #637059; /* Sage Green */
    --accent-hover: #4B5543;
    --border-color: #E2DDD5;
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Manrope', sans-serif;
    
    --container-width: 1300px;
    --container-padding: 2rem;
    
    --space-sm: 1rem;
    --space-md: 2.5rem;
    --space-lg: 5rem;
    --space-xl: 8rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 300;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(3rem, 5vw, 5.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.5rem, 4vw, 4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.3rem, 2vw, 1.8rem); font-family: var(--font-body); font-weight: 400; }

p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

.text-lg { font-size: 1.35rem; line-height: 1.5; }
.text-sm { font-size: 0.95rem; }

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Buttons & Links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #FFF;
}

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

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

.link-arrow {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--text-primary);
    padding-bottom: 0.25rem;
}

.link-arrow::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.link-arrow:hover::after {
    transform: translateX(5px);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    transition: transform 0.4s ease;
}

.site-header.hidden {
    transform: translateY(-100%);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

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

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    position: relative;
    display: inline-block;
    padding: 0.5rem 0.25rem;
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--text-primary);
    position: absolute;
    transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) { top: 0; }
.mobile-menu-btn span:nth-child(2) { top: 9px; }
.mobile-menu-btn span:nth-child(3) { bottom: 0; }

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg); top: 9px; }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg); bottom: 10px; }

/* Layouts */
.section {
    padding: var(--space-xl) 0;
}

.section-sm { padding: var(--space-lg) 0; }

.bg-alt { background-color: var(--bg-alt); }
.bg-dark { background-color: var(--text-primary); color: var(--bg-color); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--bg-color); }
.bg-dark p { color: #A09E9A; }
.bg-dark .border-line { border-color: #4A4844; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.border-line {
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-md);
}

/* Specific Blocks */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    position: relative;
}

.hero-large-text {
    font-size: clamp(3.5rem, 7vw, 7.5rem);
    line-height: 1;
    margin-bottom: 2rem;
    max-width: 15ch;
}

.hero-img-wrap {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    margin-top: var(--space-md);
}

.stat-block {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    padding-left: 1.5rem;
}
.stat-block .number {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Footer */
.site-footer {
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.site-footer h4 {
    color: var(--bg-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

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

.site-footer li {
    margin-bottom: 0.75rem;
}

.site-footer a {
    color: #A09E9A;
}

.site-footer a:hover {
    color: var(--bg-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid #4A4844;
    color: #A09E9A;
}
.footer-bottom p {
    color: #A09E9A;
    font-size: 0.9rem;
}

/* Mobile Nav */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-overlay ul {
    list-style: none;
    text-align: center;
}

.mobile-nav-overlay li {
    margin-bottom: 2rem;
}

.mobile-nav-overlay a {
    font-family: var(--font-heading);
    font-size: 2.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 5rem;
        --space-lg: 3.5rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-img-wrap {
        height: 40vh;
    }
}

@media (max-width: 480px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Accessibility: reduced motion + color-scheme support (audit fix, 2026-08-23) */
:root { color-scheme: light dark; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
