/* =====================================================
   DRYDOWN — Modern Editorial Design System
   ===================================================== */

/* ---- Self-hosted body font ---- */
@font-face {
    font-family: 'Outfit';
    src: url('/static/fonts/Outfit-Variable.woff2') format('woff2-variations'),
         url('/static/fonts/Outfit-Variable.woff2') format('woff2'),
         url('/static/fonts/Outfit-Variable.woff') format('woff'),
         url('/static/fonts/Outfit-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: #FAFAF8;
    color: #1A1A1A;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Mobile: prevent iOS auto-zoom on input focus, keep layout fluid */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: hidden; }
input, select, textarea, .form-input {
    font-size: 16px !important;
}
img, video { max-width: 100%; height: auto; }

/* =====================================================
   CUSTOM CURSOR (desktop only) — near-black / accent
   ===================================================== */

@media (hover: hover) and (pointer: fine) {
    *, *::before, *::after {
        cursor: none !important;
    }
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(26, 26, 26, 0.25);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    mix-blend-mode: exclusion;
}

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 5px;
    height: 5px;
    background-color: #1A1A1A;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100000;
    transform: translate(-50%, -50%);
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.cursor-ring.cursor-hover {
    width: 48px;
    height: 48px;
    border-color: rgba(169, 104, 61, 0.6);
    background-color: rgba(169, 104, 61, 0.04);
}

.cursor-dot.cursor-hover {
    width: 3px;
    height: 3px;
    opacity: 0.5;
}

.cursor-ring.cursor-active {
    width: 24px;
    height: 24px;
    border-color: #A9683D;
    background-color: rgba(169, 104, 61, 0.08);
}

.cursor-dot.cursor-active {
    width: 8px;
    height: 8px;
    background-color: rgba(169, 104, 61, 0.5);
}

.cursor-ring.cursor-text {
    width: 4px;
    height: 28px;
    border-radius: 2px;
    border-color: #1A1A1A;
    background-color: rgba(26, 26, 26, 0.08);
}

.cursor-dot.cursor-text {
    opacity: 0;
}

@media (hover: none) or (pointer: coarse) {
    .cursor-ring,
    .cursor-dot {
        display: none !important;
    }
}

/* =====================================================
   MOBILE BOTTOM NAV BAR
   ===================================================== */

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid #E8E6E1;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 12px;
    color: #6B6B6B;
    text-decoration: none;
    transition: color 0.2s ease,
                transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.9);
}

.mobile-bottom-nav .nav-item.active {
    color: #A9683D;
}

.mobile-bottom-nav .nav-item .nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-bottom-nav .nav-item .nav-icon img,
.mobile-bottom-nav .nav-item .nav-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-item.active .nav-icon img,
.mobile-bottom-nav .nav-item.active .nav-icon svg {
    transform: scale(1.1);
}

.mobile-bottom-nav .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #A9683D;
}

/* =====================================================
   CARD DEPTH — minimal, modern
   ===================================================== */

.card-warm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.25s ease,
                transform 0.25s ease;
}

.card-warm:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* =====================================================
   BUTTON UTILITIES — modern, confident
   ===================================================== */

/* Primary CTA — near-black fill, clean and authoritative */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background-color: #1A1A1A;
    padding: 0.6rem 1.5rem;
    border: 1px solid #1A1A1A;
    border-radius: 4px;
    text-decoration: none;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                background-color 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
    background-color: #333;
    border-color: #333;
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Secondary — outlined, understated */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1A1A1A;
    background-color: transparent;
    padding: 0.6rem 1.5rem;
    border: 1px solid #E8E6E1;
    border-radius: 4px;
    text-decoration: none;
    transition: border-color 0.2s ease,
                color 0.2s ease,
                transform 0.2s ease;
}
.btn-secondary:hover {
    border-color: #A9683D;
    color: #A9683D;
    transform: scale(1.02);
}

/* =====================================================
   FADE-IN ANIMATION
   ===================================================== */

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

.fade-in-up {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered children */
.fade-in-up:nth-child(1) { animation-delay: 0ms; }
.fade-in-up:nth-child(2) { animation-delay: 60ms; }
.fade-in-up:nth-child(3) { animation-delay: 120ms; }
.fade-in-up:nth-child(4) { animation-delay: 180ms; }
.fade-in-up:nth-child(5) { animation-delay: 240ms; }
.fade-in-up:nth-child(6) { animation-delay: 300ms; }

/* =====================================================
   MOBILE RESPONSIVENESS
   ===================================================== */

@media (max-width: 767px) {
    main {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    header .grid {
        height: 48px !important;
    }

    header a span[class*="tracking-"] {
        font-size: 1.15rem !important;
        letter-spacing: 0.2em !important;
    }

    .border {
        border-radius: 6px;
    }
}

@media (max-width: 380px) {
    main {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    header a span[class*="tracking-"] {
        font-size: 1rem !important;
        letter-spacing: 0.15em !important;
    }
}

@media (max-width: 767px) {
    a, button {
        -webkit-tap-highlight-color: transparent;
    }
}

@supports (padding: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(6px + env(safe-area-inset-bottom));
    }
}
