/* ============================================
   The Daily Habit Espresso — Stylesheet
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-200: #99f6e4;
    --color-teal-500: #14b8a6;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-teal-800: #115e59;
    --color-teal-900: #134e4a;
    
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-slate-950: #080d16;
    
    --color-white: #ffffff;
    --color-black: #000000;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-slate-800);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

address {
    font-style: normal;
}

/* --- Utility --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--color-teal-600);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    z-index: 1000;
    font-weight: 500;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* --- Section Shared --- */
.section-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-teal-600);
    margin-bottom: var(--space-3);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-slate-900);
    margin-bottom: var(--space-6);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-slate-500);
    max-width: 560px;
    line-height: 1.7;
}

.centered {
    text-align: center;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-teal-600);
    color: var(--color-white);
    padding: 0.8125rem 1.75rem;
    font-size: 0.9375rem;
    border: 2px solid var(--color-teal-600);
}

.btn-primary:hover {
    background: var(--color-teal-700);
    border-color: var(--color-teal-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--color-slate-700);
    padding: 0.8125rem 1.75rem;
    font-size: 0.9375rem;
    border: 2px solid var(--color-slate-200);
}

.btn-outline:hover {
    border-color: var(--color-slate-400);
    color: var(--color-slate-900);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-slate-100);
    transition: box-shadow var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--color-slate-900);
    transition: color var(--transition-fast);
}

.logo:hover {
    color: var(--color-teal-600);
}

.logo-text {
    letter-spacing: -0.01em;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-list a {
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-slate-600);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-list a:hover {
    color: var(--color-teal-600);
    background: var(--color-teal-50);
}

.nav-list .btn {
    margin-left: var(--space-2);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.nav-toggle:hover {
    background: var(--color-slate-100);
}

.hamburger {
    position: relative;
    width: 20px;
    height: 14px;
    display: block;
}

.hamburger::before,
.hamburger::after,
.hamburger span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-slate-700);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger::before { top: 0; }
.hamburger span { top: 6px; }
.hamburger::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 6px;
}

.nav-toggle[aria-expanded="true"] .hamburger span {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* --- Hero --- */
.hero {
    padding-top: 72px;
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(135deg, var(--color-slate-50) 0%, var(--color-white) 50%, var(--color-teal-50) 100%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
    padding: var(--space-16) 0;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-teal-600);
    margin-bottom: var(--space-4);
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.75rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--color-slate-900);
    margin-bottom: var(--space-6);
    letter-spacing: -0.02em;
}

.hero-headline br {
    display: none;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-slate-500);
    line-height: 1.75;
    margin-bottom: var(--space-8);
    max-width: 480px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-12);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-teal-600);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-slate-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-slate-200);
}

.hero-image {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-image-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: var(--color-teal-200);
    border-radius: 50%;
    opacity: 0.5;
    z-index: -1;
}

/* --- About --- */
.about {
    padding: var(--space-24) 0;
    background: var(--color-white);
}

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

.about-image-group {
    position: relative;
}

.about-image-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-image-secondary {
    position: absolute;
    bottom: -40px;
    right: -30px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--color-white);
}

.about-image-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-image-badge {
    position: absolute;
    top: -20px;
    left: -20px;
    background: var(--color-teal-600);
    color: var(--color-white);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    box-shadow: var(--shadow-md);
}

.about-content .section-title {
    margin-bottom: var(--space-5);
}

.about-text {
    font-size: 1.0625rem;
    color: var(--color-slate-500);
    line-height: 1.8;
    margin-bottom: var(--space-5);
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: 0.9375rem;
    color: var(--color-slate-700);
    font-weight: 500;
}

.feature-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Menu --- */
.menu {
    padding: var(--space-24) 0;
    background: var(--color-slate-50);
}

.section-header {
    margin-bottom: var(--space-12);
}

.section-header.centered .section-subtitle {
    margin: 0 auto;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.menu-category {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-slate-100);
    transition: all var(--transition-base);
}

.menu-category:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-teal-100);
}

.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--color-slate-100);
}

.category-icon {
    flex-shrink: 0;
}

.category-title {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-slate-900);
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.menu-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-2) 0;
    transition: padding-left var(--transition-fast);
}

.menu-item:hover {
    padding-left: var(--space-2);
}

.menu-item-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-slate-800);
}

.menu-item-desc {
    font-size: 0.875rem;
    color: var(--color-slate-400);
    line-height: 1.5;
}

.menu-note {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--color-slate-400);
    font-style: italic;
}

/* --- Space --- */
.space {
    padding: var(--space-24) 0;
    background: var(--color-white);
}

.space-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: start;
}

.space-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.space-img {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.space-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.space-img:hover img {
    transform: scale(1.03);
}

.space-img-1 { grid-row: span 2; }
.space-img-1 img { height: 100%; }

.space-content .section-title {
    margin-bottom: var(--space-5);
}

.space-text {
    font-size: 1.0625rem;
    color: var(--color-slate-500);
    line-height: 1.8;
    margin-bottom: var(--space-5);
}

.space-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.space-feature {
    display: flex;
    gap: var(--space-4);
}

.space-feature-number {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-teal-200);
    line-height: 1;
    flex-shrink: 0;
    width: 32px;
}

.space-feature-content h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-slate-800);
    margin-bottom: 4px;
}

.space-feature-content p {
    font-size: 0.9375rem;
    color: var(--color-slate-500);
    line-height: 1.65;
}

/* --- Visit --- */
.visit {
    padding: var(--space-24) 0;
    background: var(--color-slate-900);
    color: var(--color-white);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

.visit .section-eyebrow {
    color: var(--color-teal-400);
}

.visit .section-title {
    color: var(--color-white);
}

.visit-text {
    font-size: 1.0625rem;
    color: var(--color-slate-400);
    line-height: 1.75;
    margin-bottom: var(--space-8);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.contact-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-slate-400);
    margin-bottom: 4px;
}

.contact-item address,
.contact-item a,
.contact-item p {
    font-size: 1.0625rem;
    color: var(--color-white);
    line-height: 1.6;
}

.contact-item a {
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: var(--color-teal-400);
}

.hours-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 480px;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    min-height: 480px;
}

.map-placeholder iframe {
    width: 100%;
    height: 100%;
    min-height: 480px;
}

/* --- Footer --- */
.footer {
    background: var(--color-slate-950);
    color: var(--color-slate-400);
    padding: var(--space-16) 0 var(--space-8);
}

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

.footer-brand .logo {
    color: var(--color-white);
    margin-bottom: var(--space-4);
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--color-slate-500);
    line-height: 1.65;
    max-width: 280px;
}

.footer-nav h4,
.footer-contact h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-slate-300);
    margin-bottom: var(--space-4);
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-nav a {
    font-size: 0.9375rem;
    color: var(--color-slate-500);
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--color-teal-400);
}

.footer-contact address {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-slate-500);
}

.footer-contact a {
    color: var(--color-teal-400);
    transition: color var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--color-teal-300);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-slate-800);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-slate-600);
}

/* --- Mobile Nav Overlay --- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: absolute;
    top: 72px;
    right: 0;
    width: 100%;
    max-width: 320px;
    background: var(--color-white);
    padding: var(--space-6);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--transition-base);
}

.mobile-menu-overlay.active .mobile-nav {
    transform: translateX(0);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-nav-list a {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--color-slate-700);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mobile-nav-list a:hover {
    background: var(--color-teal-50);
    color: var(--color-teal-600);
}

/* --- Responsive --- */
@media (max-width: 1023px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-headline br {
        display: block;
    }

    .about-grid,
    .space-showcase,
    .visit-grid {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .about-image-secondary {
        right: 0;
        bottom: -20px;
    }

    .about-image-badge {
        left: 0;
        top: -12px;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 var(--space-4);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-list {
        display: none;
    }

    .hero {
        padding-top: 72px;
    }

    .hero-grid {
        padding: var(--space-10) 0;
    }

    .hero-headline {
        font-size: clamp(2.25rem, 10vw, 3rem);
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-4);
    }

    .stat-divider {
        display: none;
    }

    .about, .menu, .space, .visit {
        padding: var(--space-16) 0;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .space-image-grid {
        grid-template-columns: 1fr;
    }

    .space-img-1 {
        grid-row: span 1;
    }

    .space-img img {
        height: 240px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-brand {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
    }
}

/* --- Animations --- */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

    .fade-in-delay-1 { transition-delay: 0.1s; }
    .fade-in-delay-2 { transition-delay: 0.2s; }
    .fade-in-delay-3 { transition-delay: 0.3s; }
}
