/* ==========================================================
   Santo — Panadería Artesanal
   Cream background, blue (#1827dc) text, Richmond Display font
   Inspired by Formaje + Sqirl
   ========================================================== */

/* === Font Faces === */
@font-face {
    font-family: 'Richmond Display';
    src: url('fonts/RichmondDisplay-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Richmond Display';
    src: url('fonts/RichmondDisplay-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Richmond Display';
    src: url('fonts/RichmondDisplay-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Richmond Display';
    src: url('fonts/RichmondDisplay-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Richmond Text';
    src: url('fonts/RichmondText-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Richmond Text';
    src: url('fonts/RichmondText-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

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

/* === Variables === */
:root {
    --blue: #1827dc;
    --blue-dark: #0c14a0;
    --blue-deeper: #080e70;
    --cream: #f5f0e8;
    --cream-dark: #ebe5d9;
    --white: #ffffff;
    --black: #111111;
    --blue-muted: rgba(24, 39, 220, 0.45);
    --blue-subtle: rgba(24, 39, 220, 0.08);

    --font-display: 'Richmond Display', Georgia, serif;
    --font-text: 'Richmond Text', Georgia, serif;
    --font-body: 'Space Grotesk', Helvetica, sans-serif;
}

/* Screen-reader only — visible to crawlers, hidden visually */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    background-color: var(--blue);
    color: var(--cream);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--cream);
    text-decoration: none;
}

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

/* ==========================================================
   NAVIGATION — Clean, minimal
   ========================================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background-color: rgba(24, 39, 220, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 26px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-logo-img.visible {
    opacity: 1;
}

.nav-links {
    display: flex;
    align-items: baseline;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cream);
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.5;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-4px);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    white-space: nowrap;
    font-size: 0.7rem !important;
    letter-spacing: 0.08em;
    padding: 0.4rem 1rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.nav-dropdown-menu a:hover {
    opacity: 1 !important;
}

.nav-instagram {
    display: flex;
    align-items: center;
    color: var(--cream);
    transition: opacity 0.3s;
    position: relative;
    top: 3px;
}

.nav-instagram:hover {
    opacity: 0.5;
}

.nav-order {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cream);
    cursor: default;
    transition: color 0.3s;
}

.nav-order:hover {
    color: rgba(150, 180, 255, 0.7);
}

.lang-toggle {
    background: none;
    border: 1px solid rgba(245, 240, 232, 0.3);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.lang-toggle:hover {
    background: var(--cream);
    color: var(--blue);
}

/* ==========================================================
   BUTTONS — Formaje-inspired: thin border, wide tracking
   ========================================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 1px solid var(--cream);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--cream);
    color: var(--blue);
}

.btn--hero {
    color: var(--cream);
    border-color: var(--cream);
}

.btn--hero:hover {
    background: var(--cream);
    color: var(--blue);
}

.btn--light {
    color: var(--white);
    border-color: var(--white);
}

.btn--light:hover {
    background: var(--white);
    color: var(--blue);
}

.btn--outline {
    color: var(--blue);
    border-color: var(--blue);
}

.btn--outline:hover {
    background: var(--blue);
    color: var(--cream);
}

.btn--small {
    padding: 0.6rem 1.5rem;
    font-size: 0.7rem;
}

/* === Link Arrow — Formaje-style arrow links === */
.link-arrow {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cream);
    transition: opacity 0.3s;
}

.link-arrow:hover {
    opacity: 0.5;
}

/* ==========================================================
   HERO — Fixed parallax, content scrolls over it
   ========================================================== */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background: var(--blue);
    overflow: hidden;
    z-index: 0;
}

/* Subtle animated grain texture overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    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)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 0.4;
    pointer-events: none;
    animation: grain 8s steps(10) infinite;
    z-index: 1;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* Spacer to push content below the fixed hero */
.hero-spacer {
    height: 100vh;
    min-height: 600px;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
    transition: opacity 0.8s ease-out;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    z-index: 2;
    transition: opacity 0.1s linear;
}

.hero-giant-logo {
    width: clamp(400px, 65vw, 900px);
    height: auto;
    object-fit: contain;
}

/* ==========================================================
   MAIN CONTENT — Scrolls over fixed hero
   ========================================================== */
.main-content {
    position: relative;
    z-index: 1;
    background: var(--blue);
}

/* ==========================================================
   SECTION ELEMENTS
   ========================================================== */
.section {
    padding: 6rem 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--cream);
}

/* ==========================================================
   MENU SECTION — White background, blue text
   ========================================================== */
#menu {
    background: var(--white);
    color: var(--blue);
    max-width: none;
    padding: 6rem 2.5rem;
}

#menu .section-header {
    max-width: 1400px;
    margin: 0 auto 3rem;
    border-bottom-color: rgba(24, 39, 220, 0.15);
}

#menu .section-title {
    color: var(--blue);
}

#menu .link-arrow {
    color: var(--blue);
}

#menu .product-card {
    color: var(--blue);
}

#menu .product-grid {
    max-width: 1400px;
    margin: 0 auto;
}

/* ==========================================================
   PRODUCT GRID — Clean cards, centered text
   ========================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem 1.25rem;
}

.product-card {
    text-decoration: none;
    color: var(--cream);
    display: block;
    text-align: center;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-img-wrap {
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.product-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* ==========================================================
   SPLIT SECTION — Formaje-style: photo + text below
   ========================================================== */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--blue);
}

.split-panel {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--cream);
    cursor: pointer;
}

.split-img-wrap {
    overflow: hidden;
    height: 55vh;
}

.split-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.split-text {
    padding: 2.5rem 2.5rem 3.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.split-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--cream);
}

.split-desc {
    font-size: 0.9rem;
    color: rgba(245, 240, 232, 0.5);
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ==========================================================
   ABOUT SECTION — White background, editorial layout
   ========================================================== */
.about-section {
    background: var(--white);
    color: var(--blue);
    padding: 7rem 2.5rem;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(24, 39, 220, 0.1);
    color: var(--blue);
}

.about-text {
    columns: 2;
    column-gap: 3rem;
}

.about-text p {
    font-family: var(--font-text);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(24, 39, 220, 0.7);
    margin-bottom: 1.5rem;
}

/* ==========================================================
   VAL & GEORGE — Founders bio section
   ========================================================== */
.founders-section {
    background: #F5F0E8;
    color: var(--blue);
    padding: 5rem 2.5rem;
}

.founders-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.founders-photo {
    overflow: hidden;
    border-radius: 4px;
}

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

.founders-bio {
    text-align: right;
}

.founders-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--blue);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(24, 39, 220, 0.1);
}

.founders-bio p {
    font-family: var(--font-text);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.85;
    color: rgba(24, 39, 220, 0.6);
    margin-bottom: 1.25rem;
}

/* ==========================================================
   WHERE TO FIND US — Stockist locations
   ========================================================== */
.stockists-section {
    background: var(--white);
    color: var(--blue);
    padding: 5rem 2.5rem 6rem;
    border-top: 1px solid rgba(24, 39, 220, 0.08);
}

.stockists-content {
    max-width: 900px;
    margin: 0 auto;
}

.stockists-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--blue);
}

.stockists-subtitle {
    font-family: var(--font-text);
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(24, 39, 220, 0.55);
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(24, 39, 220, 0.1);
}

.stockists-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stockist-item {
    padding: 2rem;
    border: 1px solid rgba(24, 39, 220, 0.1);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.stockist-item:hover {
    border-color: rgba(24, 39, 220, 0.3);
}

.stockist-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--blue);
    margin-bottom: 0.4rem;
}

.stockist-type {
    font-family: var(--font-text);
    font-size: 0.85rem;
    color: rgba(24, 39, 220, 0.5);
    letter-spacing: 0.03em;
}

/* ==========================================================
   INSTAGRAM FEED — Edge-to-edge photo grid
   ========================================================== */
.instagram-section {
    background: var(--blue);
    padding: 4rem 2.5rem 0;
}

.instagram-header {
    max-width: 1400px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.instagram-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--cream);
}

.instagram-follow {
    color: var(--cream);
}

.instagram-carousel {
    display: flex;
    overflow-x: auto;
    gap: 0;
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.instagram-carousel::-webkit-scrollbar {
    display: none;
}

.instagram-carousel:active {
    cursor: grabbing;
}

.instagram-item {
    display: block;
    overflow: hidden;
    position: relative;
    flex: 0 0 calc(100% / 6);
    min-width: calc(100% / 6);
}

.instagram-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(24, 39, 220, 0.0);
    transition: background 0.3s ease;
}

.instagram-item:hover::after {
    background: rgba(24, 39, 220, 0.25);
}

.instagram-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.instagram-item:hover .instagram-img {
    transform: scale(1.05);
}

/* ==========================================================
   VISIT SECTION
   ========================================================== */
.visit-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.visit-title {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.visit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.visit-item h3 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: rgba(245, 240, 232, 0.5);
}

.visit-item p,
.visit-item a {
    font-family: var(--font-text);
    font-size: 0.95rem;
    color: var(--cream);
    font-weight: 400;
    line-height: 1.8;
}

.visit-accent {
    font-family: var(--font-display);
    font-style: italic;
    opacity: 0.6;
    margin-top: 0.5rem;
}

/* ==========================================================
   FOOTER — Formaje-inspired: multi-column with logo
   ========================================================== */
.footer {
    background: var(--white);
    padding: 4rem 2.5rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(24, 39, 220, 0.12);
}

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    opacity: 1;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(24, 39, 220, 0.55);
    margin-bottom: 0.5rem;
}

.footer-col a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--blue);
    opacity: 0.85;
    transition: opacity 0.3s;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 1.5rem;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: rgba(24, 39, 220, 0.5);
    font-weight: 300;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .instagram-item {
        flex: 0 0 calc(100% / 4);
        min-width: calc(100% / 4);
    }

    .visit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero {
        min-height: 85vh;
    }

    .hero-overlay {
        padding: 6rem 1.5rem 2rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .split-section {
        grid-template-columns: 1fr;
    }

    .split-img-wrap {
        height: 40vh;
    }

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

    .instagram-item {
        flex: 0 0 calc(100% / 4);
        min-width: calc(100% / 4);
    }

    .instagram-section {
        padding: 3rem 1.5rem 0;
    }

    .about-section {
        padding: 5rem 1.5rem;
    }

    .about-text {
        columns: 1;
    }

    .founders-section {
        padding: 3.5rem 1.5rem;
    }

    .founders-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .founders-bio {
        text-align: left;
    }

    .stockists-section {
        padding: 4rem 1.5rem 5rem;
    }

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

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

@media (max-width: 480px) {
    .nav-links a {
        font-size: 0.7rem;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

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

    .hero-giant-logo {
        width: clamp(280px, 85vw, 400px);
    }

    .instagram-item {
        flex: 0 0 calc(100% / 3);
        min-width: calc(100% / 3);
    }

    .instagram-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .section-header {
        flex-direction: column;
        gap: 0.75rem;
    }
}
