/* ==============================================================
   Inglima Food - Main Stylesheet
   Premium coming-soon landing page.
   ============================================================== */


/* ==============================================================
   1. CUSTOM PROPERTIES (Design Tokens)
   All brand colours, fonts, and shared values in one place.
   ============================================================== */

:root {
    /* Colours */
    --bg-primary:    #0c0c0c;
    --bg-elevated:   #141414;
    --text-primary:  #f5f0e8;
    --text-muted:    rgba(245, 240, 232, 0.55);
    --gold-accent:   #d4a853;
    --gold-hover:    #c49a48;
    --gold-subtle:   rgba(212, 168, 83, 0.25);
    --deep-red:      #8b1a1a;
    --map-land:      #1a1a1a;
    --map-border:    #2a2a2a;

    /* Typography */
    --font-display:  'Playfair Display', 'Georgia', serif;
    --font-body:     'Inter', 'Helvetica Neue', Arial, sans-serif;
    --fw-black:      900;
    --fw-semibold:   600;
    --fw-regular:    400;

    /* Spacing */
    --section-pad:   clamp(3rem, 8vh, 6rem) clamp(1.5rem, 5vw, 4rem);

    /* Transitions */
    --ease-smooth:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition:    0.4s var(--ease-smooth);
}


/* ==============================================================
   2. RESET & BASE
   Minimal reset; let the browser defaults work where sensible.
   ============================================================== */

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

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

body {
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--gold-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover,
a:focus-visible {
    color: var(--gold-hover);
}

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


/* ==============================================================
   3. TYPOGRAPHY
   Heading hierarchy using the display serif.
   ============================================================== */

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: var(--fw-black);
    line-height: 1.15;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.4rem, 5.5vw, 5.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
}

p {
    max-width: 38em;
}


/* ==============================================================
   4. GRAIN TEXTURE OVERLAY
   Adds analog depth to the dark background via a fixed
   pseudo-element with a subtle noise pattern.
   ============================================================== */

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    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;
}


/* ==============================================================
   5. LAYOUT: SITE HEADER
   Fixed header with logo and minimal navigation.
   ============================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem clamp(1.5rem, 5vw, 4rem);
    background: linear-gradient(to bottom, rgba(12, 12, 12, 0.95), rgba(12, 12, 12, 0));
    pointer-events: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    pointer-events: auto;
}

.header-logo-link {
    display: block;
    flex-shrink: 0;
}

.header-logo {
    width: clamp(120px, 15vw, 180px);
    height: auto;
}

.header-nav {
    display: flex;
    gap: clamp(1.25rem, 3vw, 2.5rem);
}

.header-nav a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    transition: color var(--transition);
}

.header-nav a:hover,
.header-nav a:focus-visible {
    color: var(--gold-accent);
}


/* ==============================================================
   6. LAYOUT: HERO SECTION
   Full-viewport height with looping background video,
   dark overlay, and vertically centered content.
   ============================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Video wrapper: covers the entire hero, sits behind content */
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark overlay on top of the video for readability */
.hero-video-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 12, 0.7);
    z-index: 1;
}

/* Hero content floats above the video + overlay */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--section-pad);
}

.hero-logo {
    width: min(320px, 55vw);
    height: auto;
    margin-bottom: 2.5rem;
}

.hero-headline {
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--text-muted);
    letter-spacing: 0.04em;
    max-width: 32em;
}

/* Smooth crossfade when switching video sources */
.hero-video.fading {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-video:not(.fading) {
    opacity: 1;
    transition: opacity 0.6s ease;
}


/* ==============================================================
   7. GOLD SEPARATOR
   Thin decorative horizontal rule between sections.
   ============================================================== */

.gold-separator {
    border: none;
    height: 1px;
    background: var(--gold-subtle);
    max-width: 600px;
    margin: 0 auto;
}


/* ==============================================================
   8. LAYOUT: MAP SECTION
   Interactive Leaflet map with CartoDB dark tiles.
   ============================================================== */

.map-section {
    padding: var(--section-pad);
    text-align: center;
}

.map-section-title {
    margin-bottom: 0.75rem;
}

.map-section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    letter-spacing: 0.03em;
}

.map-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Leaflet map element */
#europe-map {
    width: 100%;
    height: 480px;
    background: var(--bg-primary);
    border: 1px solid rgba(245, 240, 232, 0.08);
}


/* ==============================================================
   9. LEAFLET OVERRIDES
   Custom styling for Leaflet popups and controls to match
   the dark premium brand aesthetic.
   ============================================================== */

/* Hide default Leaflet attribution bar styling */
.leaflet-control-attribution {
    background: rgba(12, 12, 12, 0.7) !important;
    color: var(--text-muted) !important;
    font-size: 0.65rem !important;
}

.leaflet-control-attribution a {
    color: var(--text-muted) !important;
}

/* Zoom controls */
.leaflet-control-zoom a {
    background: var(--bg-elevated) !important;
    color: var(--text-primary) !important;
    border-color: rgba(245, 240, 232, 0.1) !important;
}

.leaflet-control-zoom a:hover {
    background: #1e1e1e !important;
}

/* Custom popup styling */
.leaflet-popup-content-wrapper {
    background: var(--bg-elevated) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--gold-subtle);
    border-radius: 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--gold-subtle);
    border-top: none;
    border-right: none;
}

.leaflet-popup-close-button {
    color: var(--text-muted) !important;
}

.leaflet-popup-close-button:hover {
    color: var(--text-primary) !important;
}

.leaflet-popup-content {
    margin: 0.875rem 1.25rem !important;
    font-family: var(--font-body);
}

/* Popup inner content */
.map-popup-title {
    font-family: var(--font-display);
    font-weight: var(--fw-black);
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.map-popup-status {
    font-size: 0.8rem;
    color: var(--gold-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.map-popup-link {
    font-size: 0.8rem;
    color: var(--gold-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
}

.map-popup-link:hover {
    text-decoration: underline;
}

/* Gold pulsing marker (CSS animation on custom divIcon) */
.gold-marker {
    position: relative;
}

.gold-marker-dot {
    width: 14px;
    height: 14px;
    background: var(--gold-accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(212, 168, 83, 0.6);
}

.gold-marker-pulse {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold-accent);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: markerPulse 2.5s ease-out infinite;
}

@keyframes markerPulse {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3.5);
    }
}


/* ==============================================================
   11. LAYOUT: EMAIL CAPTURE FORM
   "Notify me" form in the subscribe section.
   ============================================================== */

.subscribe-section {
    padding: var(--section-pad);
    text-align: center;
}

.subscribe-title {
    margin-bottom: 0.5rem;
}

.subscribe-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    letter-spacing: 0.03em;
    margin-left: auto;
    margin-right: auto;
}

.subscribe-form {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

.subscribe-form input[type="email"] {
    flex: 1;
    min-width: 0;
}

/* Honeypot field - hidden from humans, visible to bots */
.subscribe-form .hnpt {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
    tab-index: -1;
}

.subscribe-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.4em;
}

.subscribe-message.success {
    color: var(--gold-accent);
}

.subscribe-message.error {
    color: #e05555;
}


/* ==============================================================
   12. COMPONENTS: INPUTS & BUTTONS
   Shared form element styling across all pages.
   ============================================================== */

input[type="text"],
input[type="email"],
textarea,
select {
    background: transparent;
    border: 1px solid rgba(245, 240, 232, 0.18);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.875rem 1.25rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-gold {
    display: inline-block;
    background: var(--gold-accent);
    color: var(--bg-primary);
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.875rem 2rem;
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-gold:hover,
.btn-gold:focus-visible {
    background: var(--gold-hover);
    color: var(--bg-primary);
}

.btn-gold:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ==============================================================
   13. LAYOUT: SITE FOOTER
   Minimal footer with gold separator.
   ============================================================== */

.site-footer {
    padding: 0 clamp(1.5rem, 5vw, 4rem) 2.5rem;
}

.footer-separator {
    height: 1px;
    background: var(--gold-subtle);
    margin-bottom: 2rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-email a {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer-email a:hover {
    color: var(--gold-accent);
}


/* ==============================================================
   14. PAGE: MALTA STUB
   Coming-soon stub for the Malta location.
   ============================================================== */

.malta-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: var(--section-pad);
    text-align: center;
}

.malta-page .hero-logo {
    width: min(220px, 45vw);
    margin-bottom: 2rem;
}

.malta-subtitle {
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 2rem;
    max-width: 28em;
    margin-left: auto;
    margin-right: auto;
}


/* ==============================================================
   15. PAGE: CONTACT FORM
   Contact / inquiry form styling.
   ============================================================== */

.contact-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 80vh;
    padding: var(--section-pad);
    padding-top: 8rem;
}

.contact-page h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.contact-intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    max-width: 30em;
}

.contact-form {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1.25rem;
}

.form-row > * {
    flex: 1;
}

.contact-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.4em;
}

.contact-message.success {
    color: var(--gold-accent);
}

.contact-message.error {
    color: #e05555;
}

/* Contact honeypot */
.contact-form .hnpt {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}


/* ==============================================================
   16. PAGE: 404
   Not-found page styling.
   ============================================================== */

.section-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: var(--section-pad);
    text-align: center;
}

.headline-404 {
    margin-bottom: 1rem;
}

.text-404 {
    color: var(--text-muted);
    margin-bottom: 2rem;
}


/* ==============================================================
   17. ANIMATIONS: SCROLL REVEAL
   Elements with .fade-rise start hidden and animate in
   when they enter the viewport (triggered by JS).
   ============================================================== */

.fade-rise {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-smooth),
                transform 0.8s var(--ease-smooth);
}

.fade-rise.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for sequential elements */
.fade-rise-delay-1 { transition-delay: 0.15s; }
.fade-rise-delay-2 { transition-delay: 0.3s; }
.fade-rise-delay-3 { transition-delay: 0.45s; }
.fade-rise-delay-4 { transition-delay: 0.6s; }


/* ==============================================================
   18. RESPONSIVE: TABLET (max-width: 768px)
   ============================================================== */

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

    .header-nav a {
        font-size: 0.78rem;
    }

    .hero-logo {
        width: min(240px, 60vw);
    }

    .subscribe-form {
        flex-direction: column;
        gap: 0.75rem;
    }

    .subscribe-form .btn-gold {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 1.25rem;
    }

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


/* ==============================================================
   19. RESPONSIVE: MOBILE (max-width: 480px)
   ============================================================== */

@media (max-width: 480px) {
    .header-inner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-logo {
        width: min(200px, 70vw);
    }

    .hero {
        padding-top: 6rem;
    }

    /* Smaller map on mobile */
    #europe-map {
        height: 320px;
    }
}
