/* ================================================
   BAKED PIZZA — CSS
   Dark · Bold · Animated · UI-forward
   ================================================ */

/* ------------------------------------------------
   1. CUSTOM PROPERTIES
   ------------------------------------------------ */
:root {
    --bg: #0a0908;
    --bg-subtle: #111010;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    --accent: #ff5a1f;
    --accent-light: #ff9f43;
    --accent-glow: rgba(255, 90, 31, 0.55);
    --accent-soft: rgba(255, 90, 31, 0.15);

    --text: #ffffff;
    --text-dim: #999;
    --text-muted: #555;

    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);

    --font-display: "DM Serif Display", Georgia, serif;
    --font-body: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

    --container: 1200px;
    --pad: 1.25rem;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

    --radius: 20px;
    --radius-sm: 10px;
    --radius-pill: 100px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
    scrollbar-width: thin;
    scrollbar-color: #333 var(--bg);
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

address {
    font-style: normal;
}

::selection {
    background: var(--accent);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ------------------------------------------------
   3. SKIP LINK
   ------------------------------------------------ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 10001;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 1rem;
}

/* ------------------------------------------------
   4. LAYOUT
   ------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--pad);
}

/* ------------------------------------------------
   5. HEADER
   ------------------------------------------------ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition:
        padding 0.4s var(--ease),
        background 0.4s var(--ease),
        border-color 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}

.header.is-scrolled {
    padding: 0.875rem 0;
    background: rgba(10, 9, 8, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom-color: var(--border);
}

.header__inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ------------------------------------------------
   6. LOGO
   ------------------------------------------------ */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.8;
}

.logo__img {
    height: 28px;
    width: auto;
    display: block;
}

/* ------------------------------------------------
   7. BUTTONS
   ------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition:
        background 0.4s var(--ease),
        box-shadow 0.4s var(--ease),
        transform 0.3s var(--ease);
    will-change: transform;
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    border: none;
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background: #ff6e3a;
    box-shadow:
        0 0 50px var(--accent-glow),
        0 0 100px rgba(255, 90, 31, 0.15);
}

.btn--primary:active {
    transform: scale(0.97);
}

/* Shimmer sweep */
.btn--primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 60%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn--primary:hover::after {
    transform: translateX(100%);
}

.btn--sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.8125rem;
}
.btn--lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    letter-spacing: 0.02em;
}
.btn--xl {
    padding: 1.25rem 3.75rem;
    font-size: 1.125rem;
    letter-spacing: 0.03em;
}

/* ------------------------------------------------
   8. HERO
   ------------------------------------------------ */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    background: var(--bg);
}

/* Radial warm glow behind text — big and visible */
.hero__glow {
    position: absolute;
    width: 90vw;
    height: 90vw;
    max-width: 1100px;
    max-height: 1100px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 90, 31, 0.14) 0%,
        rgba(255, 70, 20, 0.08) 30%,
        rgba(255, 90, 31, 0.03) 55%,
        transparent 75%
    );
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    pointer-events: none;
    z-index: 0;
    animation: glow-breathe 5s ease-in-out infinite;
}

@keyframes glow-breathe {
    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -52%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -52%) scale(1.08);
    }
}

/* Ember container */
.hero__embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Individual ember particles (created by JS) — bright and visible */
.ember {
    position: absolute;
    bottom: -10px;
    width: var(--size, 5px);
    height: var(--size, 5px);
    background: var(--ember-color, #ff6a2a);
    border-radius: 50%;
    opacity: 0;
    animation: ember-rise var(--duration, 4s) ease-out forwards;
    animation-delay: var(--delay, 0s);
    box-shadow:
        0 0 6px 3px rgba(255, 90, 31, 0.7),
        0 0 20px 6px rgba(255, 90, 31, 0.35),
        0 0 40px 10px rgba(255, 60, 10, 0.15);
    will-change: transform, opacity;
}

/* Bright core embers */
.ember--bright {
    background: #ffb366;
    box-shadow:
        0 0 6px 3px rgba(255, 179, 102, 0.9),
        0 0 24px 8px rgba(255, 120, 40, 0.5),
        0 0 50px 14px rgba(255, 70, 20, 0.2);
}

@keyframes ember-rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: var(--peak-opacity, 0.85);
    }
    15% {
        opacity: var(--peak-opacity, 0.85);
    }
    70% {
        opacity: calc(var(--peak-opacity, 0.85) * 0.4);
    }
    100% {
        transform: translateY(calc(-100vh - 60px))
            translateX(var(--drift, 20px)) scale(0);
        opacity: 0;
    }
}

/* Hero content */
.hero__content {
    position: relative;
    z-index: 2;
    padding: 6rem var(--pad) 4rem;
}

.hero__title {
    line-height: 0.88;
    margin-bottom: 1.75rem;
}

.hero__line {
    display: block;
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.03em;
    opacity: 0;
    animation: hero-in 1s var(--ease) forwards;
}

.hero__line--main {
    font-size: clamp(5rem, 20vw, 18rem);
    color: var(--text);
}

.hero__line--accent {
    font-size: clamp(3.25rem, 13vw, 12rem);
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        var(--accent-light) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation-delay: 0.12s;
}

@keyframes hero-in {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__sub {
    font-size: clamp(0.8rem, 2vw, 1.0625rem);
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: hero-in 1s var(--ease) 0.28s forwards;
}

.hero__cta {
    opacity: 0;
    animation: hero-in 1s var(--ease) 0.42s forwards;
}

/* Scroll indicator — hidden since hero-only page */
.hero__scroll {
    display: none;
}

/* ------------------------------------------------
   9. MARQUEE
   ------------------------------------------------ */
.marquee {
    padding: 1.125rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    background: rgba(255, 90, 31, 0.02);
    position: relative;
}

/* Fade edges */
.marquee::before,
.marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
}

.marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 25s linear infinite;
}

.marquee__text {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Hover pause */
.marquee:hover .marquee__track {
    animation-play-state: paused;
}

/* ------------------------------------------------
   10. ABOUT
   ------------------------------------------------ */
.about {
    padding: 7rem 0;
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.about__img-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    position: relative;
}

/* Gradient border glow */
.about__img-wrap::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius) + 2px);
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 159, 67, 0.3) 100%
    );
    z-index: -1;
}

.about__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.about__img-wrap:hover img {
    transform: scale(1.06);
}

.about__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 0.95;
    font-weight: 400;
    margin-bottom: 1.25rem;
}

.about__content p {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-dim);
    max-width: 480px;
}

/* ------------------------------------------------
   11. MENU
   ------------------------------------------------ */
.menu {
    padding: 5rem 0 6rem;
    overflow: visible;
}

.menu__heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    margin-bottom: 2.5rem;
}

/* Horizontal scrollable on mobile, centered row on desktop */
.menu__carousel {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem var(--pad);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.menu__carousel::-webkit-scrollbar {
    display: none;
}

/* ------------------------------------------------
   12. PIZZA CARD (glassmorphism + 3D tilt + spin)
   ------------------------------------------------ */
.pizza-card {
    flex: 0 0 300px;
    max-width: 85vw;
    scroll-snap-align: center;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
    transition:
        border-color 0.4s var(--ease),
        background 0.4s var(--ease);
    will-change: transform;
    transform-style: preserve-3d;
}

.pizza-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

/* Animated gradient border on hover */
.pizza-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: linear-gradient(
        135deg,
        var(--accent) 0%,
        transparent 35%,
        transparent 65%,
        var(--accent-light) 100%
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}

.pizza-card:hover::before {
    opacity: 0.6;
}

/* Glow behind pizza image */
.pizza-card__visual {
    position: relative;
    margin-bottom: 1.5rem;
}

.pizza-card__glow {
    position: absolute;
    inset: -25%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
    opacity: 0;
    transition: opacity 0.6s var(--ease);
    z-index: 0;
}

.pizza-card:hover .pizza-card__glow {
    opacity: 0.5;
}

/* Circular pizza image */
.pizza-card__img {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    border: 2px solid var(--border);
    transition: border-color 0.4s;
}

.pizza-card:hover .pizza-card__img {
    border-color: var(--border-hover);
}

.pizza-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Pizza spins on hover */
.pizza-card:hover .pizza-card__img img {
    transform: rotate(180deg);
}

.pizza-card__name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.375rem;
    color: var(--text);
}

.pizza-card__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.125rem;
}

.pizza-card__price {
    display: inline-block;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.4rem 1.125rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.03em;
    transition:
        background 0.3s,
        color 0.3s;
}

.pizza-card:hover .pizza-card__price {
    background: var(--accent);
    color: #fff;
}

/* Extras line */
.menu__extras {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ------------------------------------------------
   13. CTA SECTION
   ------------------------------------------------ */
.cta {
    padding: 7rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Big radial glow */
.cta__glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 90, 31, 0.08),
        transparent 65%
    );
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta__inner {
    position: relative;
    z-index: 1;
}

.cta__title {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 14vw, 12rem);
    font-weight: 400;
    line-height: 0.95;
    margin-bottom: 2rem;
    background: linear-gradient(
        to bottom,
        var(--text) 30%,
        var(--text-muted) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta__btn {
    margin-bottom: 2.5rem;
    /* Pulsing glow */
    animation: cta-pulse 3s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 90, 31, 0.15);
    }
    50% {
        box-shadow:
            0 0 50px var(--accent-glow),
            0 0 100px rgba(255, 90, 31, 0.1);
    }
}

.cta__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.cta__meta a {
    transition: color 0.3s var(--ease);
}

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

.cta__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

/* ------------------------------------------------
   14. FOOTER
   ------------------------------------------------ */
.footer {
    border-top: 1px solid var(--border);
    padding: 1.75rem 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer__social {
    display: flex;
    gap: 1.125rem;
}

.footer__social a {
    color: var(--text-muted);
    transition:
        color 0.3s var(--ease),
        transform 0.3s var(--ease);
    display: flex;
    align-items: center;
}

.footer__social a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* ------------------------------------------------
   15. REVEAL ANIMATIONS
   ------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.8s var(--ease),
        transform 0.8s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.menu__carousel .reveal:nth-child(2) {
    transition-delay: 0.1s;
}
.menu__carousel .reveal:nth-child(3) {
    transition-delay: 0.2s;
}

/* ------------------------------------------------
   16. REDUCED MOTION
   ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero__line {
        opacity: 1;
        transform: none;
    }

    .hero__sub,
    .hero__cta,
    .hero__scroll {
        opacity: 1;
    }

    .ember {
        display: none;
    }

    .marquee__track {
        animation: none;
    }
}

/* ------------------------------------------------
   17. RESPONSIVE — TABLET (640px+)
   ------------------------------------------------ */
@media (min-width: 640px) {
    :root {
        --pad: 2rem;
    }

    .about__grid {
        grid-template-columns: 1.1fr 1fr;
        gap: 3.5rem;
    }

    .menu__carousel {
        gap: 2rem;
        padding-inline: 2rem;
    }
}

/* ------------------------------------------------
   18. RESPONSIVE — DESKTOP (960px+)
   ------------------------------------------------ */
@media (min-width: 960px) {
    :root {
        --pad: 2.5rem;
    }

    .about {
        padding: 9rem 0;
    }

    .about__grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 5rem;
    }

    .menu__carousel {
        justify-content: center;
        overflow-x: visible;
        padding-inline: 2.5rem;
    }

    .pizza-card {
        flex: 0 0 340px;
    }

    .cta {
        padding: 9rem 0 10rem;
    }
}

/* ------------------------------------------------
   19. RESPONSIVE — LARGE (1200px+)
   ------------------------------------------------ */
@media (min-width: 1200px) {
    .pizza-card {
        flex: 0 0 360px;
    }

    .pizza-card__img {
        width: 210px;
        height: 210px;
    }
}

/* ------------------------------------------------
   20. RESPONSIVE — SMALL MOBILE (< 400px)
   ------------------------------------------------ */
@media (max-width: 400px) {
    .hero__content {
        padding-top: 5rem;
    }

    .btn--xl {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }

    .pizza-card {
        flex: 0 0 270px;
        padding: 2rem 1.5rem 1.5rem;
    }

    .pizza-card__img {
        width: 160px;
        height: 160px;
    }
}
