@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url(../fonts/inter-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url(../fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --primary: #f59e0b;
    --primary-hover: #d97706;
    /* darker amber for text/controls: white on it is 5:1 (AA) */
    --accent: #b45309;
    --accent-hover: #92400e;
    --bg-cream: #fefce8;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --perla-yellow: #fde047;
    --border-color: #fef08a;
    --badge-text: #854d0e;
    --heading-brown: #713f12;
    --radius: 16px;

    --hero-visual-bg: #fef9c3;
    --table-border: #f1f5f9;
    --btn-secondary-hover-bg: #fef9c3;
    --config-btn-bg: #f1f5f9;

    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --footer-muted: #94a3b8;
    --footer-border: #1e293b;

    --retro-fg: #ff00ff;
    --retro-bg: #00ffff;
    --retro-accent: #ffff00;
    --retro-red: #ff0000;
}

/* RETRO MODE — high specificity, no !important */
body.retro-mode,
body.retro-mode * {
    font-family: "Comic Sans MS", "Comic Sans", cursive, sans-serif;
}

body.retro-mode {
    background: var(--retro-bg);
    color: var(--retro-fg);
}

body.retro-mode header,
body.retro-mode .card,
body.retro-mode .hero-visual {
    background: var(--retro-accent);
    border: 4px dashed var(--retro-red);
    box-shadow: 8px 8px 0px #000000;
}

body.retro-mode button {
    background: var(--retro-red);
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
    animation: blink 0.5s infinite alternate;
}

@keyframes blink {
    from { opacity: 1; }
    to { opacity: 0.7; }
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* keep anchor targets clear of the sticky header */
section[id] {
    scroll-margin-top: 4.5rem;
}

/* FOCUS STYLES */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* HEADER & NAV */
header {
    position: sticky;
    top: 0;
    background: rgba(254, 252, 232, 0.9);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

/* blur lives on a pseudo-element: backdrop-filter on the header itself would
   make it the containing block of the position:fixed mobile menu */
header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo em {
    font-style: normal;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* HAMBURGER MENU */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 110;
}

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

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

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

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

/* BUTTONS */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 99px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.3);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    box-shadow: none;
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover-bg);
    border-color: var(--accent);
}

/* SECTIONS GENERAL */
section {
    padding: 4rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

/* HERO SECTION */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.hero-badge {
    background: var(--border-color);
    color: var(--badge-text);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* INTERACTIVE PISKOT ART */
.hero-visual {
    background: var(--hero-visual-bg);
    border-radius: var(--radius);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s;
}

.hero-visual:active {
    transform: scale(0.98);
}

/* side view: Perla sits on the flat (top) side, curved side faces down */
.piskot-graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
}

.perla-layer {
    order: -1;
    width: 170px;
    height: 34px;
    background: var(--perla-yellow);
    border-radius: 17px;
    border: 3px solid var(--primary);
    box-shadow: inset 2px 3px 5px #ffffff, 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: -6px;
    position: relative;
    z-index: 1;
}

.piskot-graphic::after {
    content: "";
    width: 200px;
    height: 70px;
    background: var(--primary);
    border-radius: 0 0 100px 100px / 0 0 70px 70px;
    box-shadow: inset -10px -10px 20px var(--primary-hover), 0 10px 25px rgba(0,0,0,0.1);
}

.easter-egg-hint {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* COMPARISON TABLE */
.comparison-wrapper {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--table-border);
}

th {
    background: var(--border-color);
    color: var(--heading-brown);
    font-weight: 800;
}

tbody th {
    background: none;
    color: var(--text-dark);
    font-weight: 700;
}

/* FEATURES GRID */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.features-grid .card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.features-grid .card:hover {
    transform: translateY(-4px);
}

.features-grid .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.features-grid .card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.features-grid .card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* CONFIGURATOR */
.configurator-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 2px solid var(--border-color);
    text-align: center;
}

.config-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.config-btn {
    background: var(--config-btn-bg);
    border: 2px solid transparent;
    padding: 0.8rem 1.5rem;
    border-radius: 99px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.config-btn.active {
    background: var(--border-color);
    border-color: var(--accent);
    color: var(--heading-brown);
}

.visual-display {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.piskot-mini {
    width: 100px;
    height: 24px;
    background: var(--primary);
    border-radius: 24px 24px 0 0;
}

.piskot-mini.flat-up {
    border-radius: 0 0 24px 24px;
}

.perla-mini {
    width: 80px;
    height: 12px;
    background: var(--perla-yellow);
    border-radius: 6px;
    border: 1px solid var(--primary);
}

#configTitle {
    margin-bottom: 0.5rem;
}

#configDesc {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* TESTIMONIALS */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--bg-card);
    padding: 1.8rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.testimonial-card blockquote {
    margin: 0;
}

.testimonial-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* FAQ ACCORDION */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.2rem 1.5rem;
    text-align: left;
    background: none;
    border: none;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
}

.faq-answer {
    padding: 0 1.5rem 1.2rem 1.5rem;
    color: var(--text-muted);
    display: none;
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    display: block;
}

/* AD BANNER */
.ad-banner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* fixed square frame: slides of any aspect ratio are letterboxed, never cropped */
.ad-banner-track {
    display: grid;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background: var(--footer-bg);
    border-radius: var(--radius);
    overflow: hidden;
}

.ad-slide {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}

.ad-slide.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.ad-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ad-pause {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
}

.ad-dots {
    display: flex;
    gap: 0;
}

/* 28px hit area around a 12px visual dot */
.ad-dot {
    position: relative;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.ad-dot::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    transition: background 0.3s ease;
}

.ad-dot.active::after {
    background: var(--accent);
}

/* RECIPES PAGE */
.nav-links a[aria-current="page"] {
    color: var(--accent);
}

.recipes-hero {
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.recipes-hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.recipes-hero p {
    max-width: 640px;
    margin: 0 auto 1.5rem auto;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.recipe-toc {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.recipe-toc a {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.recipe-toc a:hover {
    border-color: var(--accent);
    background: var(--btn-secondary-hover-bg);
}

.recipes {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.recipe-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.recipe-card:nth-child(even) .recipe-art {
    order: 2;
}

.recipe-art {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    position: sticky;
    top: 5.5rem;
}

.recipe-body h2 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.recipe-body h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--heading-brown);
    margin: 1.25rem 0 0.5rem 0;
}

.recipe-body ul,
.recipe-body ol {
    padding-left: 1.4rem;
    color: var(--text-muted);
}

.recipe-body li + li {
    margin-top: 0.3rem;
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.recipe-badge {
    background: var(--border-color);
    color: var(--badge-text);
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 99px;
}

.recipe-tip {
    margin-top: 1.25rem;
    padding: 0.8rem 1rem;
    border-left: 4px solid var(--primary);
    background: var(--hero-visual-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
}

.recipes-cta {
    text-align: center;
}

/* FOOTER */
footer {
    background: var(--footer-bg);
    color: #fff;
    padding: 4rem 1.5rem 2rem 1.5rem;
    margin-top: 4rem;
}

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

.footer-tagline {
    color: var(--footer-text);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.newsletter-intro {
    color: var(--footer-text);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-status {
    color: var(--perla-yellow);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.newsletter-form input {
    padding: 0.8rem 1rem;
    border-radius: 99px;
    border: none;
    flex-grow: 1;
    font-family: inherit;
}

.copyright {
    text-align: center;
    color: var(--footer-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--footer-border);
    padding-top: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-ctas {
        justify-content: center;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-cream);
        flex-direction: column;
        padding: 5rem 2rem 2rem 2rem;
        gap: 1.5rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        visibility: hidden;
        transition: right 0.3s ease, visibility 0s linear 0.3s;
        z-index: 105;
    }

    .nav-links.open {
        right: 0;
        visibility: visible;
        transition-delay: 0s;
    }

    .nav-cta {
        display: none;
    }

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

    .recipes-hero h1 {
        font-size: 2.2rem;
    }

    .recipe-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .recipe-card:nth-child(even) .recipe-art {
        order: 0;
    }

    .recipe-art {
        position: static;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none;
        transition-duration: 0.01ms;
        transition-delay: 0s;
    }
}
