/* ============================================
   ТОЧКА ОПОРЫ — Main Stylesheet
   Variables, Base, Typography, Layout, Navigation
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-bg:        #0E0E0E;
  --color-bg-alt:    #161616;
  --color-bg-card:   #1E1E1E;
  --color-cream:     #F5EDE3;
  --color-white:     #FFFFFF;
  --color-coral:     #FF5E3A;
  --color-coral-dark:#D94E2F;
  --color-amber:     #F5A623;
  --color-indigo:    #4A2FBD;
  --color-indigo-deep:#2D1B69;
  --color-teal:      #2ECEC5;
  --color-lavender:  #C4A1FF;
  --color-muted:     #7A7A7A;
  --color-border:    #2A2A2A;

  /* Typography */
  --font-display:    'Unbounded', sans-serif;
  --font-body:       'Onest', sans-serif;

  /* Sizes */
  --nav-height:      72px;
  --container-max:   1440px;
  --gutter:          clamp(16px, 3vw, 48px);
  --radius-sm:       8px;
  --radius-md:       16px;
  --radius-lg:       24px;
  --radius-xl:       32px;

  /* Transitions */
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:   0.3s;
  --duration-normal: 0.6s;
  --duration-slow:   1s;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-cream);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: default;
}

body.story-modal-open {
  overflow: hidden;
}

::selection {
  background: var(--color-coral);
  color: var(--color-white);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-expo);
}

a:hover {
  color: var(--color-coral);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* --- Typography Scale --- */
.t-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.t-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.t-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.t-h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.t-h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
  line-height: 1.3;
}

.t-body-lg {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.7;
}

.t-body {
  font-size: 1rem;
  line-height: 1.7;
}

.t-small {
  font-size: 0.875rem;
  line-height: 1.5;
}

.t-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- Layout --- */
.wrapper {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(80px, 10vh, 160px) 0;
  position: relative;
}

.section--full {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section--dark {
  background-color: var(--color-bg);
}

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

.weekly-slider {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.weekly-slider__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weekly-slider__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  letter-spacing: -0.01em;
  text-align: center;
}

.weekly-slider__nav {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: rgba(245, 237, 227, 0.04);
  color: var(--color-cream);
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.weekly-slider__nav:hover:not(:disabled) {
  background: rgba(240, 113, 103, 0.16);
  border-color: rgba(240, 113, 103, 0.5);
}

.weekly-slider__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.weekly-slider__viewport {
  overflow: hidden;
}

.weekly-slider__track {
  display: flex;
  width: 100%;
  transition: transform .32s ease;
  will-change: transform;
}

.weekly-slider__slide {
  flex: 0 0 100%;
  width: 100%;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.section__label::before {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--color-coral);
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Custom Cursor Dot --- */
.cursor-dot {
  width: 10px;
  height: 10px;
  background: var(--color-coral);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transition: transform 0.15s var(--ease-out-expo);
}

.cursor-dot.is-hover {
  transform: scale(4);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--duration-fast) ease,
              backdrop-filter var(--duration-fast) ease;
}

.nav.is-scrolled {
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav__logo-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: inherit;
  text-decoration: none;
}

.nav__logo-brand:hover {
  color: var(--color-cream);
}

.nav__logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  min-height: 14px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  line-height: 0;
}

.nav__logo-mark:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 3px;
  border-radius: 6px;
}

.nav__logo-mark[data-pulse-live] {
  cursor: pointer;
}

.nav__logo-dot--default[hidden] {
  display: none !important;
}

.nav__logo-stories {
  display: block;
}

.nav__logo-stories[hidden] {
  display: none !important;
}

.nav__logo-stories-stack {
  position: relative;
  width: 52px;
  height: 52px;
  display: block;
  animation: nav-logo-story-tempt 2.5s ease-in-out infinite;
}

.nav__logo-stories-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: nav-story-ring-spin 16s linear infinite;
}

.nav__logo-stories-track {
  animation: nav-story-stroke-glow 2.4s ease-in-out infinite;
}

.nav__logo-stories-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
  border: 2px solid rgba(14, 14, 14, 0.94);
  box-shadow: 0 0 0 1px rgba(245, 237, 227, 0.1);
}

@keyframes nav-logo-story-tempt {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 3px rgba(240, 113, 103, 0.45));
  }
  50% {
    transform: scale(1.07);
    filter: drop-shadow(0 0 12px rgba(244, 162, 97, 0.75));
  }
}

@keyframes nav-story-ring-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes nav-story-stroke-glow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.78;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav__logo-stories-stack,
  .nav__logo-stories-svg,
  .nav__logo-stories-track {
    animation: none !important;
  }

  .nav__logo-stories-stack {
    filter: drop-shadow(0 0 4px rgba(240, 113, 103, 0.4));
  }
}

.nav__logo-dot {
  width: 12px;
  height: 12px;
  background: var(--color-coral);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

.nav__logo-dot--default {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.7; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-coral);
  transition: width var(--duration-fast) var(--ease-out-expo);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

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

.nav__cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--color-coral);
  color: var(--color-white);
  padding: 10px 24px;
  border-radius: 100px;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.nav__cta:hover {
  background: var(--color-white);
  color: var(--color-bg);
  transform: scale(1.05);
}

.nav__socials {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.nav__social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--color-cream);
  font-size: 0.9rem;
  color: var(--color-cream);
  transition: all var(--duration-fast) var(--ease-out-expo);
}
.nav__social-icon:hover {
  background: var(--color-cream);
  color: var(--color-bg);
  transform: translateY(-2px);
}

.nav__social-icon:hover {
  background: var(--color-coral);
  border-color: var(--color-coral);
  color: var(--color-white);
  transform: scale(1.1);
}

.icon-max {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><defs><linearGradient id="mg" x1="2" y1="2" x2="42" y2="42" gradientUnits="userSpaceOnUse"><stop offset="0%25" stop-color="%2306affb"/><stop offset="40%25" stop-color="%23001cf1"/><stop offset="75%25" stop-color="%238900ac"/><stop offset="100%25" stop-color="%2306affb"/></linearGradient></defs><path d="M22.39 41.89c-3.93 0-5.75-.58-8.9-2.9-2.02 2.61-8.34 4.63-8.62 1.17 0-2.6-.58-4.8-1.22-7.2C2.87 30 2 26.72 2 21.94 2 10.56 11.28 2 22.28 2c11 0 19.63 8.98 19.63 20.06 0 11.07-8.9 19.83-19.52 19.83Zm.2-30.02c-5.22-.27-9.3 3.37-10.2 9.08-.74 4.72.58 10.48 1.7 10.77.54.13 1.9-.98 2.74-1.82 1.39.9 2.97 1.6 4.73 1.7a9.96 9.96 0 0 0 10.4-9.34 10 10 0 0 0-9.37-10.39Z" fill="url(%23mg)" fill-rule="evenodd" clip-rule="evenodd"/></svg>') no-repeat center / contain;
  vertical-align: -0.125em;
}

.footer__social-link .icon-max,
.nav__social-icon .icon-max {
  filter: grayscale(1) brightness(2);
  transition: filter var(--duration-fast) var(--ease-out-expo);
}

.footer__social-link:hover .icon-max,
.nav__social-icon:hover .icon-max {
  filter: none;
}

/* --- Mobile Menu --- */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
  width: 32px;
  padding: 4px 0;
}

.nav__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-cream);
  transition: all var(--duration-fast) var(--ease-out-expo);
  transform-origin: center;
}

.nav__burger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__burger.is-active span:nth-child(2) {
  opacity: 0;
}

.nav__burger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav__mobile {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  padding: calc(var(--nav-height) + 24px + env(safe-area-inset-top, 0px)) var(--gutter)
    calc(32px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--duration-normal) var(--ease-out-expo), opacity var(--duration-fast) var(--ease-out-expo), visibility 0s linear var(--duration-fast);
}

.nav__mobile.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform var(--duration-normal) var(--ease-out-expo), opacity var(--duration-fast) var(--ease-out-expo);
}

.nav__mobile .nav__link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
}

/* --- Scroll Progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-coral), var(--color-amber));
  z-index: 1001;
  width: 0%;
  transition: none;
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .nav__links {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .nav__cta--desktop {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --nav-height: 60px;
  }

  .t-label {
    font-size: 1.5rem;
  }

  .t-display {
    font-size: 2.2rem;
  }
}

@supports (justify-content: safe center) {
  .nav__mobile {
    justify-content: safe center;
  }
}
