/* ============================================
   Sigal Homeware — Main Stylesheet
   File: wwwroot/css/sapsheva.css
   ============================================ */

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

:root {
    --white: #F5F0EB;
    --linen: #E8DDD2;
    --stone: #C4A98A;
    --ash: #A08060;
    --dusk: #6A5040;
    --charcoal: #3C2A1E;
    --ink: #2A1E16;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    color: var(--charcoal);
    font-family: 'Heebo', sans-serif;
    font-weight: 300;
    direction: rtl;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--linen);
}

.nav-logo {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-size: 1.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
}

.nav-center {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-close {
    display: none;
}

.nav-center a {
    font-family: 'Heebo', sans-serif;
    font-size: 1.1rem;
    color: var(--ash);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 300;
}

    .nav-center a:hover {
        color: var(--ink);
    }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-icon {
    display: flex;
    align-items: center;
    color: var(--ash);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

    .nav-icon:hover {
        color: var(--ink);
    }

    .nav-icon svg {
        width: 30px;
        height: 30px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.cart-count {
    position: absolute;
    top: -6px;
    left: -6px;
    width: 18px;
    height: 18px;
    background: var(--charcoal);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
}

/* HERO */
.hero {
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 3.5rem 6rem 4rem;
    position: relative;
    z-index: 2;
    text-align: right;
}

.hero-story {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    opacity: 0;
    animation: fadeUp 1s 0.5s forwards;
}

    .hero-story p {
        font-size: 1.05rem;
        line-height: 1.9;
        color: var(--ink);
        font-weight: 300;
    }

.hero-story-break {
    margin-top: 1.25rem !important;
    color: var(--ink) !important;
}

.hero-welcome {
    font-family: 'Cormorant', serif;
    font-size: 1.7rem !important;
    font-weight: 400;
    color: var(--ink) !important;
    margin-top: 0.75rem !important;
    font-style: italic;
}

.hero-headline {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    line-height: 1.2;
    color: var(--ink);
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    white-space: nowrap;
    opacity: 0;
    animation: fadeUp 1s 0.3s forwards;
}

.hero-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--stone);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 1s 0.3s forwards;
    font-weight: 300;
}

.hero-cta {
    margin-top: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--charcoal);
    text-decoration: none;
    opacity: 0;
    animation: fadeUp 1s 0.9s forwards;
    transition: gap 0.3s;
    font-weight: 300;
    align-self: flex-start;
}

    .hero-cta:hover {
        gap: 1.5rem;
    }

    .hero-cta::before {
        content: '';
        display: block;
        width: 40px;
        height: 1px;
        background: var(--charcoal);
        transition: width 0.3s;
    }

    .hero-cta:hover::before {
        width: 60px;
    }

.hero-image {
    background: var(--linen);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 1.4s 0.2s forwards;
}

.hero-image-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--white) 0%, transparent 18%), linear-gradient(to left, var(--white) 0%, transparent 18%), linear-gradient(to bottom, var(--white) 0%, transparent 15%), linear-gradient(to top, var(--white) 0%, transparent 15%);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 768px) {
    .hero-image-fade {
        background: linear-gradient(to bottom, var(--white) 0%, transparent 18%), linear-gradient(to top, var(--white) 0%, transparent 18%);
    }
}

.hero-vase {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 55%;
}

.hero-number {
    position: absolute;
    bottom: 2.5rem;
    left: 2.5rem;
    font-family: 'Cormorant', serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--stone);
    direction: ltr;
}

.divider {
    height: 1px;
    background: var(--linen);
    margin: 0 3.5rem;
}

/* PRODUCTS */
.products {
    padding: 8rem 3.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4rem;
}

.section-label {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--stone);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'Heebo', sans-serif;
    font-weight: 200;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    color: var(--ink);
    line-height: 1.2;
}

.products-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.product-card {
    position: relative;
    overflow: hidden;
    background: var(--linen);
    border-radius: 2px;
}

    .product-card:first-child {
        grid-row: 1 / 3;
    }

.product-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-card:first-child .product-card-img {
    aspect-ratio: unset;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.product-card:first-child {
    min-height: 640px;
}

.product-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(22,21,15,0.55) 0%, transparent 100%);
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.4s ease;
    text-align: right;
}

.product-card:hover .product-card-info {
    transform: translateY(0);
}

.product-name {
    font-family: 'Heebo', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    display: block;
}

.product-price {
    font-size: 0.82rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    display: block;
    direction: ltr;
    text-align: right;
}

.product-tag {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 0.68rem;
    background: var(--white);
    color: var(--ash);
    padding: 0.35rem 0.75rem;
    border-radius: 1px;
    font-weight: 300;
}

/* FOOTER */
footer {
    background: var(--ink);
    padding: 4rem 3.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: 'Cormorant', serif;
    font-weight: 300;
    font-size: 1.3rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--stone);
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

    .footer-links a {
        font-size: 0.82rem;
        color: var(--dusk);
        text-decoration: none;
        transition: color 0.3s;
        font-weight: 300;
    }

        .footer-links a:hover {
            color: var(--stone);
        }

.footer-copy {
    font-size: 0.65rem;
    color: var(--dusk);
    direction: ltr;
}

/* ACCESSIBILITY */
.skip-link {
    position: absolute;
    top: -100px;
    right: 0;
    background: var(--ink);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-family: 'Heebo', sans-serif;
    font-weight: 300;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s;
}

    .skip-link:focus {
        top: 0;
    }

.a11y-fab {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #0057B8;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8000;
    box-shadow: 0 4px 20px rgba(0,60,130,0.4);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

    .a11y-fab:hover {
        background: #0047A0;
        transform: scale(1.08);
        box-shadow: 0 6px 28px rgba(0,60,130,0.55);
    }

    .a11y-fab:focus {
        outline: 3px solid #ffffff;
        outline-offset: 3px;
    }

    .a11y-fab svg {
        width: 38px;
        height: 38px;
        fill: #ffffff;
        stroke: none;
    }

.a11y-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--white);
    border-left: 1px solid var(--linen);
    z-index: 9000;
    padding: 2rem;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0,0,0,0.06);
}

    .a11y-panel.open {
        display: block;
    }

.a11y-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--linen);
}

.a11y-panel-title {
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--ink);
}

.a11y-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ash);
    padding: 4px;
    display: flex;
    transition: color 0.2s;
}

    .a11y-close:hover {
        color: var(--ink);
    }

    .a11y-close svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.5;
        stroke-linecap: round;
    }

.a11y-section {
    margin-bottom: 1.75rem;
}

.a11y-section-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone);
    margin-bottom: 0.75rem;
    display: block;
}

.a11y-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--linen);
    font-size: 0.85rem;
    color: var(--charcoal);
    font-family: 'Heebo', sans-serif;
    font-weight: 300;
}

.a11y-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.a11y-ctrl-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--linen);
    border-radius: 2px;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--ash);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
    font-family: 'Heebo', sans-serif;
}

    .a11y-ctrl-btn:hover {
        border-color: var(--charcoal);
        color: var(--charcoal);
    }

    .a11y-ctrl-btn:focus {
        outline: 2px solid var(--charcoal);
        outline-offset: 2px;
    }

.a11y-val {
    font-size: 0.8rem;
    color: var(--ash);
    min-width: 28px;
    text-align: center;
}

.a11y-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--linen);
    border-radius: 11px;
    border: none;
    cursor: pointer;
    transition: background 0.25s;
}

    .a11y-toggle::after {
        content: '';
        position: absolute;
        top: 3px;
        right: 3px;
        width: 16px;
        height: 16px;
        background: var(--white);
        border-radius: 50%;
        transition: right 0.25s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

    .a11y-toggle.on {
        background: var(--charcoal);
    }

        .a11y-toggle.on::after {
            right: calc(100% - 19px);
        }

.a11y-reset {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: none;
    border: 1px solid var(--linen);
    border-radius: 2px;
    font-family: 'Heebo', sans-serif;
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--ash);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

    .a11y-reset:hover {
        border-color: var(--charcoal);
        color: var(--charcoal);
    }

/* Applied accessibility classes */
body.a11y-big-text {
    font-size: 120%;
}

body.a11y-big-cursor, body.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 4 L8 28 L14 22 L18 30 L21 29 L17 21 L25 21 Z' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 8 4, auto !important;
}

body.a11y-high-contrast {
    filter: contrast(1.5);
}

body.a11y-grayscale {
    filter: grayscale(1);
}

body.a11y-links a {
    text-decoration: underline !important;
}

body.a11y-no-anim * {
    animation: none !important;
    transition: none !important;
}

/* ── MOBILE ── */
@media (max-width: 768px) {

    nav {
        padding: 1rem 1.25rem;
        gap: 0.75rem;
    }

    .nav-logo {
        font-size: 1.1rem;
        letter-spacing: 0.12em;
    }

    .nav-center {
        gap: 1.25rem;
    }

        .nav-center a {
            font-size: 0.85rem;
        }

    .nav-actions {
        gap: 1rem;
    }

    .nav-icon svg {
        width: 22px;
        height: 22px;
    }

    .cart-count {
        width: 14px;
        height: 14px;
        font-size: 0.5rem;
    }

    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: 45vh 1fr;
        height: auto;
        min-height: 100svh;
    }

    .hero-image {
        order: -1;
    }

    .hero-text {
        padding: 2rem 1.5rem 4rem;
        justify-content: flex-start;
    }

    .hero-headline {
        font-size: clamp(1.4rem, 5vw, 2rem);
        white-space: normal;
        margin-bottom: 1.25rem;
    }

    .hero-story p {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .hero-welcome {
        font-size: 1.4rem !important;
    }

    .hero-cta {
        margin-top: 2rem;
    }

    .divider {
        margin: 0 1.25rem;
    }

    .products {
        padding: 3.5rem 1.25rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .product-card:first-child {
        grid-row: auto;
        grid-column: 1 / -1;
        min-height: 320px;
    }

    footer {
        flex-direction: column;
        gap: 1.25rem;
        padding: 2.5rem 1.5rem;
        text-align: center;
    }

    .footer-links {
        gap: 1.25rem;
    }

    .a11y-fab {
        bottom: 1.25rem;
        left: 1.25rem;
        width: 46px;
        height: 46px;
    }

    .a11y-panel {
        width: 100%;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

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

.reveal-delay-1 {
    transition-delay: 0.12s;
}

.reveal-delay-2 {
    transition-delay: 0.24s;
}

.reveal-delay-3 {
    transition-delay: 0.36s;
}
