/* LastPour — styl "soczysty z poświatą". Bez frameworków, bez kroku budowania. */

:root {
    --bg: #0b0708;
    --bg-elevated: #160e10;
    --text: #f5ece3;
    --text-muted: #b8a89e;
    --text-faint: #8a746a;
    --accent: #e0294a;
    --border: #2a1a1c;
    --fallback-color: #7a3348;
    --fallback-color-shade: #4a1e2c;
    --fallback-color-shine: #a85670;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.site-header {
    position: relative;
    padding: 2rem 1.25rem 2.5rem;
    background: radial-gradient(ellipse at top left, #3a0f1c 0%, var(--bg) 70%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.site-header::after {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--accent);
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
}

.site-title {
    position: relative;
    margin: 0;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #ffb199 0%, var(--accent) 55%, #7a1030 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 60px rgba(224, 41, 74, 0.45);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.site-subtitle {
    position: relative;
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.main-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.1rem;
    font-size: 0.95rem;
}

.main-nav a {
    padding: 0.35rem 0.2rem;
    text-decoration: none;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
}

.main-nav a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--text);
}

.nav-sep {
    color: var(--text-faint);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Przyciski ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.4rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    min-height: 3rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #a3193a);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(224, 41, 74, 0.65);
}

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

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    color: var(--text);
    border-color: var(--text-faint);
}

.flash {
    margin: 1.25rem 0;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
}

/* ---------- Ekran domowy: dwa kafle ---------- */

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.75rem 0 3rem;
}

.home-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.6rem;
    min-height: 280px;
    padding: 2.5rem 2rem;
    border-radius: 28px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 10px 26px -10px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-tile:hover,
.home-tile:focus-visible {
    transform: translateY(-2px);
}

.home-tile:active {
    transform: scale(0.98);
}

.home-tile-bar {
    background: linear-gradient(150deg, #e0294a 0%, #4a1e2c 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 10px 26px -10px rgba(224, 41, 74, 0.55);
}

.home-tile-drinks {
    background: linear-gradient(150deg, #fbbf24 0%, #7a4a12 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 10px 26px -10px rgba(251, 191, 36, 0.45);
}

.home-tile-title {
    position: relative;
    font-size: clamp(1.85rem, 5vw, 2.75rem);
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.home-tile-subtitle {
    position: relative;
    max-width: 32rem;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ---------- Wyszukiwarka ---------- */

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1.5rem 0 0.5rem;
}

.search-input {
    flex: 1 1 260px;
    min-height: 3rem;
    padding: 0 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 1rem;
}

.search-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.search-summary {
    margin: 0.75rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---------- Barek: wybór składników ---------- */

.bar-form {
    padding: 1.5rem 0 1.5rem;
}

.bar-group {
    margin: 0 0 1.75rem;
    padding: 0;
    border: none;
}

.bar-group-title {
    padding: 0 0 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}

.bar-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s ease, border-color 0.1s ease;
}

.bar-item input {
    width: 1.3rem;
    height: 1.3rem;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.bar-item:has(input:checked) {
    background: linear-gradient(135deg, var(--accent), #7a1030);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}

.bar-actions {
    display: flex;
    padding: 1.5rem 0 0.5rem;
}

.bar-actions .btn {
    width: 100%;
}

.bar-clear-form {
    padding: 0 0 3rem;
}

/* ---------- Barek: wyniki ---------- */

.bar-summary {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.15rem;
    color: var(--text);
}

.results-section {
    padding: 1.5rem 0;
}

.tile-extra {
    position: relative;
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    align-self: flex-start;
}

/* ---------- Katalog: siatka kafli ---------- */

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.85rem;
    padding: 1.5rem 0 2.5rem;
}

.tile {
    --tile-color: var(--fallback-color);
    --tile-color-shade: var(--fallback-color-shade);
    --tile-color-shine: var(--fallback-color-shine);
    --tile-color-rgb: 122, 51, 72;
    --tile-text: #fff;
    --tile-text-muted: rgba(255, 255, 255, 0.72);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 170px;
    padding: 1rem;
    border-radius: 22px;
    text-decoration: none;
    color: var(--tile-text);
    overflow: hidden;
    /* od koloru bazowego ku odcieniowi ciemniejszemu — nie ku bieli, żeby
       nasycenie nie blakło */
    background: linear-gradient(150deg, var(--tile-color) 0%, var(--tile-color-shade) 100%);
    /* poświata przycięta do kafla: wąski cień dla głębi + krótki, stłumiony
       blask w barwie kafla — nie ma się już zlewać z sąsiadami w siatce */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 6px 14px -6px rgba(0, 0, 0, 0.6),
        0 4px 18px -6px rgba(var(--tile-color-rgb), 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover,
.tile:focus-visible {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 8px 16px -6px rgba(0, 0, 0, 0.6),
        0 6px 22px -4px rgba(var(--tile-color-rgb), 0.7);
}

.tile:active {
    transform: scale(0.97);
}

.tile-glow-spot {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--tile-color-shine);
    filter: blur(18px);
    opacity: 0.4;
    pointer-events: none;
}

.tile-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    backdrop-filter: blur(4px);
    cursor: help;
}

.tile-name {
    position: relative;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tile-text);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.tile-meta {
    position: relative;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    /* sam kolor tekstu nagłówka, tylko przygaszony — nie osobna stała */
    color: var(--tile-text-muted);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* ---------- Paginacja ---------- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 1rem 0 3rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
}

.pagination a:active {
    background: #241417;
}

.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}

.pagination .disabled {
    color: var(--text-faint);
}

/* ---------- Karta drinka ---------- */

.back-link {
    display: inline-block;
    margin: 1.25rem 0 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.drink-hero {
    --tile-text: #fff;
    position: relative;
    margin-top: 1rem;
    padding: 2.25rem 1.5rem;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(150deg, var(--tile-color, var(--fallback-color)) 0%, var(--tile-color-shade, var(--fallback-color-shade)) 100%);
    box-shadow: 0 14px 34px -14px var(--tile-color, var(--fallback-color));
}

.drink-hero::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--tile-color-shine, var(--fallback-color-shine));
    filter: blur(45px);
    opacity: 0.4;
    pointer-events: none;
}

.drink-name {
    position: relative;
    margin: 0;
    font-size: clamp(1.75rem, 6vw, 2.75rem);
    font-weight: 800;
    color: var(--tile-text);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.drink-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    color: #fff;
}

.drink-body {
    padding: 1.75rem 0 3rem;
    display: grid;
    gap: 2rem;
    max-width: 640px;
}

.section-title {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.fact-chip {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text);
}

.ingredient-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.ingredient-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

.ingredient-name {
    font-weight: 600;
}

.ingredient-label {
    color: var(--text-faint);
    font-size: 0.85rem;
    font-weight: 400;
}

.ingredient-optional {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(224, 41, 74, 0.18);
    color: #ffb199;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ingredient-amount {
    white-space: nowrap;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.instructions {
    font-size: 1.05rem;
    color: var(--text);
    white-space: pre-line;
}

.source-note {
    color: var(--text-faint);
    font-size: 0.9rem;
}

/* --- stopka --------------------------------------------------------------- */

.site-footer {
    margin-top: 4rem;
    padding: 2.5rem 1.25rem 3rem;
    border-top: 1px solid var(--border);
    background: radial-gradient(ellipse at bottom right, #2a0d16 0%, var(--bg) 70%);
    text-align: center;
}

.site-footer p {
    margin: 0 0 .5rem;
}

.footer-app {
    font-size: 1rem;
    color: var(--text);
}

.footer-app strong {
    background: linear-gradient(92deg, #fbbf24, #fb7185 60%, #a3e635);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(251, 146, 60, .45));
    font-weight: 800;
    letter-spacing: -.02em;
}

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

.footer-author a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid rgba(251, 191, 36, .5);
    padding-bottom: 1px;
}

.footer-author a:hover,
.footer-author a:focus-visible {
    border-bottom-color: #fbbf24;
    text-shadow: 0 0 14px rgba(251, 191, 36, .55);
}

.footer-note {
    font-size: .8rem;
    color: var(--text-faint);
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
}

.footer-warning {
    margin-top: 1.25rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .72rem;
    color: #8a746a;
}
