/* ════════════════════════════════════════════════════════════
   «Египетская ночь» · набросок V — «Афиша оживает»
   base.css — общий слой (арт-директор). Агентам: только читать.

   Два состояния мира:
   • paper — дневная афиша: бумага, чёрная краска, золотая фольга, лазурь.
   • night — ночь над Нилом: лазурное небо, светящийся дворец.
   Текущий тон шапки задаёт body[data-tone="paper|night"].
   ════════════════════════════════════════════════════════════ */

:root {
  /* бумага и краска */
  --paper: #F0E6CF;
  --paper-2: #E4D6B6;
  --ink: #14110C;
  --ink-soft: #5E5547;
  --foil: #A8843F;            /* золото на бумаге — темнее, иначе не читается */
  --foil-hi: #D8B878;
  --laz-print: #0B5A66;       /* лазурь как печатная краска */

  /* ночь */
  --night: #041A21;
  --night-2: #0B3D49;
  --laz-hi: #1FA3B3;
  --gold: #E2BE74;
  --gold-hi: #FFE9B0;
  --ivory: #FBF3DC;
  --muted: #A7C3C6;
  --line-night: rgba(255, 226, 160, .32);
  --line-paper: rgba(20, 17, 12, .82);

  --f-d: 'Noto Serif Display', 'Times New Roman', serif;   /* 62.5% ширины: 900 — плакатный жирный, 300 — тонкий */
  --f-s: 'Manrope', 'Helvetica Neue', Arial, sans-serif;

  --pad: clamp(1.1rem, 4.4vw, 4rem);
  --ease: cubic-bezier(.19, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-s); font-weight: 400; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; font-weight: inherit; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { padding-inline: var(--pad); max-width: 1600px; margin-inline: auto; }

/* мелкая подпись капсом */
.lb { font: 600 .6875rem/1.5 var(--f-s); letter-spacing: .22em; text-transform: uppercase; }

/* ── Кнопки ── */
/* на бумаге: чёрный корешок билета с перфорацией справа */
.stub {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .9rem; height: 54px; padding: 0 2.6rem 0 1.6rem;
  background: var(--ink); color: var(--paper); text-decoration: none; white-space: nowrap;
  font: 600 .6875rem/1 var(--f-s); letter-spacing: .22em; text-transform: uppercase;
  -webkit-mask: radial-gradient(circle 5px at 100% 50%, transparent 98%, #000) 0 0 / 100% 14px;
          mask: radial-gradient(circle 5px at 100% 50%, transparent 98%, #000) 0 0 / 100% 14px;
  transition: background-color .4s var(--ease), color .4s var(--ease), transform .5s var(--ease);
}
.stub::before { content: ""; position: absolute; right: 1.5rem; top: 8px; bottom: 8px; border-left: 1px dashed rgba(240, 230, 207, .5); }
.stub svg { width: 18px; height: 18px; flex: none; transition: transform .6s var(--ease); }
.stub:hover { background: var(--laz-print); transform: translateY(-2px); }
.stub:hover svg { transform: translateX(5px); }

/* в ночи: картуш */
.cart {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .8rem; height: 52px; padding: 0 1.6rem; margin-right: 9px;
  border: 1px solid var(--gold); border-radius: 999px; color: var(--ivory); text-decoration: none; white-space: nowrap;
  font: 600 .6875rem/1 var(--f-s); letter-spacing: .2em; text-transform: uppercase;
  transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
.cart::after { content: ""; position: absolute; right: -9px; top: 20%; bottom: 20%; width: 1px; background: var(--gold); }
.cart svg { width: 18px; height: 18px; flex: none; transition: transform .6s var(--ease); }
.cart:hover { background: var(--gold-hi); border-color: var(--gold-hi); color: var(--night); }
.cart:hover svg { transform: translateX(5px); }
.cart--fill { background: linear-gradient(180deg, #FFF1CC, #E2BE74); border-color: #FFF1CC; color: var(--night); box-shadow: 0 10px 34px -10px rgba(255, 214, 130, .7); }
.cart--fill::after { background: #FFF1CC; }
.cart--fill:hover { transform: translateY(-2px); }

/* ── Шапка: цвет зависит от тона под ней ── */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); padding: .9rem var(--pad); color: var(--ink); transition: color .5s, background-color .5s; }
.hdr__logo img { height: 21px; width: auto; filter: brightness(0); transition: filter .5s; }
.hdr__nav { display: flex; gap: clamp(1rem, 2vw, 2.2rem); margin-left: auto; }
.hdr__nav a { text-decoration: none; font: 600 .6875rem/1 var(--f-s); letter-spacing: .2em; text-transform: uppercase; opacity: .78; transition: opacity .3s; }
.hdr__nav a:hover { opacity: 1; }
.hdr__tel { font-family: var(--f-d); font-stretch: 75%; font-size: 1.15rem; text-decoration: none; white-space: nowrap; }
.hdr__cta { display: inline-flex; align-items: center; height: 40px; padding: 0 1.2rem; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; font: 600 .625rem/1 var(--f-s); letter-spacing: .2em; text-transform: uppercase; transition: background-color .4s, color .4s; }
.hdr__cta:hover { background: currentColor; }
.hdr__cta:hover { color: var(--paper); background: var(--ink); }
body[data-tone="night"] .hdr { color: var(--ivory); }
body[data-tone="night"] .hdr__logo img { filter: none; }
body[data-tone="night"] .hdr__cta:hover { color: var(--night); background: var(--gold-hi); border-color: var(--gold-hi); }

@media (max-width: 1180px) { .hdr__tel { display: none; } }
@media (max-width: 860px) { .hdr__nav { display: none; } .hdr__cta { margin-left: auto; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
