/* ========================================
   ANYANDALL — Shared Styles
   Used across all pages
   ======================================== */

/* ========================================
   CSS VARIABLES — Warm Palette
   ======================================== */
:root {
    --cream: #FAF6F0;
    --warm-white: #FDF9F3;
    --cloud: #FEFCF8;
    --parchment: #F3EBE0;
    --sepia: #C4A882;
    --sepia-dark: #8B7355;
    --sepia-deep: #6B5740;
    --sepia-light: #E8D5BE;
    --sky: #7BAFE2;
    --sky-soft: #A8CEF0;
    --sky-pale: #D4E8F7;
    --sun: #F2C94C;
    --sun-glow: #FAEDC4;
    --sun-bright: #FFD966;
    --sun-warm: #E8A838;
    --text-primary: #3A3028;
    --text-secondary: #6B5D50;
    --text-tertiary: #9B8E80;
    --shadow-warm: rgba(139, 115, 85, 0.12);
    --shadow-warm-lg: rgba(139, 115, 85, 0.18);

    --font-display: 'Fraunces', serif;
    --font-body: 'Outfit', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background-color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Subtle grain texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

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

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

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    letter-spacing: -0.02em;
    font-variation-settings: 'opsz' 144;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.015em;
    font-variation-settings: 'opsz' 72;
}

h3 {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 500;
    font-variation-settings: 'opsz' 36;
}

p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 60ch;
}

.label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--sepia);
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.nav.scrolled {
    background: rgba(253, 249, 243, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(139, 115, 85, 0.08);
    padding: 0.8rem 3rem;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variation-settings: 'opsz' 144;
    display: flex;
    align-items: baseline;
    gap: 0;
}

.nav-logo sup {
    font-size: 0.7em;
    color: var(--sun-warm);
    margin-left: 1px;
    font-weight: 700;
}

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

.nav-links a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--sun);
    transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

.nav-links a.nav-cta {
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    background: var(--text-primary);
    color: var(--warm-white) !important;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
    cursor: pointer;
    border: none;
}

.nav-links a.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--shadow-warm-lg);
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.35s var(--ease-out-expo);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--cream);
    box-shadow: 0 2px 12px var(--shadow-warm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-warm-lg);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--sun) 0%, var(--sun-warm) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--sepia-light);
}

.btn-outline:hover {
    border-color: var(--sepia);
    background: rgba(196, 168, 130, 0.06);
    transform: translateY(-2px);
}

.btn-arrow {
    display: inline-block;
    transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* ========================================
   SECTION LAYOUT
   ======================================== */
section {
    padding: 7rem 3rem;
}

.section-inner {
    max-width: 1140px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header .label {
    margin-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Alternating section backgrounds */
.section-warm {
    background: var(--parchment);
    position: relative;
}

.section-warm::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sepia-light), transparent);
}

.section-warm::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sepia-light), transparent);
}

/* ========================================
   PAGE HERO (inner pages)
   ======================================== */
.page-hero {
    padding: 10rem 3rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 60% 30%, var(--sun-glow) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 30% 70%, var(--sky-pale) 0%, transparent 50%),
        linear-gradient(180deg, var(--warm-white) 0%, var(--cream) 100%);
    z-index: 0;
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.page-hero-content .label {
    margin-bottom: 1rem;
}

.page-hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    margin-bottom: 1.2rem;
}

.page-hero-content p {
    font-size: 1.15rem;
    margin: 0 auto;
    line-height: 1.8;
    max-width: 50ch;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 4rem 3rem 3rem;
    border-top: 1px solid rgba(196, 168, 130, 0.15);
}

.footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .footer-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.footer-brand .footer-logo sup {
    font-size: 0.65em;
    color: var(--sun-warm);
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    max-width: 30ch;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sepia);
    margin-bottom: 1.2rem;
}

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

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul a {
    font-size: 0.92rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-col ul a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid rgba(196, 168, 130, 0.1);
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* Legacy simple footer (for index.html compatibility) */
.footer-simple {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(196, 168, 130, 0.15);
}

.footer-text {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* ========================================
   SMOOTH SCROLL OFFSET
   ======================================== */
section[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav.scrolled {
        padding: 0.7rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(253, 249, 243, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    section {
        padding: 5rem 1.5rem;
    }

    .page-hero {
        padding: 8rem 1.5rem 4rem;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-simple {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}
