/*
 * Red Cape - global styles (loaded on every page).
 * Written with CSS logical properties (inline-start / inline-end), so the
 * same rules serve LTR (English, the source design) and RTL (Hebrew).
 * Hebrew-only typographic tuning lives in rtl.css.
 */

/* ---------- Tokens ---------- */
:root {
  --ink: #0a0808;
  --ink-soft: #151111;
  --wine: #4a0d1f;
  --wine-deep: #23050e;
  --wine-panel: #26060f;
  --red: #c9283e;
  --red-dark: #8f1427;
  /* Red used for small text on dark surfaces: 4.5:1+ on #0a0808 - #26060f */
  --red-text: #f0566b;
  --paper: #f7f1ea;
  --paper-soft: #e9dfd6;
  --sand: #d8c6ad;
  --muted: #a8a09a;
  --muted-dark: #5e5752;
  --line: rgba(245, 240, 232, .2);
  --line-dark: rgba(10, 8, 8, .18);
  --nonti-orange: #f7983d;
  --row9-neutral: #d9cec3;
  --header-h: 68px;
  --page-pad: clamp(20px, 4vw, 72px);
  --section-pad: clamp(84px, 10vw, 180px);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-he: Arial, "Noto Sans Hebrew", sans-serif;
  --focus: #fff;
  --focus-halo: #0a0808;
  /* 1 in LTR, -1 in RTL: used for horizontal motion (transforms are not logical) */
  --dir: 1;
}
[dir="rtl"] { --dir: -1; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; min-width: 320px; background: var(--ink); color: var(--paper); font-family: var(--font-sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
:lang(he) body, body:lang(he) { font-family: var(--font-he); }
body.is-locked { overflow: hidden; }
img, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- Accessibility ---------- */
.skip-link { position: fixed; inset-inline-start: 16px; top: -80px; z-index: 1000; padding: 12px 18px; background: var(--paper); color: var(--ink); font-weight: 700; transition: top 180ms ease; }
.skip-link:focus { top: 16px; }
/* Two-tone ring: visible on every surface of the site (dark, wine, paper, sand). */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 5px var(--focus-halo); }
.on-light :focus-visible, .on-light:focus-visible { --focus: #0a0808; --focus-halo: #fff; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sr-only-focusable:focus { position: static !important; width: auto; height: auto; margin: 0; clip: auto; white-space: normal; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; line-height: 0; color: currentColor; }
.brand-logo { display: block; width: clamp(68px, 5.6vw, 96px); height: auto; max-height: 62px; object-fit: contain; }
.page-top .brand-logo, .hero-top .brand-logo { width: clamp(96px, 8vw, 128px); max-height: 96px; filter: drop-shadow(0 2px 14px rgba(0, 0, 0, .45)); }
.site-header .brand-logo { width: 62px; max-height: 46px; }
.menu-head .brand-logo { width: 96px; max-height: 72px; }
.footer-brand .brand-logo { width: 118px; max-height: none; }

/* ---------- Controls ---------- */
.menu-trigger { display: inline-flex; align-items: center; gap: 13px; min-height: 44px; padding: 0; background: transparent; color: inherit; cursor: pointer; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.menu-icon { width: 24px; height: 12px; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; inset-inline-start: 0; width: 24px; height: 1px; background: currentColor; transition: width 220ms ease; }
.menu-icon::before { top: 2px; }
.menu-icon::after { bottom: 2px; width: 14px; }
.menu-trigger:hover .menu-icon::after { width: 24px; }

.lang-switch, .lang-switch ul { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch a, .lang-switch span { display: inline-grid; place-items: center; min-width: 36px; min-height: 38px; padding: 0 7px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.lang-switch a { opacity: .72; }
.lang-switch a:hover { opacity: 1; }
.lang-switch [aria-current="true"] { opacity: 1; border-block-end: 1px solid currentColor; }

.search-link { width: 44px; height: 44px; display: grid; place-items: center; }
.search-link svg { width: 20px; }

/* ---------- Page top (overlay on the first viewport) ---------- */
.page-top { position: absolute; z-index: 20; inset-block-start: 0; inset-inline: 0; height: 106px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: var(--page-pad); color: #fff; }
.page-top .brand { justify-self: center; }
.page-top .page-top-end { justify-self: end; display: flex; align-items: center; gap: 16px; }

/* ---------- Scroll header ---------- */
.site-header { position: fixed; z-index: 80; inset-block-start: 0; inset-inline: 0; height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: var(--page-pad); background: rgba(35, 5, 14, .94); color: var(--paper); border-block-end: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(16px); transform: translateY(-110%); opacity: 0; visibility: hidden; transition: transform 360ms var(--ease), opacity 260ms ease, visibility 0s 360ms; }
.site-header.is-visible, .site-header:focus-within { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.site-header .brand { justify-self: center; }
.site-header .header-end { justify-self: end; display: flex; align-items: center; gap: 16px; }
.admin-bar .site-header { inset-block-start: var(--wp-admin--admin-bar--height, 32px); }

/* ---------- Menu panel ---------- */
.menu-overlay { position: fixed; z-index: 89; inset: 0; background: rgba(0, 0, 0, .72); opacity: 0; visibility: hidden; transition: opacity 360ms ease, visibility 0s 360ms; }
.menu-overlay.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu-panel { position: fixed; z-index: 90; inset-block: 0; inset-inline-end: 0; width: min(74vw, 1120px); height: 100dvh; overflow: auto; background: var(--wine-panel); color: var(--paper); visibility: hidden; transform: translateX(calc(102% * var(--dir))); transition: transform 620ms var(--ease), visibility 0s 620ms; }
.menu-panel.is-open { transform: none; visibility: visible; transition-delay: 0s; }
html.is-loading .menu-panel, html.is-loading .menu-overlay { transition: none !important; }
.menu-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 12%, rgba(214, 40, 53, .22), transparent 36%), linear-gradient(145deg, transparent 0 55%, rgba(255, 255, 255, .025) 55% 56%, transparent 56%); pointer-events: none; }
.menu-inner { position: relative; min-height: 100%; padding: 30px clamp(28px, 5vw, 84px) 42px; display: grid; grid-template-rows: auto 1fr auto; }
.menu-head { display: flex; align-items: center; justify-content: space-between; }
.menu-close, .icon-close { width: 48px; height: 48px; background: transparent; color: currentColor; cursor: pointer; position: relative; }
.menu-close::before, .menu-close::after, .icon-close::before, .icon-close::after { content: ""; position: absolute; width: 30px; height: 1px; background: currentColor; inset-inline-start: 9px; top: 24px; }
.menu-close::before, .icon-close::before { transform: rotate(45deg); }
.menu-close::after, .icon-close::after { transform: rotate(-45deg); }

.menu-nav { align-self: center; padding-block: 52px; }
.menu-nav ol, .menu-nav ul { display: grid; }
.menu-nav a { position: relative; display: flex; align-items: baseline; gap: 18px; width: fit-content; max-width: 100%; padding-block: 5px; font-size: clamp(26px, 2.9vw, 48px); line-height: 1.02; letter-spacing: -.055em; font-weight: 650; color: rgba(245, 240, 232, .62); transition: color 220ms ease, transform 320ms var(--ease); }
.menu-nav .menu-num { min-width: 22px; color: var(--red-text); font-size: 11px; letter-spacing: .12em; }
.menu-nav a:hover, .menu-nav a:focus-visible { color: var(--paper); transform: translateX(calc(12px * var(--dir))); }
.menu-nav [aria-current="page"] { color: var(--paper); }
/* Second level = Row 9 companies / team: indented, smaller, red dot */
.menu-nav .sub-menu { display: grid; }
.menu-nav .sub-menu a { font-size: clamp(18px, 1.8vw, 30px); padding-inline-start: clamp(28px, 2.6vw, 46px); align-items: center; }
.menu-nav .sub-menu a::before { content: ""; flex: 0 0 auto; width: .26em; height: .26em; border-radius: 50%; background: var(--red); }
.menu-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; border-block-start: 1px solid var(--line); padding-block-start: 24px; color: var(--muted); font-size: 12px; }
.menu-social { display: flex; flex-wrap: wrap; gap: 18px; }
.menu-social a { color: var(--paper); }

/* ---------- Shared typography ---------- */
main { position: relative; display: block; }
.section { position: relative; min-height: 75vh; overflow: clip; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 700; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.display { font-size: clamp(58px, 10vw, 172px); line-height: .79; letter-spacing: -.075em; font-weight: 650; }
.section-copy { font-size: clamp(18px, 1.55vw, 26px); line-height: 1.42; letter-spacing: -.02em; }
.text-link { display: inline-flex; align-items: center; gap: 18px; margin-block-start: 34px; padding-block-end: 7px; border-block-end: 1px solid currentColor; font-size: 12px; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; }
.text-link::after { content: "↗"; font-size: 15px; transition: transform 220ms ease; }
[dir="rtl"] .text-link::after { content: "↖"; }
.text-link:hover::after { transform: translate(calc(3px * var(--dir)), -3px); }

/* Scroll reveal only when JS is running - content is never hidden without it */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity 700ms ease, transform 800ms var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 24px; cursor: pointer; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; transition: background 220ms ease, color 220ms ease, border-color 220ms ease; }
.button-primary { background: var(--paper); color: var(--ink); }
.button-primary:hover { background: var(--red); color: #fff; }
.button-secondary { background: transparent; color: var(--paper); border: 1px solid rgba(255, 255, 255, .6); }
.button-secondary:hover { border-color: #fff; }

/* ---------- Film card (home, catalog, similar films) ---------- */
.movie-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(24px, 2.1vw, 42px) clamp(10px, 1.2vw, 22px); }
.movie-card { min-width: 0; display: block; transition: opacity 260ms ease, transform 360ms var(--ease); }
.movie-card[hidden] { display: none; }
.poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--fallback, linear-gradient(140deg, #21100e, #805449 50%, #d7bc91)); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 550ms var(--ease), filter 400ms ease; }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, .76)); pointer-events: none; }
.movie-card:hover .poster img { transform: scale(1.04); filter: contrast(1.05) saturate(.92); }
.movie-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "meta status"; gap: 8px 10px; align-items: center; padding-block-start: 10px; }
.movie-title { grid-area: title; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.12em; font-size: clamp(14px, 1.15vw, 19px); line-height: 1.06; letter-spacing: -.035em; overflow-wrap: anywhere; }
.movie-meta { grid-area: meta; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.movie-meta span + span::before { content: "·"; margin-inline: 6px; }
.movie-status { grid-area: status; margin: 0; white-space: nowrap; color: var(--red-text); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; text-align: end; }

/* ---------- Footer ---------- */
.footer { background: #070606; color: var(--paper); padding: 58px var(--page-pad) 34px; }
.footer-main { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; padding-block-end: 70px; }
.footer-address { margin-block-start: 26px; color: var(--muted); font-size: 13px; line-height: 1.7; font-style: normal; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-links h2 { margin-block-end: 18px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; }
.footer-links a { display: block; width: fit-content; margin-block-end: 10px; font-size: 13px; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block-start: 22px; border-block-start: 1px solid rgba(255, 255, 255, .12); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Responsive ---------- */
@media (max-width: 1500px) { .movie-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .page-top { height: 82px; }
  .menu-panel { width: 100%; }
  .menu-nav a { font-size: clamp(28px, 6vw, 42px); }
  .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --page-pad: 20px; --section-pad: 88px; }
  .brand-logo { width: 62px; max-height: 48px; }
  .page-top .brand-logo, .hero-top .brand-logo { width: 84px; }
  .page-top .menu-trigger .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .site-header .header-end .lang-switch { display: none; }
  .menu-inner { padding: 22px 20px 28px; }
  .menu-nav { padding-block: 38px; }
  .menu-nav a { gap: 10px; font-size: clamp(25px, 7.6vw, 34px); }
  .menu-nav .sub-menu a { font-size: clamp(18px, 5.4vw, 23px); padding-inline-start: 24px; }
  .menu-foot { align-items: flex-start; flex-direction: column; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 390px) { .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Motion & forced colours ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .menu-icon::before, .menu-icon::after, .menu-close::before, .menu-close::after, .icon-close::before, .icon-close::after { background: CanvasText; }
  :focus-visible { outline-color: Highlight; }
}

/* ---------- FAQ (template-parts/faq.php) ---------- */
.faq-section { padding: var(--section-pad) var(--page-pad); background: var(--paper); color: var(--ink); }
.faq-section .faq-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 110px); align-items: start; }
.faq-section .faq-title { font-size: clamp(40px, 4.8vw, 78px); line-height: .95; letter-spacing: -.05em; font-weight: 650; max-width: 11ch; }
.faq-inline { margin-block-start: 3em; }
.faq-inline .faq-title { font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; letter-spacing: -.04em; font-weight: 650; margin-block-end: .6em; }
.faq-list { border-block-start: 1px solid var(--line-dark); }
.faq-item { border-block-end: 1px solid var(--line-dark); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding-block: 22px; cursor: pointer; list-style: none; font-size: clamp(18px, 1.5vw, 24px); line-height: 1.25; letter-spacing: -.02em; font-weight: 650; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: 0 0 auto; width: 18px; height: 18px; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 18px; height: 2px; background: var(--red-dark); transition: transform 240ms var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-a { padding-block-end: 24px; max-width: 70ch; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.6; color: var(--muted-dark); }
.faq-a > * + * { margin-block-start: .8em; }
.faq-a a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .faq-section .faq-inner { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .faq-icon::before, .faq-icon::after { transition: none; } }

/* ---------- Refined type scale (client request: large headings ~30% smaller) ----------
   Kept in one place on purpose; "html body" lets it win over the per-page bundles
   (front / catalog / film / content) and rtl.css without editing each file. */
html body .intro-title { font-size: clamp(44px, 5.6vw, 104px); }
html body .display { font-size: clamp(44px, 6.8vw, 118px); }
html body .row9-copy h2 { font-size: clamp(48px, 6.8vw, 116px); }
html body .catalog-head h2 { font-size: clamp(40px, 5vw, 84px); }
html body .team-head h2 { font-size: clamp(36px, 4.2vw, 68px); }
html body .company-title { font-size: clamp(36px, 4vw, 66px); }
html body .contact h2 { font-size: clamp(32px, 3.6vw, 58px); }
html body .faq-section .faq-title { font-size: clamp(32px, 3.6vw, 58px); }
html body .hero-copy h1 { font-size: clamp(64px, 10vw, 170px); }
html body .catalog-intro h2 { font-size: clamp(34px, 4.2vw, 70px); }
html body .empty-state h2 { font-size: clamp(38px, 5.4vw, 84px); }
html body .movie-title-main { font-size: clamp(60px, 8.5vw, 150px); }
html body .story-main h2 { font-size: clamp(42px, 5.4vw, 92px); }
html body .similar-head h2 { font-size: clamp(46px, 7vw, 120px); }
html body .assets-dialog h2 { font-size: clamp(38px, 5vw, 70px); }
html body .page-hero h1 { font-size: clamp(40px, 5.6vw, 96px); }
html[dir="rtl"] body .intro-title { font-size: clamp(42px, 5.2vw, 92px); }
@media (max-width: 640px) {
  html body .intro-title, html[dir="rtl"] body .intro-title { font-size: clamp(40px, 12vw, 64px); }
  html body .hero-copy h1 { font-size: clamp(56px, 20vw, 110px); }
  html body .movie-title-main { font-size: clamp(42px, 13vw, 72px); }
  html body .story-main h2 { font-size: clamp(36px, 10vw, 56px); }
}
