/*
  Коммерческое предложение: Новый сайт medium-clinic.ru
  Danifo brand deck. Hero pair = orange + navy.
  Screen-first horizontal scroll-snap deck, print-friendly (A4 landscape).
*/

@import "./assets/tokens/tokens.css";
@import "./assets/components/_index.css";

/* ---------- Reset + base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-elevated);
  color: var(--text-primary);
  font-family: var(--danifo-font-body);
  font-size: var(--ts-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

/* ---------- Deck frame ---------- */

html, body { height: 100%; overflow: hidden; }

.deck {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  width: 100vw;
  height: 100vh;
  scrollbar-width: none;
}

.deck::-webkit-scrollbar { display: none; }

.slide {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--surface-default);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.slide--navy   { background: var(--surface-navy);        color: var(--text-on-dark); }
.slide--orange { background: var(--surface-orange);      color: var(--text-on-orange); }
.slide--soft   { background: var(--surface-purple-soft); }

.slide--cover {
  background:
    radial-gradient(140% 80% at 100% 0%,  rgba(244, 121, 41, 0.22) 0%, transparent 55%),
    radial-gradient(120% 80% at   0% 100%, rgba(96,  72, 157, 0.30) 0%, transparent 55%),
    var(--surface-navy);
  color: var(--text-on-dark);
}

/* ---------- Slide chrome ---------- */

.slide__header,
.slide__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-7);
}

.slide__header { gap: var(--space-5); }

.slide__logo          { height: 36px; width: auto; }
.slide__logo--cover   { height: 48px; }

.slide__counter {
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.slide--navy .slide__counter,
.slide--orange .slide__counter,
.slide--cover .slide__counter { color: var(--text-on-dark-muted); }

.slide__body {
  padding: 0 var(--space-7) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-height: 0;
  overflow: hidden;
}

.slide__footer {
  border-top: 1px solid var(--border-subtle);
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-foot);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.slide--navy .slide__footer,
.slide--orange .slide__footer,
.slide--cover .slide__footer {
  border-top-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Typography roles ---------- */

.t-display {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: var(--ts-display);
  line-height: var(--lh-display);
  letter-spacing: -0.01em;
  margin: 0;
}

.t-h1 {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: var(--ts-h1);
  line-height: var(--lh-h1);
  letter-spacing: -0.005em;
  margin: 0;
}

.t-h2 {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: var(--ts-h2);
  line-height: var(--lh-h2);
  margin: 0;
}

.t-h3 {
  font-family: var(--danifo-font-display);
  font-weight: 400;
  font-size: var(--ts-h3);
  line-height: var(--lh-h3);
  margin: 0;
}

.t-lead {
  font-family: var(--danifo-font-body);
  font-weight: 400;
  font-size: var(--ts-lead);
  line-height: var(--lh-lead);
  margin: 0;
}

.t-body {
  font-family: var(--danifo-font-body);
  font-weight: 400;
  font-size: var(--ts-body);
  line-height: var(--lh-body);
  margin: 0;
}

.t-eyebrow {
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-eyebrow);
  line-height: 1;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--action-default);
  margin: 0;
}

.slide--orange .t-eyebrow { color: var(--surface-navy); }

/* ---------- Cover ---------- */

.cover-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-7);
  align-items: center;
  height: 100%;
  padding: var(--space-7);
}

.cover-grid__caption {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.cover-grid__title {
  font-size: clamp(44px, 5.2vw, 84px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.cover-grid__subtitle {
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.85);
}

.cover-grid__meta {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.cover-grid__meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cover-grid__meta-label {
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--action-default);
}

.cover-grid__meta-value {
  font-family: var(--danifo-font-body);
  font-weight: 400;
  font-size: var(--ts-body);
  color: rgba(255, 255, 255, 0.92);
}

.cover-grid__art {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
}

.cover-grid__bignum {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: clamp(100px, 16vw, 240px);
  line-height: 0.9;
  color: var(--action-default);
  text-align: right;
  letter-spacing: -0.04em;
  margin: 0;
}

.cover-grid__bignum-label {
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
  margin: var(--space-3) 0 0;
}

/* ---------- Slide 02 — Problem cards ---------- */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.problem-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.problem-card__icon {
  width: 36px;
  height: 36px;
  stroke: var(--action-default);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.problem-card__title {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: var(--ts-h3);
  line-height: var(--lh-h3);
  color: var(--text-on-dark);
  margin: 0;
}

.problem-card__body {
  font-size: var(--ts-small);
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  margin: 0;
}

/* ---------- Slide 03 — Risk stats ---------- */

.risk-intro {
  max-width: 58ch;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-3);
}

.risk-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  background: rgba(41, 37, 106, 0.12);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(41, 37, 106, 0.20);
}

.risk-item__value {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: var(--ts-h2);
  line-height: 1;
  color: var(--surface-navy);
  margin: 0;
}

.risk-item__caption {
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--surface-navy);
  margin: 0;
  opacity: 0.75;
}

.risk-item__article {
  font-size: var(--ts-small);
  color: var(--surface-navy);
  opacity: 0.6;
  margin: 0;
}

.risk-total {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-6);
  background: var(--surface-navy);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.risk-total__label {
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.risk-total__value {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: var(--ts-h1);
  line-height: 1;
  color: var(--action-default);
  margin: 0;
}

/* ---------- Slides 04–05 — Law two-column ---------- */

.law-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-2);
}

.law-col__label {
  font-family: var(--danifo-font-body);
  font-weight: 700;
  font-size: var(--ts-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
}

.law-col--requires .law-col__label { color: var(--action-default); }
.law-col--missing  .law-col__label { color: #c0392b; }

.law-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.law-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--ts-body);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}

.law-list--missing li { color: #a93226; }

.law-list__bullet {
  flex-shrink: 0;
  margin-top: 4px;
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.law-list--requires .law-list__bullet { stroke: var(--action-default); }
.law-list--missing  .law-list__bullet { stroke: #c0392b; }

.law-source {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(244, 121, 41, 0.10);
  border-left: 3px solid var(--action-default);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--ts-small);
  color: var(--text-secondary);
}

/* ---------- Slide 05 — Missing content compact grid ---------- */

.items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.item-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--ts-small);
  line-height: 1.4;
}

.item-chip--missing {
  background: #fdecea;
  color: #922b21;
  border: 1px solid #f5c6c2;
}

.item-chip--ok {
  background: #eafaf1;
  color: #1e8449;
  border: 1px solid #a9dfbf;
}

.item-chip__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.item-chip--missing .item-chip__dot { background: #c0392b; }
.item-chip--ok      .item-chip__dot { background: #1e8449; }

/* ---------- Slide 06 — Feature list ---------- */

.feature-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.feature-list__icon {
  flex-shrink: 0;
  margin-top: 3px;
  width: 22px;
  height: 22px;
  background: var(--action-default);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-list__icon svg {
  width: 12px;
  height: 12px;
  stroke: white;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-list__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-list__title {
  font-family: var(--danifo-font-display);
  font-weight: 400;
  font-size: var(--ts-h3);
  line-height: var(--lh-h3);
  color: var(--text-on-dark);
  margin: 0;
}

.feature-list__sub {
  font-size: var(--ts-small);
  color: var(--text-on-dark-muted);
  margin: 0;
}

/* ---------- Slide 07 — 6-step process track ---------- */

.process-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-4);
  position: relative;
  padding-top: var(--space-6);
  align-items: start;
}

.process-track::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: calc(var(--space-6) + 24px);
  height: 2px;
  background: var(--action-default);
  opacity: 0.35;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding-top: 66px;
  position: relative;
}

.process-step__num {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--action-default);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(244, 121, 41, 0.30);
  z-index: 1;
}

.process-step__title {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: var(--ts-body);
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0;
}

.process-step__body {
  font-size: var(--ts-small);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Slide 08 — Why-us cards ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.why-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-default);
}

.why-card__icon {
  width: 32px;
  height: 32px;
  stroke: var(--action-default);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.why-card__title {
  font-family: var(--danifo-font-display);
  font-weight: 400;
  font-size: var(--ts-h3);
  line-height: var(--lh-h3);
  color: var(--text-primary);
  margin: 0;
}

.why-card__body {
  font-size: var(--ts-small);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Slide 09 — CTA ---------- */

.cta-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
  height: 100%;
  padding: var(--space-7);
  grid-row: 1 / -1; /* span full slide grid so justify-content: center works */
}

.cta-layout__heading {
  font-size: clamp(44px, 5.4vw, 80px);
  line-height: 1;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.cta-layout__sub {
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.85);
}

.cta-layout__actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.cta-layout__contact {
  font-size: var(--ts-body);
  color: rgba(255, 255, 255, 0.75);
}

.cta-layout__contact a {
  color: var(--action-default);
  text-decoration: none;
}

.cta-layout__contact a:hover { text-decoration: underline; }

.cta-layout__art {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  opacity: 0.06;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.cta-layout__art-text {
  font-family: var(--danifo-font-display);
  font-weight: 900;
  font-size: clamp(180px, 24vw, 380px);
  line-height: 1;
  color: var(--action-default);
  text-align: right;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

/* ---------- Navigation ---------- */

.deck-nav {
  position: fixed;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-4);
  z-index: 100;
  pointer-events: none;
}

.deck-nav__btn {
  pointer-events: auto;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(41, 37, 106, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(41, 37, 106, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  backdrop-filter: blur(4px);
}

.deck-nav__btn:hover:not(:disabled),
.deck-nav__btn:focus-visible:not(:disabled) {
  background: var(--action-default);
  transform: scale(1.06);
  outline: none;
}

.deck-nav__btn:disabled { opacity: 0.3; cursor: not-allowed; }

.deck-nav__btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Print ---------- */

@page { size: A4 landscape; margin: 0; }

@media print {
  html, body { height: auto; overflow: visible; }
  .deck {
    display: block;
    overflow: visible;
    width: auto;
    height: auto;
    scroll-snap-type: none;
  }
  .deck-nav { display: none; }
  .slide {
    flex: none;
    width: 100%;
    height: 100vh;
    page-break-after: always;
    break-after: page;
    scroll-snap-align: none;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
  html, body { height: auto; overflow: visible; }
  .deck {
    flex-direction: column;
    overflow: visible;
    width: auto;
    height: auto;
    scroll-snap-type: none;
  }
  .deck-nav { display: none; }
  .slide {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 100vh;
    scroll-snap-align: none;
  }
  .cover-grid,
  .law-cols,
  .feature-cols { grid-template-columns: 1fr; }
  .problem-grid,
  .risk-grid,
  .why-grid    { grid-template-columns: 1fr 1fr; }
  .process-track { grid-template-columns: repeat(3, 1fr); }
  .process-track::before { display: none; }
  .items-grid  { grid-template-columns: 1fr 1fr; }
  .cover-grid__bignum { font-size: clamp(80px, 20vw, 160px); }
}
