:root {
  --paper: #0c1118; --ink: #e6edf5; --muted: #a7b8ca;
  --accent: #c3dbed; --accent-dark: #f1f7fb;
  --heading: #000000; --button: #dbe7f0;
  --font: Arial, Helvetica, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; position: relative; isolation: isolate;
  color: var(--ink); background: var(--paper);
  font-family: var(--font); -webkit-font-smoothing: antialiased;
}
.background {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(58, 82, 110, .34) 0%, rgba(30, 46, 66, .18) 34%, transparent 66%),
    radial-gradient(ellipse at 12% 5%, rgba(46, 65, 86, .17), transparent 48%),
    linear-gradient(135deg, #121922 0%, #0e141c 48%, #080c12 100%);
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: #dbe7f0; color: #101923; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.page {
  width: min(1440px, 100%); min-height: 100vh; min-height: 100svh;
  margin-inline: auto; padding: 40px clamp(20px, 4vw, 64px); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.stage {
  width: 100%; display: flex; flex-direction: column;
  align-items: center; gap: 32px; min-width: 0;
}
.hero {
  width: 100%; position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center;
}
/* Холодный свет за LOVE сохраняет чёрный цвет букв на тёмной странице.
   Подсветка привязана к заголовку, поэтому следует за ним на любом экране. */
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 50%; top: -662px; width: 1320px; height: 1080px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 660px 540px at center,
    #bed0df 0%, rgba(132, 156, 179, .94) 40%,
    rgba(69, 96, 123, .4) 72%, transparent 100%);
}
.lead { position: relative; z-index: 1; text-align: center; }
h1 {
  margin: 0; padding: 0; color: var(--heading);
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-weight: 700; font-style: normal;
  font-size: clamp(144px, min(26vw, 23svh), 224px);
  height: .88em; line-height: .88;
  display: flex; align-items: center; justify-content: center;
}
.title-lettering { display: block; width: auto; height: .74em; overflow: visible; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ambient {
  position: absolute; left: 50%; bottom: -15px;
  width: min(710px, 100%); height: 75%; transform: translateX(-50%);
  z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse, rgba(94, 134, 177, .14), rgba(50, 81, 115, .05) 42%, transparent 70%);
}
.scene {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  height: clamp(300px, 50svh, 540px); width: min(470px, 90%);
  margin-top: -20px; pointer-events: none;
}
.bear {
  display: block; width: auto; height: 100%; max-width: 100%; object-fit: contain;
  position: relative; z-index: 2; transform-origin: center bottom;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .42));
  animation: levitate 7s ease-in-out infinite;
}
.ground-shadow {
  position: absolute; left: 14%; width: 72%; bottom: -6px; height: 22px; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .8), transparent 69%);
  filter: blur(5px); animation: shadow-breath 7s ease-in-out infinite;
}
.contacts {
  width: min(960px, 100%); display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.contact-card {
  min-height: 76px; min-width: 0; padding: 18px 20px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 18px; border: 1px solid rgba(187, 210, 235, .17);
  background: rgba(155, 184, 218, .065);
  box-shadow: 0 1px 0 rgba(230, 240, 255, .035) inset, 0 6px 20px rgba(0, 0, 0, .1);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.social-icon { width: 23px; height: 23px; flex-shrink: 0; }
.card-copy { min-width: 0; }
.card-name { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.025em; }
.card-arrow {
  width: 15px; height: 15px; flex-shrink: 0; margin-left: auto;
  color: #9aafc4; transition: transform .22s ease;
}
.contact-card.primary {
  color: #142331; background: var(--button); border-color: var(--button);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18), 0 1px 0 rgba(255, 255, 255, .7) inset;
}
.primary .card-arrow { color: #405e75; }
@media (hover: hover) {
  .contact-card:hover {
    transform: translateY(-4px); border-color: rgba(191, 218, 244, .4); background: rgba(153, 188, 223, .13);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
  }
  .contact-card.primary:hover {
    background: var(--accent-dark); border-color: var(--accent-dark);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .24);
  }
  .contact-card:hover .card-arrow { transform: translate(2px, -2px); }
}
.toast {
  position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%;
  transform: translate(-50%, 18px); z-index: 50;
  width: max-content; max-width: min(470px, calc(100% - 32px));
  padding: 15px 21px; border-radius: 15px; background: #dbe7f0; color: #142331;
  box-shadow: 0 12px 42px rgba(0, 0, 0, .35);
  font-size: 13px; line-height: 1.5;
  opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  text-align: center; pointer-events: none;
}
.toast.visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.noscript-note { margin: 0; padding: 12px; font-size: 12px; text-align: center; }
@keyframes levitate { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes shadow-breath { 0%, 100% { transform: scaleX(1); opacity: .8; } 50% { transform: scaleX(.9); opacity: .55; } }
@media (max-width: 1100px) and (min-width: 901px) {
  .contact-card { padding-inline: 16px; gap: 10px; }
  .card-name { font-size: 15px; }
}
@media (max-width: 900px) {
  .page { padding-block: 28px; }
  .stage { gap: 28px; }
  h1 { font-size: clamp(110px, min(42vw, 20svh), 184px); }
  .scene { height: clamp(236px, 44svh, 440px); margin-top: -16px; width: min(410px, 90%); }
  .contacts { width: min(500px, 100%); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-card { min-height: 70px; }
}
@media (max-width: 600px) {
  .page { padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
  .stage { gap: 26px; }
  h1 { font-size: clamp(104px, min(42vw, 20svh), 172px); }
  .scene { height: clamp(236px, 46svh, 400px); width: 90%; }
  .ground-shadow { left: 12%; width: 76%; height: 18px; }
  .contacts { gap: 10px; }
  .contact-card { min-height: 66px; padding: 16px 13px; gap: 10px; border-radius: 15px; }
  .social-icon { width: 21px; height: 21px; }
  .card-name { font-size: 14px; }
  .card-arrow { width: 12px; height: 12px; }
}
@media (max-width: 375px) {
  .page { padding-inline: 16px; }
  .contact-card { padding-inline: 11px; gap: 8px; }
  .social-icon { width: 19px; height: 19px; }
  .card-name { font-size: 13px; }
  .card-arrow { width: 11px; height: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Динамический контент: исходная верхняя композиция и размеры сохранены. */
[hidden] { display: none !important; }
.contact-card { overflow-wrap: anywhere; }
.card-copy { flex: 1; }
.page-text, .content-status {
  width: min(760px, 100%); margin: 0;
  color: var(--muted); font-size: 16px; line-height: 1.7;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.content-status { text-align: center; font-size: 14px; }
