/* ==================================================================
   VENOMIND - style.css
   System wizualny: czerń/czerwień, ostre ścięte krawędzie nawiązujące
   do "rogów" znaku marki, jeden zorganizowany moment animacji na
   starcie strony, reszta ruchu jako odpowiedź na akcję użytkownika.
   ================================================================== */

:root {
    /* Kolory */
    --bg:            #0B0A0A;
    --bg-panel:      #141212;
    --bg-panel-2:    #1B1818;
    --red:           #A51C1E;
    --red-deep:      #6E1113;
    --red-bright:    #C4271F;
    --ink:           #EDEAE4;
    --ink-dim:       #8A8580;
    --line:          #2A2523;

    /* Typografia */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body:    'Inter', sans-serif;

    /* Ścięcie rogów - motyw "rogów" znaku */
    --fang-cut: 14px;

    --container: 1240px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; max-width: 62ch; color: var(--ink-dim); }
a  { color: inherit; text-decoration: none; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* Ścięty róg - motyw przewodni na kafelkach/przyciskach/ramkach */
.fang-cut {
    clip-path: polygon(
        var(--fang-cut) 0, 100% 0, 100% calc(100% - var(--fang-cut)),
        calc(100% - var(--fang-cut)) 100%, 0 100%, 0 var(--fang-cut)
    );
}

/* ------------------------------------------------------------
   Nagłówek / nawigacja
   ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 10, 10, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    max-width: var(--container);
    margin: 0 auto;
}
.brand-logo { height: 40px; width: auto; display: block; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--ink-dim);
    position: relative;
    padding: 4px 0;
    transition: color 0.2s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 2px;
    background: var(--red);
    transition: width 0.25s var(--ease);
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    color: var(--ink);
    transition: transform 0.2s var(--ease);
}
.icon-btn:hover { transform: translateY(-2px); }
.cart-badge {
    position: absolute;
    top: -4px; right: -6px;
    background: var(--red);
    color: var(--ink);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 17px; height: 17px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

/* ------------------------------------------------------------
   Hero - jedyny zorganizowany moment animacji strony
   ------------------------------------------------------------ */
.hero {
    position: relative;
    min-height: 86vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.hero__emblem {
    position: absolute;
    right: -6%;
    top: 50%;
    transform: translateY(-50%);
    width: 46vw;
    max-width: 620px;
    opacity: 0;
    filter: drop-shadow(0 0 60px rgba(165, 28, 30, 0.25));
}
.hero__emblem.is-revealed {
    animation: emblem-rise 1.1s var(--ease) forwards;
}
@keyframes emblem-rise {
    0%   { opacity: 0; transform: translateY(-40%) scale(0.85); }
    100% { opacity: 1; transform: translateY(-50%) scale(1); }
}

.hero__content { position: relative; z-index: 2; max-width: 620px; }
.hero__eyebrow {
    font-family: var(--font-display);
    color: var(--red-bright);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
    opacity: 0;
}
.hero__title {
    opacity: 0;
    margin-bottom: 20px;
}
.hero__desc { opacity: 0; font-size: 1.05rem; margin-bottom: 32px; }
.hero__cta { opacity: 0; }

.hero.is-revealed .hero__eyebrow { animation: rise-in 0.7s var(--ease) 0.25s forwards; }
.hero.is-revealed .hero__title   { animation: rise-in 0.7s var(--ease) 0.4s forwards; }
.hero.is-revealed .hero__desc    { animation: rise-in 0.7s var(--ease) 0.55s forwards; }
.hero.is-revealed .hero__cta     { animation: rise-in 0.7s var(--ease) 0.7s forwards; }

@keyframes rise-in {
    0%   { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------
   Przyciski
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 28px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-primary {
    background: var(--red);
    color: var(--ink);
}
.btn-primary:hover { background: var(--red-bright); transform: translateY(-2px); }
.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--red); color: var(--red-bright); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ------------------------------------------------------------
   Kafelki kategorii
   ------------------------------------------------------------ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: var(--line);
}
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }

.category-tile {
    position: relative;
    aspect-ratio: 3/4;
    background: var(--bg-panel) center/cover no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    overflow: hidden;
}
.category-tile::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(11,10,10,0) 40%, rgba(11,10,10,0.9) 100%);
    transition: background 0.35s var(--ease);
}
.category-tile::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 2px; height: 0;
    background: var(--red);
    transform: translateX(-50%);
    transition: height 0.4s var(--ease);
}
.category-tile:hover::after { height: 100%; }
.category-tile:hover::before { background: linear-gradient(180deg, rgba(165,28,30,0.08) 0%, rgba(11,10,10,0.92) 100%); }
.category-tile__label {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 1.25rem;
    transition: transform 0.3s var(--ease);
}
.category-tile:hover .category-tile__label { transform: translateX(6px); }
.category-tile__count { position: relative; z-index: 1; color: var(--ink-dim); font-size: 0.8rem; display: block; margin-top: 4px; }

/* ------------------------------------------------------------
   Produkty
   ------------------------------------------------------------ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }

.product-card { display: block; }
.product-card__img-wrap {
    position: relative;
    aspect-ratio: 4/5;
    background: var(--bg-panel);
    overflow: hidden;
    margin-bottom: 14px;
}
.product-card__img-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.product-card:hover .product-card__img-wrap img { transform: scale(1.045); }
.product-card__name { font-family: var(--font-display); font-size: 1rem; margin-bottom: 2px; }
.product-card__price { color: var(--red-bright); font-weight: 600; }

.section { padding: 90px 0; }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}

/* ------------------------------------------------------------
   Strona produktu
   ------------------------------------------------------------ */
.product-detail {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
}
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; gap: 32px; } }
.product-detail__gallery img {
    width: 100%; aspect-ratio: 4/5; object-fit: cover;
    background: var(--bg-panel);
}
.product-detail__price { font-size: 1.5rem; color: var(--red-bright); font-family: var(--font-display); margin-bottom: 24px; }

.option-group { margin-bottom: 26px; }
.option-group__label { font-family: var(--font-display); font-size: 0.85rem; color: var(--ink-dim); margin-bottom: 10px; display: block; }
.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-option {
    min-width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    font-family: var(--font-display);
    cursor: pointer;
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.size-option:hover { border-color: var(--ink-dim); }
.size-option.is-selected { border-color: var(--red); color: var(--red-bright); }
.size-option.is-disabled { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; }

/* ------------------------------------------------------------
   Koszyk (panel boczny)
   ------------------------------------------------------------ */
.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    background: var(--bg-panel);
    border-left: 1px solid var(--line);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}
.cart-drawer__overlay.is-open { opacity: 1; pointer-events: auto; }

.cart-drawer__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}
.cart-drawer__items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 70px; height: 88px; object-fit: cover; background: var(--bg-panel-2); }
.cart-line__meta { flex: 1; }
.cart-line__name { font-family: var(--font-display); font-size: 0.92rem; margin-bottom: 4px; }
.cart-line__variant { color: var(--ink-dim); font-size: 0.8rem; margin-bottom: 8px; }
.cart-line__qty { display: flex; align-items: center; gap: 10px; }
.qty-btn { width: 24px; height: 24px; border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.cart-drawer__footer { padding: 20px 24px; border-top: 1px solid var(--line); }
.cart-subtotal-row { display: flex; justify-content: space-between; margin-bottom: 16px; font-family: var(--font-display); }
.cart-empty { color: var(--ink-dim); text-align: center; padding: 60px 20px; }

.payment-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.payment-badge {
    font-family: var(--font-display);
    font-size: 0.68rem;
    color: var(--ink-dim);
    border: 1px solid var(--line);
    padding: 4px 9px;
}

/* ------------------------------------------------------------
   Formularze
   ------------------------------------------------------------ */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-family: var(--font-display); font-size: 0.85rem; color: var(--ink-dim); margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: var(--bg-panel-2);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 13px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--red);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.alert { padding: 14px 18px; margin-bottom: 20px; font-size: 0.9rem; border-left: 3px solid; }
.alert-error   { background: rgba(165,28,30,0.1); border-color: var(--red); color: #F0B4B0; }
.alert-success { background: rgba(60,150,90,0.1); border-color: #3C965A; color: #B4E0C0; }

/* ------------------------------------------------------------
   Stopka
   ------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding: 70px 0 0; margin-top: 100px; background: var(--bg-panel); }
.footer-top { display: grid; grid-template-columns: 1.5fr 0.8fr 1fr 1.1fr 1.1fr; gap: 40px; margin-bottom: 44px; }
@media (max-width: 1000px) { .footer-top { grid-template-columns: 1fr 1fr; } }

.footer-brand__logo { height: 52px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; max-width: 34ch; }

.social-icons { display: flex; gap: 10px; margin-top: 18px; }
.social-icon {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    color: var(--ink-dim);
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.social-icon:hover { border-color: var(--red); color: var(--red-bright); transform: translateY(-2px); }

.footer-col h4 { font-size: 0.85rem; color: var(--ink-dim); text-transform: none; margin-bottom: 16px; }
.footer-col a, .footer-col p { display: block; color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 10px; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--red-bright); }

.method-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.method-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-family: var(--font-display);
    color: var(--ink-dim);
    border: 1px solid var(--line);
    padding: 5px 10px;
}

.footer-legal { border-top: 1px solid var(--line); padding: 22px 0; }
.footer-legal p { color: var(--ink-dim); font-size: 0.78rem; margin: 0; max-width: none; }

.footer-bottom { display: flex; justify-content: space-between; padding: 20px 0; border-top: 1px solid var(--line); color: var(--ink-dim); font-size: 0.8rem; flex-wrap: wrap; gap: 10px; }

.footer-credit { border-top: 1px solid var(--line); padding: 16px 0 26px; text-align: center; }
.footer-credit { color: #56514E; font-size: 0.72rem; }

.newsletter-form { display: flex; gap: 0; margin-top: 8px; }
.newsletter-form input { flex: 1; background: var(--bg-panel-2); border: 1px solid var(--line); border-right: none; color: var(--ink); padding: 11px 12px; }
.newsletter-form button { background: var(--red); border: none; color: var(--ink); padding: 0 18px; cursor: pointer; font-family: var(--font-display); }
.newsletter-form button:hover { background: var(--red-bright); }

/* ------------------------------------------------------------
   Oś czasu marki (strona "O marce")
   ------------------------------------------------------------ */
.timeline { position: relative; padding-left: 32px; }
.timeline__line {
    position: absolute;
    left: 5px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--line);
}
.timeline__line-fill {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 0%;
    background: var(--red);
    transition: height 1.6s var(--ease);
}
.timeline.is-drawn .timeline__line-fill { height: 100%; }

.timeline-group { margin-bottom: 44px; }
.timeline-group__date {
    font-family: var(--font-display);
    color: var(--red-bright);
    font-size: 0.95rem;
    margin-bottom: 18px;
    margin-left: -32px;
    padding-left: 32px;
}

.timeline-item {
    position: relative;
    margin-bottom: 4px;
    opacity: 0;
    transform: translateX(-14px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.timeline-item.is-visible { opacity: 1; transform: translateX(0); }

.timeline-item__dot {
    position: absolute;
    left: -32px; top: 14px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line);
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.timeline-item.is-visible .timeline-item__dot { border-color: var(--red); }
.timeline-item__dot--filled { background: var(--red); border-color: var(--red); }

.timeline-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    cursor: pointer;
    text-align: left;
    color: var(--ink);
}
.timeline-item__title { font-family: var(--font-display); font-size: 1.02rem; }
.timeline-item__toggle {
    font-family: var(--font-display);
    color: var(--ink-dim);
    font-size: 1.1rem;
    transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.timeline-item.is-open .timeline-item__toggle { transform: rotate(45deg); color: var(--red-bright); }

.timeline-item__body { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.timeline-item.is-open .timeline-item__body { max-height: 160px; }
.timeline-item__body p { padding: 14px 0 6px; margin: 0; max-width: 56ch; }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.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; }
.badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    padding: 4px 10px;
    background: var(--red);
    color: var(--ink);
}
