/* ==========================================================================
   SNIPER - tattoo & piercing
   Dark, monochrome and restrained: the logo and the work are the only colour.
   Written RTL-first with logical properties, so adding an LTR locale is a
   content change, not a CSS rewrite (docs/specs/tech/frontend-standards.md).
   ========================================================================== */

:root {
    --bg:          #0a0a0a;
    --surface:     #141414;
    --surface-alt: #1b1b1b;
    --line:        #2c2c2c;

    --text:        #ededed;  /* 16.4:1 on --bg */
    --muted:       #a9a9a9;  /*  8.0:1 on --bg */
    --accent:      #e5484d;  /*  4.9:1 on --bg */
    --accent-soft: #f2797d;
    --whatsapp:    #25d366;

    --wrap:        1160px;
    --gap:         clamp(1rem, 3vw, 2rem);
    --radius:      4px;

    --font: "Assistant", "Rubik", "Segoe UI", "Arial Hebrew", Arial, sans-serif;

    --shadow: 0 10px 30px rgb(0 0 0 / 55%);
}

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

html {
    /* Never suppress zoom: the site must survive 200% (WCAG 1.4.4). */
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img,
video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
    line-height: 1.25;
    margin: 0 0 0.5em;
    font-weight: 800;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

a { color: var(--accent-soft); }
a:hover { color: var(--accent); }

ul { margin: 0; padding: 0; }

/* --- Accessibility primitives ------------------------------------------- */

:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    border-radius: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    inset-block-start: -100px;
    inset-inline-start: 1rem;
    z-index: 100;
    padding: 0.75rem 1.25rem;
    background: #fff;
    color: #000;
    font-weight: 700;
    border-radius: var(--radius);
    transition: inset-block-start 0.15s ease;
}
.skip-link:focus { inset-block-start: 1rem; }

main:focus { outline: none; }

/* --- Layout -------------------------------------------------------------- */

.wrap {
    width: min(100% - 2 * var(--gap), var(--wrap));
    margin-inline: auto;
}

.section { padding-block: clamp(2.5rem, 7vw, 5rem); }
.section--alt { background: var(--surface); }
.section--cta {
    background: var(--surface-alt);
    text-align: center;
}

.section__heading {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    margin-block-end: 1.5rem;
}

.section__lead {
    color: var(--muted);
    max-width: 60ch;
    margin-inline: auto;
}

.section__more { margin-block-start: 2rem; }

.page-head {
    padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 3vw, 2rem);
    background: var(--surface);
    border-block-end: 1px solid var(--line);
}

.page-head__heading { font-size: clamp(1.75rem, 5vw, 2.75rem); }

.page-head__lead {
    color: var(--muted);
    max-width: 62ch;
    font-size: 1.05rem;
}

/* --- Header and navigation ---------------------------------------------- */

.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: rgb(10 10 10 / 92%);
    backdrop-filter: blur(8px);
    border-block-end: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.75rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
}

.brand__logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--line);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 800; font-size: 1.35rem; letter-spacing: 0.08em; }
.brand__tagline { font-size: 0.8rem; color: var(--muted); }

.nav__list {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.75rem);
    list-style: none;
    flex-wrap: wrap;
}

.nav__link {
    display: inline-block;
    padding: 0.5rem 0.25rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    border-block-end: 2px solid transparent;
}

.nav__link:hover { color: var(--accent-soft); }

.nav__link.is-current {
    color: var(--accent-soft);
    border-block-end-color: var(--accent);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.55rem 0.9rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    content: "";
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before { position: absolute; inset-block-start: -6px; }
.nav-toggle__bars::after  { position: absolute; inset-block-start: 6px; }

/* --- Hero ---------------------------------------------------------------- */

.hero {
    padding-block: clamp(3rem, 10vw, 6rem);
    background:
        radial-gradient(circle at 50% 0%, rgb(229 72 77 / 12%), transparent 60%),
        var(--bg);
    text-align: center;
    border-block-end: 1px solid var(--line);
}

.hero__logo {
    width: clamp(150px, 30vw, 220px);
    height: auto;
    margin-inline: auto;
    margin-block-end: 1.5rem;
    border-radius: 50%;
}

.hero__heading {
    font-size: clamp(1.9rem, 6vw, 3.5rem);
    margin-block-end: 0.75rem;
}

.hero__lead {
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    max-width: 55ch;
    margin-inline: auto;
    margin-block-end: 2rem;
}

/* --- Buttons ------------------------------------------------------------- */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-block: 1.5rem;
}

.actions--centred { justify-content: center; }
.section--cta .actions { justify-content: center; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;            /* comfortable touch target */
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
    background: #262626;
    color: var(--text);
    border-color: #3a3a3a;
}

.button--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #12080a;
}
.button--primary:hover {
    background: var(--accent-soft);
    border-color: var(--accent-soft);
    color: #12080a;
}

.button--ghost {
    background: transparent;
    border-color: #444;
}

.link-arrow {
    font-weight: 700;
    text-decoration: none;
    border-block-end: 1px solid currentColor;
}
.link-arrow::after {
    content: " \2190";           /* points along the RTL reading direction */
    display: inline-block;
}
[dir="ltr"] .link-arrow::after { content: " \2192"; }

/* --- Cards --------------------------------------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--gap);
    list-style: none;
}

.cards--wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
    padding: 1.5rem;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.section--alt .card { background: var(--bg); }

.card__tag {
    display: inline-block;
    margin-block-end: 0.5rem;
    padding: 0.15rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--accent-soft);
    border: 1px solid #4a2c2e;
    border-radius: 999px;
}

.card__title { font-size: 1.2rem; }
.card__text { color: var(--muted); margin: 0; }
.card__price { margin-block-start: 0.75rem; font-weight: 700; }

.note {
    color: var(--muted);
    font-size: 0.95rem;
    margin-block-start: 1.5rem;
}

.detail { margin-block-start: 2.5rem; }
.detail__heading { font-size: 1.15rem; margin-block-end: 0.25rem; }
.detail__value { font-size: 1.1rem; margin-block-end: 0.35rem; }

.prose { max-width: 70ch; }
.prose h2 { margin-block-start: 2rem; font-size: 1.35rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-inline-start: 1.25rem; }
.prose li { margin-block-end: 0.4rem; }
.prose__logo { border-radius: 50%; margin-block-end: 1.5rem; }

.error-detail {
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    font-size: 0.85rem;
}

/* --- Works book ---------------------------------------------------------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    list-style: none;
}

@media (min-width: 700px) {
    .gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

.gallery__cell { display: block; }

.gallery__item {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    cursor: pointer;
}

/* Anchors the video badge to the image, not to the button, so the caption
   underneath cannot sit beneath it. */
.gallery__media {
    position: relative;
    display: block;
}

.gallery__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.gallery__item:hover .gallery__image,
.gallery__item:focus-visible .gallery__image { transform: scale(1.04); opacity: 0.85; }

/* Item number under each thumbnail - "תמונה מספר 3" (request 0003). */
.gallery__caption {
    display: block;
    padding: 0.5rem 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.gallery__item:hover .gallery__caption,
.gallery__item:focus-visible .gallery__caption { color: var(--text); }

.gallery__badge {
    position: absolute;
    inset-block-end: 0.5rem;
    inset-inline-end: 0.5rem;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(0 0 0 / 70%);
    color: #fff;
}

/* --- Lightbox ------------------------------------------------------------ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto 1fr auto;   /* bar / media + arrows / caption */
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgb(0 0 0 / 94%);
}

.lightbox[hidden] { display: none; }

.lightbox__bar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lightbox__counter { margin: 0; color: var(--muted); font-size: 0.9rem; }

.lightbox__close,
.lightbox__nav {
    display: grid;
    place-items: center;
    min-width: 48px;
    min-height: 48px;
    background: rgb(255 255 255 / 8%);
    color: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: rgb(255 255 255 / 16%); }

/* Grid columns already follow the document direction: column 1 is the left in
   LTR and the right in RTL. So "previous" is column 1 in both, and no
   direction-specific placement is needed - overriding it was what put the
   arrows on the wrong sides in RTL (request 0003). */
.lightbox__nav--prev { grid-column: 1; grid-row: 2; }
.lightbox__nav--next { grid-column: 3; grid-row: 2; }

/* The chevrons are drawn LTR-style, so mirror them in RTL. */
[dir="rtl"] .lightbox__chevron { transform: scaleX(-1); }

.lightbox__caption {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.lightbox__stage {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    place-items: center;
    max-height: 100%;
    overflow: hidden;
}

.lightbox__stage img,
.lightbox__stage video {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    border-radius: var(--radius);
}

/* --- Sticky WhatsApp button ---------------------------------------------- */

.whatsapp-fab {
    position: fixed;
    inset-block-end: 1rem;
    inset-inline-start: 1rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.6rem 1.1rem;
    background: var(--whatsapp);
    color: #06301a;
    font-weight: 800;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.whatsapp-fab:hover { background: #1fbb5a; color: #06301a; }
.whatsapp-fab__icon { width: 24px; height: 24px; }

/* --- Footer -------------------------------------------------------------- */

.site-footer {
    background: var(--surface);
    border-block-start: 1px solid var(--line);
    padding-block-start: clamp(2rem, 6vw, 3.5rem);
    margin-block-start: auto;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--gap);
    padding-block-end: 2rem;
}

.site-footer__logo { border-radius: 50%; margin-block-end: 0.75rem; }
.site-footer__tagline { color: var(--muted); font-size: 0.95rem; }
.site-footer__heading { font-size: 1rem; letter-spacing: 0.04em; }

.site-footer__list { list-style: none; }
.site-footer__list li { margin-block-end: 0.5rem; }
.site-footer__list a { color: var(--muted); text-decoration: none; }
.site-footer__list a:hover { color: var(--text); text-decoration: underline; }

.site-footer__bar {
    border-block-start: 1px solid var(--line);
    padding-block: 1.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.site-footer__bar p { margin: 0; }

/* --- Small screens -------------------------------------------------------- */

@media (max-width: 767px) {
    .nav-toggle { display: inline-flex; }

    .nav {
        display: none;
        flex-basis: 100%;
    }

    .nav.is-open { display: block; }

    .nav__list {
        flex-direction: column;
        gap: 0;
        padding-block: 0.5rem;
        border-block-start: 1px solid var(--line);
    }

    .nav__item { border-block-end: 1px solid var(--line); }
    .nav__item:last-child { border-block-end: 0; }

    .nav__link {
        display: block;
        padding: 0.9rem 0.25rem;
        border-block-end: 0;
    }

    .nav__link.is-current { border-inline-start: 3px solid var(--accent); padding-inline-start: 0.75rem; }

    /* Keep the sticky button clear of the page bottom on mobile. */
    body { padding-block-end: 4.5rem; }

    .whatsapp-fab__label { display: inline; }
}

/* --- Motion and contrast preferences ------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

@media (prefers-contrast: more) {
    :root {
        --muted: #d5d5d5;
        --line:  #5a5a5a;
    }
}

/* --- Print ---------------------------------------------------------------- */

@media print {
    .site-header,
    .whatsapp-fab,
    .lightbox { display: none !important; }

    body { background: #fff; color: #000; }
}
