/* ============================
   El Herbario — Styles
   ============================ */

/* ======== VARIABLES ======== */
:root {
    --bg: #f8f6f2;
    --bg-card: #faf8f5;
    --text: #1a1a1a;
    --text-muted: #8a7e74;
    --text-light: #a09585;
    --border: #e5e0d8;
    --border-light: #ede8e0;
    --accent: #7a8a5e;
    --accent-light: #e8eddf;
    --danger: #c0564f;
    --danger-light: #fce8e8;
    --caution: #c4a97d;
    --caution-light: #fef3e2;
    --purple: #8b6b9e;
    --purple-light: #f0e5f5;
    --radius: 10px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spring: cubic-bezier(0.22, 1.2, 0.36, 1);
}

/* ======== RESET ======== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ======== HERO (editorial style) ======== */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 48px 0;
    opacity: 0;
    animation: heroFadeIn 1s var(--ease-out-expo) 0.1s forwards;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-label {
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 20px;
    opacity: 0;
    animation: labelSlide 0.8s var(--ease-out-expo) 0.3s forwards;
}
@keyframes labelSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.hero h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(3.5em, 8vw, 6.5em);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}
.hero h1 em {
    font-style: italic;
    color: var(--accent);
    display: inline-block;
    transition: color 0.4s;
}
.hero-desc {
    font-size: 1em;
    color: var(--text-muted);
    max-width: 420px;
    line-height: 1.7;
    font-weight: 300;
    opacity: 0;
    animation: heroFadeIn 0.8s var(--ease-out-expo) 0.5s forwards;
}

/* ======== META BAR ======== */
.meta-bar {
    display: flex;
    gap: 0;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: heroFadeIn 0.8s var(--ease-out-expo) 0.6s forwards;
}
.meta-item {
    position: relative;
    flex: 1;
    padding: 24px 0;
    text-align: center;
    border-right: 1px solid var(--border-light);
    transition: background 0.3s;
}
.meta-item:last-child { border-right: none; }
.meta-item:hover { background: rgba(122, 138, 94, 0.03); }
.meta-num {
    font-family: 'Instrument Serif', serif;
    font-size: 2.2em;
    line-height: 1;
    display: block;
    transition: transform 0.3s var(--spring);
}
.meta-item:hover .meta-num { transform: scale(1.08); }
.meta-label {
    font-size: 0.62em;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 6px;
}

/* ======== SEARCH + FILTERS ======== */
.controls {
    max-width: 1200px;
    margin: 28px auto 0;
    padding: 0 48px;
    opacity: 0;
    animation: heroFadeIn 0.8s var(--ease-out-expo) 0.7s forwards;
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
}
.search-bar input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92em;
    color: var(--text);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.search-bar input::placeholder { color: var(--text-light); transition: color 0.3s; }
.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(122, 138, 94, 0.1);
    background: #fff;
}
.search-bar input:focus::placeholder { color: var(--border); }
.search-bar .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: color 0.3s;
    pointer-events: none;
}
.search-bar input:focus ~ .search-icon { color: var(--accent); }

/* Clear button */
.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 24px; height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--border-light);
    color: var(--text-muted);
    font-size: 0.8em;
    cursor: pointer;
    transition: transform 0.25s var(--spring), background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-clear.visible { transform: translateY(-50%) scale(1); }
.search-clear:hover { background: var(--border); }

/* Filter: segmented horizontal bar */
.filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.filter-group {
    display: flex;
    gap: 2px;
    background: var(--border-light);
    border-radius: 8px;
    padding: 3px;
}
.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    color: var(--text-muted);
    white-space: nowrap;
    position: relative;
}
.filter-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.5);
}
.filter-btn.active {
    background: white;
    color: var(--text);
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    transform: scale(1.02);
}
.filter-btn:active {
    transform: scale(0.97);
}
.filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.3s var(--spring);
}
.filter-btn.active .filter-dot {
    transform: scale(1.3);
}

/* Category colors */
.cat-relajante { background: #b8c5e2; }
.cat-digestiva { background: #e2c87a; }
.cat-respiratoria { background: #7abfb0; }
.cat-circulatoria { background: #d4868a; }
.cat-depurativa { background: #8ab87a; }
.cat-inmune { background: #b09cd6; }
.cat-urinaria { background: #7ab5d4; }
.cat-hormonal { background: #c97ab8; }
.cat-piel { background: #d4a87a; }
.cat-general { background: #aaa59c; }
.cat-especias { background: #c98a5a; }

/* ======== GRID ======== */
.grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px 80px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* ======== CARDS (apothecary style) ======== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    /* Staggered entrance */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out-expo) calc(var(--index, 0) * 70ms),
                transform 0.6s var(--ease-out-expo) calc(var(--index, 0) * 70ms),
                box-shadow 0.35s var(--ease-out-expo),
                border-color 0.35s;
}
.card.visible {
    opacity: 1;
    transform: translateY(0);
}
.card:hover, .card:focus-visible {
    transform: translateY(-4px);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.03),
        0 8px 16px rgba(0,0,0,0.05),
        0 20px 44px rgba(0,0,0,0.08);
    border-color: var(--border);
}
.card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.card:focus:not(:focus-visible) { outline: none; }
.card:active {
    transform: translateY(-1px) scale(0.995);
    transition-duration: 0.1s;
}

/* Colored top line per category — expand on hover */
.card-top-line {
    height: 3px;
    width: 100%;
    transition: height 0.35s var(--ease-out-expo);
}
.card:hover .card-top-line {
    height: 5px;
}

.card-inner {
    padding: 22px 24px 18px;
    position: relative;
}

/* Stamp (safety indicator) */
.card-stamp {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 48px;
    height: 48px;
    border: 2px solid;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transform: rotate(-12deg);
    line-height: 1.15;
    text-align: center;
    transition: transform 0.4s var(--spring);
}
.card:hover .card-stamp {
    transform: rotate(-6deg) scale(1.08);
}
.stamp-safe { border-color: var(--accent); color: var(--accent); }
.stamp-caution { border-color: var(--caution); color: var(--caution); }
.stamp-danger { border-color: var(--danger); color: var(--danger); }

.card-category-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.card-category-label .cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.3s var(--spring);
}
.card:hover .card-category-label .cat-dot {
    transform: scale(1.4);
}
.card-category-label span:last-child {
    font-size: 0.68em;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-light);
    font-weight: 500;
}

.card h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.6em;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text);
    padding-right: 56px;
    letter-spacing: -0.01em;
    transition: color 0.3s;
}
.card:hover h2 { color: #111; }

.card-desc {
    color: var(--text-muted);
    font-size: 0.88em;
    line-height: 1.55;
    margin-bottom: 14px;
    font-weight: 300;
    padding-right: 20px;
}
.card-props {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.prop-tag {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.76em;
    font-weight: 500;
    background: var(--border-light);
    color: #6b5e50;
    transition: background 0.3s, transform 0.25s var(--spring);
}
.card:hover .prop-tag {
    background: #e8e2d8;
}

.prop-dots { margin-left: 3px; letter-spacing: 1px; }
.prop-dots .on { color: var(--accent); }
.prop-dots .off { color: #d4c9ba; }

.card-footer {
    padding: 10px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s;
}
.card:hover .card-footer { border-color: var(--border); }

.card-footer-cat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72em;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.card-footer-cat .cat-dot-sm {
    width: 6px; height: 6px;
    border-radius: 50%;
}
.card-stock {
    font-size: 0.72em;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
    transition: transform 0.25s var(--spring);
}
.card:hover .card-stock { transform: scale(1.05); }
.stock-have { background: var(--accent-light); color: #5a6b40; }
.stock-want { background: var(--purple-light); color: var(--purple); }

/* ======== MODAL ======== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    display: flex;
    pointer-events: none;
    transition: background 0.4s var(--ease-out-expo),
                backdrop-filter 0.4s var(--ease-out-expo),
                -webkit-backdrop-filter 0.4s var(--ease-out-expo);
}
.modal-overlay.visible {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto;
}

.modal {
    background: var(--bg);
    border-radius: 14px;
    max-width: 580px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.4s var(--ease-out-expo),
                transform 0.4s var(--ease-out-expo);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.modal-overlay.visible .modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin-right: 16px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 1.1em;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s var(--spring);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: var(--border-light);
    transform: rotate(90deg) scale(1.1);
    border-color: var(--border);
}

.modal-top-line { height: 4px; border-radius: 14px 14px 0 0; }

.modal-header {
    padding: 28px 28px 0;
}
.modal-category-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.modal-cat-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}
.modal-cat-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    font-weight: 500;
}

.modal-header h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 2.2em;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.modal-scientific {
    font-size: 0.88em;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 4px;
}
.modal-badges {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.modal-badge {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: transform 0.25s var(--spring);
}
.modal-badge:hover { transform: scale(1.05); }
.mbadge-safe { background: var(--accent-light); color: #5a6b40; }
.mbadge-caution { background: var(--caution-light); color: #a67c37; }
.mbadge-danger { background: var(--danger-light); color: var(--danger); }
.mbadge-have { background: var(--accent-light); color: #5a6b40; }
.mbadge-want { background: var(--purple-light); color: var(--purple); }

.modal-section {
    padding: 20px 28px 0;
}
.modal-section:last-child { padding-bottom: 28px; }

.modal-section-title {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}
.modal-section p {
    font-size: 0.92em;
    color: var(--text-muted);
    line-height: 1.65;
    font-weight: 300;
}

.modal-props-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-prop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: border-color 0.25s, transform 0.2s var(--spring);
}
.modal-prop-row:hover {
    border-color: var(--border);
    transform: translateX(4px);
}
.modal-prop-name {
    font-size: 0.88em;
    font-weight: 500;
    color: var(--text);
}
.modal-prop-dots {
    display: flex;
    gap: 4px;
}
.modal-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border-light);
    transition: transform 0.3s var(--spring);
}
.modal-dot.filled { background: var(--accent); }
.modal-prop-row:hover .modal-dot.filled {
    transform: scale(1.25);
}

.modal-safety-box {
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 3px solid;
    font-size: 0.9em;
    line-height: 1.55;
    font-weight: 400;
    transition: border-left-width 0.3s var(--ease-out-expo);
}
.modal-safety-box:hover { border-left-width: 5px; }
.safety-safe { background: var(--accent-light); border-color: var(--accent); color: #4a5a36; }
.safety-caution { background: var(--caution-light); border-color: var(--caution); color: #7a6030; }
.safety-danger { background: var(--danger-light); border-color: var(--danger); color: #8a3a36; }

.modal-list {
    list-style: none;
    padding: 0;
}
.modal-list li {
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.55;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    font-weight: 300;
    transition: padding-left 0.25s var(--ease-out-expo);
}
.modal-list li:hover { padding-left: 6px; }
.modal-list li:last-child { border-bottom: none; }
.modal-list li::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--text-light);
    margin-right: 10px;
    vertical-align: middle;
    transition: background 0.25s;
}
.modal-list li:hover::before { background: var(--accent); }

.modal-prep-box {
    padding: 14px 16px;
    border-radius: 8px;
    background: #f0f5f2;
    border-left: 3px solid var(--accent);
    font-size: 0.9em;
    color: #4a5a36;
    line-height: 1.55;
    font-weight: 300;
    transition: border-left-width 0.3s var(--ease-out-expo);
}
.modal-prep-box:hover { border-left-width: 5px; }

.modal-reco-box {
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--purple-light);
    border-left: 3px solid var(--purple);
    margin-top: 4px;
    transition: border-left-width 0.3s var(--ease-out-expo);
}
.modal-reco-box:hover { border-left-width: 5px; }
.modal-reco-box strong {
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--purple);
    display: block;
    margin-bottom: 4px;
}
.modal-reco-box p {
    color: #6a4a7a !important;
}

/* ======== DETAIL GRID (modal info rows) ======== */
.modal-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.modal-detail-item {
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    transition: border-color 0.25s, transform 0.2s var(--spring);
}
.modal-detail-item:hover {
    border-color: var(--border);
    transform: translateY(-2px);
}
.modal-detail-label {
    font-size: 0.68em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 3px;
}
.modal-detail-value {
    font-size: 0.88em;
    color: var(--text);
    font-weight: 400;
    line-height: 1.4;
}

/* Combination tags */
.modal-combos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.modal-combo-tag {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.82em;
    font-weight: 400;
    background: var(--border-light);
    color: #5a5040;
    transition: background 0.25s, transform 0.2s var(--spring);
}
.modal-combo-tag:hover {
    background: #e0dbd0;
    transform: translateY(-1px);
}

/* History block */
.modal-history-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.modal-history-item {
    padding-left: 14px;
    border-left: 2px solid var(--border-light);
    transition: border-color 0.3s;
}
.modal-history-item:hover {
    border-color: var(--accent);
}
.modal-history-item h4 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.05em;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 4px;
}
.modal-history-item p {
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
}

/* Usos coloquiales tags */
.modal-usos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.modal-uso-tag {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.78em;
    font-weight: 500;
    background: var(--accent-light);
    color: #5a6b40;
    transition: background 0.25s, transform 0.2s var(--spring);
}
.modal-uso-tag:hover {
    background: #d8e4cc;
    transform: translateY(-1px);
}

/* ======== BACK TO TOP ======== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s var(--spring), background 0.2s, box-shadow 0.3s;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ======== CARD COUNT BADGE ======== */
.grid-count {
    max-width: 1200px;
    margin: -20px auto 12px;
    padding: 0 48px;
    font-size: 0.78em;
    color: var(--text-light);
    font-weight: 400;
    transition: opacity 0.3s;
}

/* ======== NO RESULTS ======== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
    animation: heroFadeIn 0.5s var(--ease-out-expo);
}
.no-results h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.6em;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
    .hero, .controls, .grid, .grid-count { padding-left: 20px; padding-right: 20px; }
    .hero { padding-top: 40px; }
    .grid { grid-template-columns: 1fr; }
    .meta-bar { flex-wrap: wrap; }
    .meta-item { flex: 1 1 45%; border-bottom: 1px solid var(--border-light); }
    .meta-item:nth-child(2) { border-right: none; }
    .meta-item:nth-last-child(-n+2) { border-bottom: none; }
    .filter-group { flex-wrap: wrap; }
    .modal-header, .modal-section { padding-left: 20px; padding-right: 20px; }
    .modal-detail-grid { grid-template-columns: 1fr; }
    .back-to-top { bottom: 20px; right: 20px; }
    .grid-count { margin-top: -12px; }
}

/* ======== REDUCED MOTION ======== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .card { opacity: 1; transform: none; }
    .hero, .hero-label, .hero-desc, .meta-bar, .controls { opacity: 1; animation: none; }
}
