/* ═══════════════════════════════════════════════════════════════
   HotCraft — Custom CSS v1.0.0
   Global: variables, reset, typography, header, footer, buttons
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
    /* Brand palette */
    --hc-bg:          #faf9f5;
    --hc-dark:        #1A1714;
    --hc-dark-red:    #2a1215;
    --hc-red:         #D8402B;
    --hc-orange:      #EE9A2E;
    --hc-olive:       #5F6B3A;
    --hc-olive-light: #7D8B5C;
    --hc-cream:       #F4E8CE;
    --hc-cream-dark:  #E7DCC0;
    --hc-warm-gray:   #8A8579;
    --hc-light:       #E7E5DF;
    --hc-rust:        #C0512B;
    /* iOS/Mac overscroll bounce — exactly the menu colour, so it's in tone */
    --hc-overscroll:  #1A1714;

    /* Typography */
    --font-display: 'Anton', 'Impact', sans-serif;
    --font-body:    'Archivo', system-ui, sans-serif;

    /* Spacing */
    --hc-container: 1200px;
    --hc-gap:       clamp(1rem, 3vw, 2rem);

    /* Transitions */
    --hc-ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --hc-ease-in: cubic-bezier(0.55, 0.055, 0.675, 0.19);

    /* Header height */
    --hc-header-h: 72px;
}

/* ── Reset & base ─────────────────────────────────────────────── */

/* Neutralize any WP/plugin injected styles that could leak through */
.wp-site-blocks,
.entry-content,
.wp-block-group,
.wp-block-column {
    all: unset;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    /* Warm dark-brown fills the iOS/Mac rubber-band overscroll area so it
       blends with the hero's warm glow (instead of flashing white). */
    background: var(--hc-overscroll);
    /* `clip` on the X axis ONLY contains any horizontal drift at the viewport
       level (body's clip doesn't reliably propagate to the viewport). Unlike
       `hidden`/`auto`, `clip` creates NO scroll container, so overflow-y stays
       `visible` — iOS overscroll colour, the toolbar and the fixed header in
       in-app webviews (Telegram) keep working. */
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--hc-dark);
    /* Match the root so top AND bottom overscroll share the warm tone.
       Every light section sets its own background, so page content is
       unaffected by this. */
    background-color: var(--hc-overscroll);
    line-height: 1.65;
    /* `clip` contains horizontal drift WITHOUT creating a scroll container,
       so position:fixed + native overscroll keep working (unlike `hidden`). */
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

body.hc-nav-open {
    overflow: hidden;
}

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

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

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

ul, ol {
    list-style: none;
}

/* ── Container ────────────────────────────────────────────────── */
.hc-container {
    width: 100%;
    max-width: var(--hc-container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 5vw, 3rem);
}

/* ── Typography helpers ───────────────────────────────────────── */
.hc-section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--hc-olive);
    margin-bottom: 0.75rem;
}

.hc-section-label--light {
    color: var(--hc-olive-light);
}

.hc-section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--hc-dark);
    margin-bottom: 1rem;
}

.hc-section-title--light {
    color: var(--hc-bg);
}

.hc-section-subtitle {
    font-size: 1.05rem;
    color: var(--hc-warm-gray);
    max-width: 560px;
    line-height: 1.7;
}

.hc-section-header {
    text-align: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.hc-section-header .hc-section-subtitle {
    margin-inline: auto;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.hc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.875rem 2rem;
    border-radius: 2px;
    transition: all 0.2s var(--hc-ease);
    white-space: nowrap;
    cursor: pointer;
}

.hc-btn--primary {
    background-color: var(--hc-red);
    color: #fff;
}

.hc-btn--primary:hover {
    background-color: var(--hc-rust);
    transform: translateY(-2px);
}

.hc-btn--ghost {
    background: transparent;
    color: var(--hc-bg);
    border: 1.5px solid rgba(250, 249, 245, 0.4);
}

.hc-btn--ghost:hover {
    border-color: var(--hc-bg);
    background: rgba(250, 249, 245, 0.08);
    transform: translateY(-2px);
}

.hc-btn--sm {
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
}

.hc-btn--full {
    width: 100%;
}

/* ── Reveal animations ────────────────────────────────────────── */
.hc-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--hc-ease), transform 0.65s var(--hc-ease);
    transition-delay: var(--delay, 0s);
}

.hc-reveal--right {
    transform: translateX(28px);
}

.hc-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ── Header ───────────────────────────────────────────────────── */
.hc-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--hc-header-h);
    /* Always a solid bar in exactly the overscroll colour, so the iOS rubber-band
       strip, the menu and the (flattened) top of the hero are one continuous tone
       with no visible seam. */
    background: var(--hc-overscroll);
    transition: box-shadow 0.3s var(--hc-ease);
}

.hc-header--solid {
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hc-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 2rem;
}

/* ── Logo ─────────────────────────────────────────────────────── */
.hc-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.hc-logo__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.hc-logo__text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: 0.04em;
}

.hc-logo__hot {
    color: var(--hc-red);
}

.hc-logo__craft {
    color: var(--hc-bg);
}

.hc-logo--footer .hc-logo__craft {
    color: var(--hc-cream);
}

/* ── Navigation ───────────────────────────────────────────────── */
.hc-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hc-nav__link {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(250, 249, 245, 0.8);
    padding: 0.4rem 0.75rem;
    border-radius: 2px;
    transition: color 0.2s;
}

.hc-nav__link:hover,
.hc-nav__link.is-active {
    color: var(--hc-bg);
}

.hc-nav__link.is-active {
    position: relative;
}

.hc-nav__link.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: var(--hc-red);
    border-radius: 1px;
}

.hc-header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* ── Burger ───────────────────────────────────────────────────── */
.hc-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 4px;
}

.hc-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--hc-bg);
    border-radius: 2px;
    transition: all 0.25s var(--hc-ease);
    transform-origin: center;
}

.hc-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hc-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hc-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Footer ───────────────────────────────────────────────────── */
.hc-footer {
    background: var(--hc-dark);
    padding-top: 4rem;
    overflow: hidden;
}

.hc-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
}

.hc-footer__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.hc-footer__tagline {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hc-warm-gray);
}

.hc-footer__nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: center;
    flex: 1;
}

.hc-footer__nav a {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(250, 249, 245, 0.6);
    transition: color 0.2s;
}

.hc-footer__nav a:hover {
    color: var(--hc-bg);
}

.hc-footer__socials {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.hc-footer__social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(250, 249, 245, 0.6);
    transition: all 0.2s;
}

.hc-footer__social-icon:hover {
    border-color: var(--hc-red);
    color: var(--hc-red);
    transform: translateY(-2px);
}

.hc-footer__social-icon svg {
    width: 18px;
    height: 18px;
}

.hc-footer__bottom {
    padding: 1.25rem 0;
}

.hc-footer__bottom p {
    text-align: center;
    font-size: 0.8rem;
    color: var(--hc-warm-gray);
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.hc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 8, 8, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.hc-lightbox[hidden] {
    display: none;
}

.hc-lightbox__content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-lightbox__content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 2px;
}

.hc-lightbox__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--hc-bg);
    opacity: 0.7;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.hc-lightbox__close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.hc-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.75rem;
    color: var(--hc-bg);
    opacity: 0.6;
    padding: 1rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.hc-lightbox__nav:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

.hc-lightbox__prev { left: 1.5rem; }
.hc-lightbox__next { right: 1.5rem; }

/* ── Cart icon in header ──────────────────────────────────────── */
.hc-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: rgba(250, 249, 245, 0.8);
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.hc-cart-btn:hover {
    color: var(--hc-bg);
    background: rgba(255,255,255,0.08);
}

.hc-cart-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Positioning wrapper — always present, no own background */
.hc-cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    pointer-events: none;
}

/* The actual red pill — only visible when cart has items */
.hc-cart-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: var(--hc-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    padding: 0 4px;
    line-height: 1;
    animation: hc-badge-pop 0.25s var(--hc-ease);
}

@keyframes hc-badge-pop {
    0%   { transform: scale(0.4); opacity: 0; }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1);   opacity: 1; }
}

/* ── WP Admin bar offset (fixes double-header issue) ─────────── */
.admin-bar .hc-header {
    top: 32px;
}

/* On mobile WP admin bar collapses / hides on scroll */
@media screen and (max-width: 782px) {
    .admin-bar .hc-header {
        top: 46px;
    }
}

/* Admin bar + nav overlay offset */
.admin-bar .hc-nav {
    top: calc(var(--hc-header-h) + 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .hc-nav {
        top: calc(var(--hc-header-h) + 46px);
    }
}

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hc-burger {
        display: flex;
    }

    .hc-nav {
        position: fixed;
        top: var(--hc-header-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--hc-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s var(--hc-ease);
        z-index: 999;
    }

    .hc-nav.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .hc-nav__list {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hc-nav__link {
        font-size: 1.25rem;
        letter-spacing: 0.15em;
        padding: 0.75rem 1.5rem;
    }

    .hc-header__actions .hc-btn--sm {
        display: none;
    }

    .hc-footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hc-footer__brand {
        flex-direction: column;
        align-items: center;
    }

    .hc-footer__socials {
        justify-content: center;
    }

    .hc-footer__nav {
        justify-content: center;
        gap: 0.5rem 1.25rem;
    }
}
