/* Shared layout for all three variants. Colours and type come from the variant file
   (a.css / b.css / c.css) through the custom properties below. Mobile first. */
:root {
  --bg: #0b141a;
  --bg-2: #0b141a;
  --fg: #f4eee4;
  --muted: rgba(244, 238, 228, .72);
  --line: rgba(244, 238, 228, .28);
  --pill: #efe5d6;
  --pill-fg: #16120d;
  --buy: #ffb64a;
  --buy-hover: #ffc56e;
  --buy-fg: #17110a;
  --focus: #ffffff;
  --font-head: Georgia, serif;
  --font-body: Georgia, serif;
  --head-weight: 400;
  --head-track: -0.01em;
  --radius-card: 10px;
  --radius-btn: 999px;
  --wrap: 1120px;
  --gutter: 16px;
  --sec-pad: 56px;
  --fab-space: calc(84px + env(safe-area-inset-bottom));
  color-scheme: dark;
}
@media (min-width: 701px) { :root { --gutter: 32px; --sec-pad: 88px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.5 var(--font-body);
  overflow-x: hidden;
  padding-bottom: var(--fab-space);
}
img { display: block; max-width: 100%; height: auto; }
.hour, .session__range, .price__val, .footer__tel { font-variant-numeric: lining-nums tabular-nums; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -100px; z-index: 50; background: var(--pill); color: var(--pill-fg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.ico { width: 1.6em; height: 1.2em; flex: none; }
.ico--pin { width: 1.1em; height: 1.45em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 1.6em; border-radius: var(--radius-btn);
  text-decoration: none; font-family: var(--font-btn, var(--font-body)); font-weight: 600; font-size: 1.05rem;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .25s ease, transform .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn--light { background: var(--pill); color: var(--pill-fg); min-width: 9.5em; }
.btn--light:hover { background: var(--pill-hover, #fff); }
.btn--buy { background: var(--buy); color: var(--buy-fg); }
.btn--buy:hover { background: var(--buy-hover); }
.btn--buy:focus-visible { outline-color: var(--focus); box-shadow: 0 0 0 6px rgba(0,0,0,.55); }
.btn--wide { display: flex; width: 100%; min-height: 56px; font-size: 1.25rem; }
@media (min-width: 701px) { .btn--wide { min-height: 80px; font-size: clamp(1.5rem, 2.6vw, 2.25rem); } }
.btn--outline { border: 1.5px solid var(--outline, var(--fg)); color: var(--fg); background: transparent; font-weight: 500; }
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate; display: flex; }
@media (min-width: 701px) { .hero { min-height: min(100svh, 62.5vw); min-height: max(600px, min(100svh, 66.6vw)); } }
.hero__bg { position: absolute; inset: -56px 0; z-index: -3; will-change: transform; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos-m, 50% 50%); }
@media (min-width: 701px) { .hero__img { object-position: var(--hero-pos-d, 50% 50%); } }
.hero__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 28%; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg-2) 96%); }
.hero__content { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: var(--hero-top-m, 40svh); padding-bottom: 32px; }
.hero__title { font-size: clamp(2.6rem, 11.5vw, 3.4rem); line-height: 1.02; text-shadow: 0 2px 24px rgba(0,0,0,.45); }
.hero__title span { display: block; }
/* «Պլանետարիում» is wider than «Планетарий»: keep it inside a 320 px phone */
@media (max-width: 700px) { :lang(hy) .hero__title { font-size: clamp(2.2rem, 10vw, 3.2rem); } }
.hero__place { margin: .6em 0 1.4em; font-size: 1.2rem; color: var(--muted); text-shadow: 0 1px 12px rgba(0,0,0,.5); }
/* language switcher: top right of the hero, aligned with the content column */
.langs { position: absolute; z-index: 4; top: calc(12px + env(safe-area-inset-top)); right: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.langs a { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 38px; padding: 0 10px; border-radius: 999px;
  text-decoration: none; font-family: var(--font-btn, var(--font-body)); font-size: .92rem; font-weight: 600; color: var(--fg); }
.langs a[aria-current="page"] { background: var(--pill); color: var(--pill-fg); }
.langs a:not([aria-current]):hover { background: rgba(255, 255, 255, .14); }
@media (min-width: 701px) {
  .langs { top: 24px; }
  .langs a { min-height: 42px; min-width: 54px; padding: 0 14px; font-size: 1rem; }
  .hero__content { align-items: flex-start; text-align: left; padding-top: var(--hero-top-d, 18vh); }
  .hero__title { font-size: clamp(3.6rem, 7vw, 7rem); }
  .hero__place { font-size: clamp(1.3rem, 2.1vw, 2rem); }
  .hero .btn--light { min-height: 58px; font-size: 1.35rem; min-width: 11em; }
}

/* ---------- sections ---------- */
.section { position: relative; padding: var(--sec-pad) 0 0; }
.section:last-of-type { padding-bottom: var(--sec-pad); }
.sec-head { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
/* headings may wrap: long Armenian ones are wider than a phone and would widen the page */
.sec-head h2 { font-size: clamp(2.25rem, 9vw, 2.6rem); line-height: 1.05; flex: 0 1 auto; min-width: 0; overflow-wrap: break-word; }
.sec-head h2:focus { outline: none; }
.sec-head h2 { scroll-margin-top: 28px; }
.sec-head h2:focus-visible { outline: 3px solid var(--focus); }
.rule { flex: 1; height: 1px; background: var(--line); min-width: 12px; }
@media (max-width: 700px) { .rule { display: none; } .car-nav { margin-left: auto; } }
@media (min-width: 701px) { .sec-head { gap: 40px; margin-bottom: 30px; } .sec-head h2 { font-size: clamp(3rem, 5.2vw, 4.6rem); } }

.reveal.is-hidden { opacity: 0; transform: translateY(14px); }
.reveal.is-shown { opacity: 1; transform: none; transition: opacity .3s ease-out, transform .3s ease-out; }
@media (max-width: 700px) {
  .reveal.is-hidden { transform: translateY(8px); }
  .reveal.is-shown { transition-duration: .2s; }
}

/* ---------- carousel ---------- */
.car-nav { display: flex; gap: 14px; flex: none; }
.car-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--arrow, var(--fg)); background: transparent; color: var(--arrow, var(--fg)); display: grid; place-items: center; cursor: pointer; padding: 0; transition: opacity .2s, background-color .2s; }
.car-btn svg { width: 22px; height: 22px; }
.car-btn:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.car-btn:disabled { opacity: .3; cursor: default; }
.carousel { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); touch-action: pan-x pan-y;
  contain: paint; /* without it mobile Chrome widens the layout viewport to the track width */ }
.carousel::-webkit-scrollbar { display: none; }
.carousel:focus-visible { outline-offset: -3px; }
.car-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.poster { flex: 0 0 72%; scroll-snap-align: start; }
.poster__img { width: 100%; aspect-ratio: 1000 / 1416; object-fit: cover; border-radius: var(--radius-poster, 4px); box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.poster__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 701px) {
  .car-track { gap: 14px; }
  .poster { flex-basis: calc((100% - 3 * 14px) / 4); }
}

/* ---------- schedule ---------- */
.hours { display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px; border-bottom: 1px solid var(--line); contain: paint; }
.hours::-webkit-scrollbar { display: none; }
.hour { flex: none; scroll-snap-align: center; min-width: 76px; min-height: 44px; padding: 0 16px; background: transparent; border: 0; border-radius: var(--radius-btn); color: var(--fg); cursor: pointer; font-family: var(--font-time, var(--font-head)); font-size: 1.15rem; position: relative; transition: background-color .2s, color .2s; }
.hour + .hour::before { content: ""; position: absolute; left: -1px; top: 25%; bottom: 25%; width: 1px; background: var(--line); }
.hour[aria-pressed="true"] { background: var(--pill); color: var(--pill-fg); }
.hour[aria-pressed="true"]::before, .hour[aria-pressed="true"] + .hour::before { opacity: 0; }
.hour:focus-visible { outline-offset: -3px; }
.hour:hover:not([aria-pressed="true"]) { background: rgba(255,255,255,.07); }
@media (min-width: 701px) {
  .hours { justify-content: flex-start; gap: 0; }
  .hour { flex: 1 0 auto; min-width: 92px; min-height: 52px; font-size: clamp(1.2rem, 1.7vw, 1.55rem); padding: 0 12px; }
}
.hours__hint { margin: 12px 0 0; font-size: .95rem; color: var(--accent-text, var(--muted)); }
.session { padding-top: 18px; }
.session__badge { display: inline-block; margin: 0 0 8px; padding: 3px 11px; border-radius: 999px; background: var(--pill); color: var(--pill-fg);
  font-family: var(--font-btn, var(--font-body)); font-size: .82rem; font-weight: 600; line-height: 1.45; }
.session__badge[hidden] { display: none; }
.session__range { font-family: var(--font-time, var(--font-head)); font-size: 1.9rem; line-height: 1.1; }
.session__lang { color: var(--accent-text, var(--muted)); font-size: .95rem; min-height: 1.4em; }
.session__note { font-style: italic; color: var(--muted); margin: 2px 0 12px; }
:lang(hy) .session__note { font-style: normal; } /* Armenian fonts have no italic; a synthetic slant looks broken */
.session__films { display: grid; gap: 12px; }
.film { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 16px; }
.film__thumb { aspect-ratio: 16 / 10; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--card-line, rgba(255,255,255,.22)); background: var(--thumb-empty, #1d2a33); }
.film__img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease; }
.film__img--none { display: block; background: var(--thumb-none, radial-gradient(circle at 60% 40%, #ffd27a 0 18%, #e98a2c 30%, #3a1d10 62%, #120a07 100%)); }
.film__title { font-size: 1.3rem; line-height: 1.15; font-weight: var(--film-weight, 400); }
.film__note { margin-top: 4px; font-size: .9rem; color: var(--muted); }
.session.is-swapping .film__img { opacity: 0; }
@media (min-width: 701px) {
  .session { display: grid; grid-template-columns: auto 1fr; column-gap: 32px; padding-top: 24px; }
  .session__time { border-right: 1px solid var(--line); padding: 52px 32px 0 0; align-self: stretch; }
  .session__range { font-size: clamp(2rem, 3vw, 2.8rem); white-space: nowrap; }
  .session__note { font-size: 1.25rem; margin-bottom: 16px; }
  .session__films { grid-template-columns: 1fr 1fr; gap: 28px; }
  .film { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
  .film__title { font-size: clamp(1.4rem, 2.1vw, 1.9rem); }
}

/* ---------- tickets ---------- */
.prices { list-style: none; margin: 0 0 16px; padding: 0; }
.price { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 1.15rem; }
.price:last-child { border-bottom: 0; }
.price__val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.prices__group { margin: -4px 0 18px; color: var(--muted); }
@media (min-width: 701px) {
  .prices__group { margin: -18px 0 30px; text-align: center; font-size: 1.15rem; }
  .prices { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 36px; }
  .price { flex-direction: column; align-items: center; gap: 6px; border-bottom: 0; padding: 8px 0 14px; font-size: clamp(1.3rem, 1.9vw, 1.75rem); }
  .price + .price { border-left: 1px solid var(--line); }
  .price__val { font-size: clamp(2.6rem, 4.6vw, 4rem); font-family: var(--font-head); line-height: 1.05; }
}

/* ---------- visit ---------- */
.visit { display: grid; gap: 16px; }
.addr { display: flex; gap: 14px; align-items: flex-start; font-size: 1.15rem; line-height: 1.35; margin-bottom: 18px; }
.addr .ico { color: var(--pin, var(--fg)); margin-top: .1em; }
.visit__info .btn { width: 100%; }
.visit__art { margin: 0; border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--card-line, var(--line)); }
.visit__art img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; object-position: 50% 60%; }
.map { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--card-line, var(--line)); background: var(--map-bg, #1a2630); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; filter: grayscale(1) invert(.9) contrast(.85) brightness(.95); }
.map.is-active iframe { pointer-events: auto; }
/* theme tint over the grey map; our own pin marks the centre (the embed is centred on the point) */
.map.is-loaded::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--map-tint, transparent); mix-blend-mode: color; }
/* the pin's tip (y 30.5 of 32 in its viewBox) sits exactly on the centre of the box */
.map__pin { position: absolute; left: 50%; top: 50%; z-index: 2; width: 30px; height: 40px; transform: translate(-50%, calc(-100% + 2px)); color: var(--pin, var(--fg)); pointer-events: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.6)); }
.map__label { position: absolute; z-index: 2; left: calc(50% + 17px); top: calc(50% - 38px); padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .72); color: #fff;
  font-size: .85rem; font-weight: 600; line-height: 1.35; white-space: nowrap; pointer-events: none; }
/* once the visitor has moved the map, OSM's own marker shows the point; ours would drift off it */
.map.was-active .map__pin, .map.was-active .map__label { display: none; }
.map__fallback, .map__toggle { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.map__fallback { inset: 0; justify-content: center; color: var(--pin, var(--fg)); font-size: 1.05rem; }
.map.is-loaded .map__fallback { display: none; }
.map__toggle { left: 10px; top: 10px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: .9rem; cursor: pointer; }
@media (max-width: 959px) {
  .visit { display: flex; flex-direction: column; }
  .visit__info { display: contents; }
  .visit__info .btn { order: 5; }
  .map { order: 4; aspect-ratio: 4 / 3; }
  .visit__art { order: 3; }
  .addr { order: 1; margin-bottom: 0; }
}
@media (min-width: 701px) and (max-width: 959px) { .addr { font-size: 1.3rem; } .map { aspect-ratio: 2 / 1; } }
@media (min-width: 960px) {
  .visit { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; }
  .addr { font-size: 1.45rem; }
  .visit__info .btn { width: auto; min-width: 340px; min-height: 58px; font-size: 1.3rem; }
  .map { aspect-ratio: 2.3 / 1; }
  /* with an illustration (variant B): address, route and map on the left, picture on the right */
  .visit:has(.visit__art) { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); grid-template-rows: auto 1fr; }
  .visit:has(.visit__art) .visit__info { grid-column: 1; grid-row: 1; }
  .visit:has(.visit__art) .map { grid-column: 1; grid-row: 2; aspect-ratio: 16 / 10; }
  .visit:has(.visit__art) .visit__info .btn { width: 100%; min-width: 0; }
  .visit__art { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
  .visit__art img { height: 100%; aspect-ratio: auto; }
}

/* ---------- about and questions ---------- */
.about { display: grid; gap: .9em; max-width: 46em; font-size: 1.1rem; line-height: 1.6; }
.faq { max-width: 60em; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; align-items: center; gap: 18px; min-height: 56px; padding: 12px 2px; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; flex: none; width: 11px; height: 11px; margin: 0 6px 4px auto; border-right: 2px solid var(--arrow, var(--fg)); border-bottom: 2px solid var(--arrow, var(--fg));
  transform: rotate(45deg); transition: transform .2s ease; }
.faq__item[open] summary::after { transform: rotate(225deg); margin-bottom: -4px; }
.faq__q { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; line-height: 1.3; letter-spacing: 0; }
.faq__a { padding: 0 2px 18px; color: var(--muted); max-width: 46em; }
@media (min-width: 701px) {
  .about { font-size: 1.25rem; }
  .faq__q { font-size: 1.4rem; }
  .faq__a { font-size: 1.1rem; }
}

/* ---------- footer ---------- */
.footer { border-top: 0; padding: 0 0 24px; }
.footer__row { border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 10px; }
.footer__name { font-family: var(--font-head); font-size: 1.5rem; }
.footer__tel, .footer__nav a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.footer__tel:hover, .footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__nav { display: grid; justify-items: start; gap: 2px; color: var(--muted); }
.footer__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; margin-top: 16px; color: var(--muted); font-size: .95rem; }
.footer__addr { flex: 1 0 100%; font-style: normal; overflow-wrap: anywhere; }
.nw { white-space: nowrap; } /* a number with its case ending, e.g. 13:00-ին */
.footer__social, .footer__langs { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.footer__social a, .footer__langs a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; overflow-wrap: anywhere; }
.footer__social a:hover, .footer__langs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__langs a[aria-current="page"] { color: var(--fg); font-weight: 600; }
@media (min-width: 960px) {
  .footer { padding-bottom: 40px; }
  .footer__row { grid-template-columns: auto auto 1fr; align-items: center; gap: 0; }
  .footer__name { font-size: 1.9rem; padding-right: 32px; }
  .footer__tel { padding: 0 32px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 1.3rem; }
  .footer__nav { display: flex; justify-content: flex-end; gap: 40px; font-size: 1.25rem; color: var(--fg); }
}

/* ---------- floating buy ---------- */
.fab {
  position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom));
  min-height: 52px; padding: 0 22px; box-shadow: 0 10px 28px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(16px); pointer-events: none; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s, background-color .2s;
}
.fab.is-visible { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .25s ease, transform .25s ease, visibility 0s, background-color .2s; }
@media (min-width: 701px) { .fab { right: 32px; bottom: calc(28px + env(safe-area-inset-bottom)); min-height: 60px; font-size: 1.3rem; padding: 0 30px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
  .hero__bg, .hero__shrubs { transform: none !important; }
  .comets { display: none; }
}
