/* ============================================
   The Coffee Closet — Styles
   Palette: Terracotta + Sand + Deep Charcoal
   ============================================ */

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

:root {
    --color-terracotta: #B85C38;
    --color-terracotta-dark: #9A4B2C;
    --color-terracotta-light: #D4845E;
    --color-sand: #F5E6D3;
    --color-sand-light: #FBF4EC;
    --color-sand-dark: #E8D5C0;
    --color-charcoal: #1A1A1A;
    --color-dark: #2C2C2C;
    --color-mid: #5A5A5A;
    --color-light: #F9F6F3;
    --color-white: #FFFFFF;
    --color-hero-start: #8B3A2A;
    --color-hero-mid: #B85C38;
    --color-hero-end: #D4845E;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.06);
    --shadow-md: 0 8px 30px rgba(26, 26, 26, 0.1);
    --shadow-lg: 0 20px 60px rgba(26, 26, 26, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--color-dark);
    background: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typography ---------- */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: 12px;
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-charcoal);
    margin-bottom: 20px;
}

.section-sub {
    font-size: 1.1rem;
    color: var(--color-mid);
    max-width: 560px;
    line-height: 1.7;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header .section-sub {
    margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-terracotta);
    color: var(--color-white);
    border-color: var(--color-terracotta);
}

.btn--primary:hover {
    background: var(--color-terracotta-dark);
    border-color: var(--color-terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 92, 56, 0.3);
}

.btn--ghost {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn--ghost:hover {
    background: var(--color-white);
    color: var(--color-terracotta);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(0px);
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white);
    transition: var(--transition);
}

.nav.scrolled .nav__logo {
    color: var(--color-charcoal);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.nav.scrolled .nav__link {
    color: var(--color-mid);
}

.nav.scrolled .nav__link:hover {
    color: var(--color-terracotta);
    background: var(--color-sand-light);
}

.nav__link--cta {
    background: var(--color-terracotta);
    color: var(--color-white) !important;
    margin-left: 8px;
}

.nav__link--cta:hover {
    background: var(--color-terracotta-dark);
}

/* Mobile toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: var(--transition);
}

.nav.scrolled .nav__bar {
    background: var(--color-charcoal);
}

.nav__toggle[aria-expanded="true"] .nav__bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle[aria-expanded="true"] .nav__bar:nth-child(2) {
    opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition);
}

.nav__overlay.active {
    display: block;
    opacity: 1;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--color-hero-start) 0%,
        var(--color-hero-mid) 50%,
        var(--color-hero-end) 100%
    );
    z-index: 0;
}

.hero__gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(139, 58, 42, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(212, 132, 94, 0.3) 0%, transparent 60%);
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero__eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.hero__headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: 24px;
}

.hero__sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 1;
}

.hero__arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
    50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

/* ---------- Section spacing ---------- */
.section {
    padding: 100px 0;
}

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

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about__text .section-heading {
    margin-bottom: 24px;
}

.about__text p {
    font-size: 1.05rem;
    color: var(--color-mid);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about__stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--color-sand-dark);
}

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

.stat__number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-terracotta);
    line-height: 1;
}

.stat__label {
    font-size: 0.85rem;
    color: var(--color-mid);
    font-weight: 500;
}

/* ---------- Menu ---------- */
.menu {
    background: var(--color-sand-light);
}

.menu__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.menu-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.menu-card__img-wrap {
    overflow: hidden;
    aspect-ratio: 4/3;
}

.menu-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover .menu-card__img-wrap img {
    transform: scale(1.05);
}

.menu-card__body {
    padding: 24px;
}

.menu-card__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin-bottom: 10px;
}

.menu-card__desc {
    font-size: 0.95rem;
    color: var(--color-mid);
    line-height: 1.7;
}

/* ---------- Gallery ---------- */
.gallery {
    background: var(--color-white);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 16px;
}

.gallery__item {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

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

.gallery__item--wide {
    grid-column: span 12;
}

.gallery__item:nth-child(2),
.gallery__item:nth-child(3),
.gallery__item:nth-child(4),
.gallery__item:nth-child(5) {
    grid-column: span 6;
}

.gallery__item:nth-child(6) {
    grid-column: span 12;
}

/* ---------- Visit ---------- */
.visit {
    background: var(--color-sand-light);
}

.visit__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.visit__info .section-heading {
    margin-bottom: 20px;
}

.visit__desc {
    font-size: 1.05rem;
    color: var(--color-mid);
    line-height: 1.8;
    margin-bottom: 36px;
}

.visit__details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.visit__detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.visit__detail dt {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-terracotta);
    color: var(--color-white);
    border-radius: var(--radius-sm);
}

.visit__detail dd {
    font-size: 1rem;
    color: var(--color-dark);
    line-height: 1.6;
}

.visit__detail dd a {
    color: var(--color-terracotta);
    font-weight: 500;
    transition: var(--transition);
}

.visit__detail dd a:hover {
    color: var(--color-terracotta-dark);
    text-decoration: underline;
}

/* Form */
.visit__form-wrap {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.visit__form-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin-bottom: 8px;
}

.visit__form-sub {
    font-size: 0.95rem;
    color: var(--color-mid);
    margin-bottom: 28px;
    line-height: 1.6;
}

.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-dark);
    background: var(--color-sand-light);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}

.form__input:focus,
.form__textarea:focus {
    border-color: var(--color-terracotta);
    background: var(--color-white);
    box-shadow: 0 0 0 4px rgba(184, 92, 56, 0.1);
}

.form__input::placeholder,
.form__textarea::placeholder {
    color: var(--color-sand-dark);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__success {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 18px;
    background: #E8F5E9;
    border-radius: var(--radius-sm);
    color: #2E7D32;
    font-size: 0.9rem;
    font-weight: 500;
}

.form__success.visible {
    display: flex;
}

.form__success svg {
    flex-shrink: 0;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--color-charcoal);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer__brand .footer__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 16px;
}

.footer__brand p {
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer__links h4,
.footer__contact h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 16px;
}

.footer__links ul,
.footer__contact ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__links a,
.footer__contact a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer__links a:hover,
.footer__contact a:hover {
    color: var(--color-terracotta-light);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer__bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- Scroll animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .menu__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__grid,
    .visit__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about__media {
        order: -1;
    }

    .about__media img {
        height: 400px;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
        z-index: 1001;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 32px 40px;
        gap: 4px;
        background: var(--color-white);
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav__menu.open {
        transform: translateX(0);
    }

    .nav__link {
        color: var(--color-dark);
        font-size: 1rem;
        width: 100%;
        padding: 12px 16px;
    }

    .nav__link:hover {
        background: var(--color-sand-light);
        color: var(--color-terracotta);
    }

    .nav__link--cta {
        margin-left: 0;
        margin-top: 12px;
        text-align: center;
        width: 100%;
    }

    .hero {
        min-height: 100svh;
        padding: 100px 24px 80px;
    }

    .hero__headline {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .section {
        padding: 72px 0;
    }

    .menu__grid {
        grid-template-columns: 1fr;
    }

    .gallery__item--wide,
    .gallery__item:nth-child(2),
    .gallery__item:nth-child(3),
    .gallery__item:nth-child(4),
    .gallery__item:nth-child(5),
    .gallery__item:nth-child(6) {
        grid-column: span 12;
    }

    .gallery__item {
        aspect-ratio: 16/10;
    }

    .about__stats {
        gap: 24px;
    }

    .visit__form-wrap {
        padding: 28px;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

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

    .hero__actions .btn {
        width: 100%;
    }

    .about__stats {
        flex-direction: column;
        gap: 20px;
    }

    .container {
        padding: 0 16px;
    }
}
