/* ============================================
   Mrs. Sprinkles Ice Cream — Stylesheet
   Palette: Deep Navy (#1a2744) + Warm Gold (#c9a84c)
   Fonts: Playfair Display (serif) + Lato (sans)
   ============================================ */

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

:root {
    --navy: #1a2744;
    --navy-light: #243352;
    --navy-dark: #111b30;
    --gold: #c9a84c;
    --gold-light: #d4b96a;
    --gold-dark: #a88a3a;
    --cream: #faf6ef;
    --cream-dark: #f0e8d8;
    --warm-white: #fdfcf8;
    --text-dark: #1a1a1a;
    --text-muted: #5a5a5a;
    --text-light: #f5f0e8;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    --container-max: 1200px;
    --header-height: 80px;
    --transition: 0.3s ease;
}

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

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

/* Preloader */
#page-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-inner {
    text-align: center;
}
.preloader-logo {
    font-family: var(--font-serif);
    color: var(--gold);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 1rem;
}
.preloader-bar {
    width: 120px;
    height: 2px;
    background: var(--navy-light);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}
.preloader-fill {
    display: block;
    height: 100%;
    width: 40%;
    background: var(--gold);
    border-radius: 2px;
    animation: preloaderSlide 0.8s ease-in-out infinite;
}
@keyframes preloaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--gold);
    color: var(--navy);
    padding: 0.5rem 1rem;
    z-index: 100;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}
.skip-link:focus {
    top: 1rem;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h3 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
}

/* Section eyebrow */
.section-eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 1rem;
}
.section-eyebrow.light {
    color: var(--gold);
}

/* Section title */
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: var(--navy);
    margin-bottom: 1.25rem;
}
.section-title.light {
    color: var(--warm-white);
}

/* Section subtitle */
.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-gold {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}
.btn-outline-light {
    background: transparent;
    color: var(--warm-white);
    border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline-light:hover {
    border-color: var(--warm-white);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.8rem;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
    background: rgba(26, 39, 68, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--warm-white);
    font-family: var(--font-serif);
}
.logo-icon {
    color: var(--gold);
}
.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.logo-light {
    color: var(--warm-white);
}

/* Nav */
.primary-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}
.primary-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: color var(--transition);
    position: relative;
}
.primary-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width var(--transition);
}
.primary-nav a:hover {
    color: var(--gold);
}
.primary-nav a:hover::after {
    width: 100%;
}

/* Nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
}
.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--warm-white);
    position: relative;
    transition: background var(--transition);
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--warm-white);
    transition: transform var(--transition);
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}
.nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(17, 27, 48, 0.88) 0%,
        rgba(26, 39, 68, 0.75) 50%,
        rgba(26, 39, 68, 0.65) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 8rem 0 4rem;
}
.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.5rem;
}
.hero-headline {
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    font-weight: 700;
    color: var(--warm-white);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.hero-headline em {
    color: var(--gold);
    font-style: italic;
}
.hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 560px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}
.hero-trust {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
}
.trust-item svg {
    color: var(--gold);
}
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.5; transform: scaleY(0.7); }
}

/* ============================================
   ABOUT
   ============================================ */
.about {
    padding: 7rem 0;
    background: var(--warm-white);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-images {
    position: relative;
}
.about-img-main {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(26, 39, 68, 0.15);
}
.about-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.about-img-secondary {
    position: absolute;
    bottom: -2rem;
    right: -2rem;
    width: 55%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(26, 39, 68, 0.2);
    border: 4px solid var(--warm-white);
}
.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.about-accent {
    position: absolute;
    top: -1.5rem;
    left: -1.5rem;
    width: 100px;
    height: 100px;
    background: var(--gold);
    border-radius: 4px;
    z-index: -1;
    opacity: 0.3;
}
.about-text .section-eyebrow {
    margin-bottom: 0.75rem;
}
.about-text .section-title {
    margin-bottom: 1.5rem;
}
.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1rem;
}
.about-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cream-dark);
}
.stat {
    flex: 1;
    text-align: center;
}
.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.stat-divider {
    width: 1px;
    background: var(--cream-dark);
    align-self: stretch;
}

/* ============================================
   FLAVORS
   ============================================ */
.flavors {
    padding: 7rem 0;
    background: var(--cream);
}
.section-header {
    margin-bottom: 3.5rem;
}
.text-center {
    text-align: center;
}
.flavors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.flavor-card {
    background: var(--warm-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 39, 68, 0.06);
    transition: transform var(--transition), box-shadow var(--transition);
}
.flavor-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(26, 39, 68, 0.12);
}
.flavor-card-visual {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    position: relative;
}
.flavor-card-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1;
}
.flavor-card-icon {
    color: rgba(255, 255, 255, 0.6);
}
.flavor-card-body {
    padding: 1.5rem;
}
.flavor-card-name {
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}
.flavor-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.flavor-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-dark);
    background: rgba(201, 168, 76, 0.12);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}
.flavors-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   CRAFT
   ============================================ */
.craft {
    position: relative;
    padding: 7rem 0;
    overflow: hidden;
}
.craft-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.craft-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.craft-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(17, 27, 48, 0.92) 0%,
        rgba(26, 39, 68, 0.85) 100%
    );
}
.craft-content {
    position: relative;
    z-index: 1;
}
.craft-content .section-header {
    margin-bottom: 3.5rem;
}
.craft-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.craft-step {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: background var(--transition);
}
.craft-step:hover {
    background: rgba(255, 255, 255, 0.08);
}
.craft-step-num {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.8;
}
.craft-step-title {
    font-size: 1.25rem;
    color: var(--warm-white);
    margin-bottom: 0.75rem;
}
.craft-step p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials {
    padding: 7rem 0;
    background: var(--warm-white);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.testimonial-card {
    background: var(--cream);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(26, 39, 68, 0.1);
}
.testimonial-quote {
    color: var(--gold);
    opacity: 0.4;
    margin-bottom: 1rem;
}
.testimonial-text {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--navy);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.testimonial-name {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    font-style: normal;
}
.testimonial-location {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   VISIT
   ============================================ */
.visit {
    padding: 7rem 0;
    background: var(--cream);
}
.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.visit-intro {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.contact-item dt {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 0.35rem;
}
.contact-item dt svg {
    color: var(--gold);
}
.contact-item dd {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.contact-item a {
    color: var(--navy);
    text-decoration: none;
    transition: color var(--transition);
}
.contact-item a:hover {
    color: var(--gold-dark);
}
.hours-day {
    display: block;
    font-weight: 600;
    color: var(--navy);
    font-size: 0.9rem;
}
.hours-time {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.visit-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(26, 39, 68, 0.12);
    min-height: 450px;
}
.visit-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 450px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 1rem;
    max-width: 300px;
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-nav a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}
.footer-nav a:hover {
    color: var(--gold);
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}
.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color var(--transition);
}
.footer-bottom a:hover {
    color: var(--gold);
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--navy);
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 50;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--gold);
    color: var(--navy);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .flavors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .craft-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    .nav-toggle {
        display: block;
    }
    .primary-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--navy);
        padding: 6rem 2rem 2rem;
        transform: translateX(100%);
        transition: transform var(--transition);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    }
    .primary-nav.open {
        transform: translateX(0);
    }
    .primary-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .primary-nav a {
        font-size: 1rem;
    }
    .hero-content {
        padding: 7rem 0 3rem;
    }
    .hero-headline {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        text-align: center;
        justify-content: center;
    }
    .hero-trust {
        gap: 1rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .about-img-secondary {
        right: 0;
        bottom: -1.5rem;
    }
    .flavors-grid {
        grid-template-columns: 1fr;
    }
    .craft-steps {
        grid-template-columns: 1fr;
    }
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 1;
        max-width: 100%;
    }
    .visit-grid {
        grid-template-columns: 1fr;
    }
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }
    .about, .flavors, .craft, .testimonials, .visit {
        padding: 4rem 0;
    }
    .about-stats {
        flex-direction: column;
        gap: 1.25rem;
    }
    .stat-divider {
        width: 100%;
        height: 1px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .back-to-top {
        transition: none;
    }
}
