/* ==========================================================================
   doctorum — landing page, design variant "Рабочий день".

   Colour values, type sizes and spacing are carried over unchanged from the
   approved mock-up; only the delivery changed (inline styles -> classes).
   Palette is a single hue family (oklch hue 200) plus one mint accent (165).
   ========================================================================== */

:root {
  /* Light surfaces and ink */
  --bg:            oklch(97% 0.004 200);
  --bg-tint:       oklch(93% 0.008 200);
  --ink:           oklch(20% 0.01 200);
  --ink-strong:    oklch(28% 0.012 200);
  --ink-soft:      oklch(35% 0.012 200);
  --ink-mute:      oklch(38% 0.012 200);
  --ink-mute-2:    oklch(40% 0.012 200);
  --ink-faint:     oklch(50% 0.01 200);
  --hairline:      oklch(88% 0.008 200);
  --field-border:  oklch(80% 0.01 200);

  /* Dark surfaces */
  --dark:          oklch(15% 0.018 200);
  --dark-deep:     oklch(12% 0.015 200);
  --panel:         oklch(19% 0.018 200);
  --panel-2:       oklch(20% 0.02 200);
  --panel-3:       oklch(22% 0.02 200);
  --dark-line:     oklch(30% 0.02 200);
  --dark-line-2:   oklch(35% 0.02 200);

  /* Ink on dark surfaces */
  --on-dark:       oklch(97% 0.005 200);
  --on-dark-2:     oklch(95% 0.005 200);
  --on-dark-3:     oklch(90% 0.005 200);
  --on-dark-soft:  oklch(80% 0.01 200);
  --on-dark-mute:  oklch(70% 0.01 200);
  --on-dark-faint: oklch(65% 0.012 200);
  --on-dark-dim:   oklch(60% 0.012 200);
  --on-dark-dimmer:oklch(55% 0.012 200);

  /* Accent */
  --accent:        oklch(70% 0.09 165);
  --accent-hi:     oklch(76% 0.09 165);
  --accent-ink:    oklch(15% 0.02 200);

  /* States */
  --ok-bg:         oklch(90% 0.04 145);
  --ok-border:     oklch(75% 0.08 145);
  --ok-ink:        oklch(28% 0.05 145);
  --err:           oklch(48% 0.17 25);
  --err-bg:        oklch(94% 0.03 25);

  /* Layout */
  --gutter:        24px;
  --shell:         1240px;
  --shell-narrow:  800px;
  --radius:        8px;
  --radius-lg:     14px;
  --header-h:      72px;
  --sticky-h:      76px;
}

/* --- Base ---------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* Sticky header must not cover the heading an anchor jumps to. */
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* --- Layout primitives --------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: var(--shell-narrow); }

.section { padding: 80px 0; }

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

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

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.5px;
  margin: 0 0 40px;
}
.section-head .section-title { margin-bottom: 0; }
/* Sections whose heading is followed immediately by prose, not by a grid. */
.section-title--tight { margin-bottom: 24px; }
.section-title--flush { margin-bottom: 8px; }

.section-sub {
  font-size: 17px;
  color: var(--ink-mute);
  margin: 8px 0 0;
}
.section-head .section-sub { margin-top: 8px; }

/* A grid whose 2px gaps read as hairlines between cells. */
.hairline-grid {
  display: grid;
  gap: 2px;
  background: var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hairline-grid--dark { background: var(--dark-line); }

/* --- Logo --------------------------------------------------------------- */

.logo {
  font-family: 'Prosto One', 'Roboto', sans-serif;
  /* Lowercase spelling is fixed brand usage — never capitalise. */
  text-transform: lowercase;
  font-size: 24px;
  letter-spacing: 0.5px;
  color: var(--on-dark);
  text-decoration: none;
}
.logo--footer { font-size: 20px; }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn--sm  { padding: 11px 22px; font-size: 15px; font-weight: 700; border-radius: 6px; }
.btn--lg  { padding: 16px 28px; font-size: 16px; }
.btn--block { width: 100%; }

.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover,
.btn--accent:focus-visible { background: var(--accent-hi); }

.btn--ghost {
  background: transparent;
  color: var(--on-dark-3);
  border-color: var(--dark-line-2);
  font-weight: 700;
}
.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--accent); color: var(--on-dark); }

.btn--ink { background: var(--accent-ink); color: var(--on-dark); }
.btn--ink:hover,
.btn--ink:focus-visible { background: var(--dark-deep); }

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--dark) 95%, transparent);
  backdrop-filter: blur(8px);
}
/* Fallback for engines without color-mix(): a solid bar is fine. */
@supports not (background: color-mix(in oklab, black 50%, transparent)) {
  .site-header { background: var(--dark); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
}

.site-nav {
  display: none;
  gap: 28px;
  font-size: 15px;
}
.site-nav a {
  color: var(--on-dark-soft);
  text-decoration: none;
  padding: 4px 0;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--on-dark); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  background: var(--dark);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-top: 56px;
  padding-bottom: 72px;
}

.hero__text { max-width: 760px; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.hero__title {
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 20px;
}

.hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-dark-soft);
  max-width: 560px;
  margin: 0 0 32px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Interface fragments: a slice of a real working day. */
.hero__slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  max-width: 900px;
}

.slot {
  background: var(--panel-2);
  border: 1px solid var(--dark-line);
  border-radius: 10px;
  padding: 16px;
}
.slot__when {
  font-size: 12px;
  color: var(--on-dark-faint);
  margin-bottom: 6px;
}
.slot__state {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-dark-3);
}
.slot__badges { display: flex; gap: 6px; }

.badge {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

/* --- Pains -------------------------------------------------------------- */

.pains { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.pain {
  background: var(--bg);
  padding: 26px 22px;
}
.pain__title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 8px;
}
.pain__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-mute-2);
  margin: 0;
}

/* --- Features (was -> now) ---------------------------------------------- */

.features { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.feature {
  background: var(--panel);
  padding: 24px 22px;
}
.feature__was {
  font-size: 13px;
  color: var(--on-dark-dimmer);
  margin: 0 0 10px;
}
.feature__now {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--on-dark-2);
  margin: 0;
}

/* --- Numbers ------------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px 24px;
}

.stat {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}
.stat__value {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  /* Keep "14 612" and "≈ 28 800" on one line. */
  white-space: nowrap;
}
.stat__label {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-mute-2);
}

/* --- How we work -------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.step__n {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
}
.step__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--on-dark);
}
.step__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--on-dark-mute);
  margin: 0;
}

.how__note {
  margin: 40px 0 0;
  font-size: 18px;
  font-weight: 700;
  max-width: 700px;
}

/* --- About -------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 940px;
}
.about p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}

/* --- Testimonials ------------------------------------------------------- */

.quotes__note {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 32px;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.quote {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 0;
}
.quote__text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-dark-2);
  margin: 0 0 16px;
}
.quote__who {
  font-size: 14px;
  color: var(--on-dark-faint);
}

/* --- Free mock-up offer ------------------------------------------------- */

.offer {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 18px;
  padding: 48px 40px;
}
.offer__title {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
}
.offer__text {
  font-size: 17px;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 0 24px;
}

/* --- FAQ ---------------------------------------------------------------- */

/* <details> gives keyboard support and works without JavaScript. */
.faq {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--dark-line);
  border-radius: 12px;
  overflow: hidden;
}

.faq__item { background: var(--panel); }

.faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 700;
  color: var(--on-dark-2);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: '+';
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
}
.faq__item[open] > .faq__q::after { content: '−'; }

.faq__a {
  padding: 0 20px 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-dark-mute);
}

/* --- Lead form ---------------------------------------------------------- */

.lead__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.lead .section-title { margin-bottom: 12px; }
.lead .section-sub { margin: 0 0 32px; }

.notice {
  border-radius: 12px;
  padding: 24px;
  font-size: 16px;
  margin: 0;
}
.notice--ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--ok-ink);
}
.notice--error {
  background: var(--err-bg);
  border: 1px solid var(--err);
  color: var(--err);
  margin-bottom: 24px;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.field__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-strong);
}
.field__input {
  width: 100%;
  padding: 13px 14px;
  min-height: 44px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  /* 16px keeps iOS Safari from zooming on focus. */
  font-size: 16px;
}
.field__input--area {
  min-height: 88px;
  resize: vertical;
}
.field__input:focus-visible {
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}
.field__input[aria-invalid="true"] { border-color: var(--err); }

.field__hint {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-faint);
}

.field__error {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--err);
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.field--trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Consent to personal data processing — mandatory, unchecked by default. */
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
}
.consent__box {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent__label {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
  /* Optically centres the first line against the 22px box. */
  padding-top: 1px;
}
.consent__label a { color: var(--ink); text-decoration: underline; }
.consent__label a:hover,
.consent__label a:focus-visible { color: var(--accent-ink); }
.consent__error { grid-column: 2; }
.consent__box[aria-invalid="true"] {
  outline: 2px solid var(--err);
  outline-offset: 2px;
}

.contact-panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
}
.contact-panel__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.contact-panel__phone {
  font-size: 20px;
  font-weight: 800;
  color: var(--on-dark);
  text-decoration: none;
}
.contact-panel__link {
  font-size: 16px;
  color: var(--on-dark-soft);
  text-decoration: none;
}
.contact-panel__link:hover,
.contact-panel__link:focus-visible { color: var(--on-dark); }
.contact-panel__city {
  font-size: 14px;
  color: var(--on-dark-dim);
  margin: 6px 0 0;
}

/* --- Document page (privacy policy) ------------------------------------ */

.doc__back {
  font-size: 15px;
  margin: 0 0 24px;
}
.doc__back a {
  color: var(--ink-mute);
  text-decoration: none;
}
.doc__back a:hover,
.doc__back a:focus-visible { color: var(--ink); }

.doc__title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
.doc__meta {
  font-size: 14px;
  color: var(--ink-faint);
  margin: 0 0 40px;
}
.doc__section-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  margin: 36px 0 12px;
}
.doc__p {
  /* Prose is set slightly looser than UI text for long-form reading. */
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 14px;
  /* Long tokens like an email address must not overflow on a phone. */
  overflow-wrap: break-word;
}
.doc__list {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.doc__list li { margin-bottom: 6px; }
.doc__p--cta { margin-top: 40px; }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  background: var(--dark-deep);
  color: var(--on-dark-dimmer);
  padding: 40px 0 100px;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer__legal,
.site-footer__links {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.site-footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer__links a {
  color: var(--on-dark-dimmer);
  text-decoration: none;
}
.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--on-dark-soft);
  text-decoration: underline;
}

/* --- Mobile sticky call to action -------------------------------------- */

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  background: var(--dark);
  border-top: 1px solid var(--dark-line);
}
.sticky-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 13px;
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
}
.sticky-cta__call {
  flex: 1;
  background: var(--panel-3);
  color: var(--on-dark-2);
  font-weight: 700;
}
.sticky-cta__lead {
  flex: 1.4;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

/* --- Breakpoints -------------------------------------------------------- */

@media (max-width: 899px) {
  /* Room for the sticky bar so it never covers the footer links. */
  body { padding-bottom: var(--sticky-h); }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .sticky-cta { display: none; }

  /* Contacts sit beside the form, as the brief asks. Drop this block to
     return to the mock-up's single column. */
  .lead__grid { grid-template-columns: 1.1fr 0.9fr; }
}

@media (max-width: 520px) {
  .offer { padding: 32px 24px; }
  .quote { padding: 24px; }
  .contact-panel { padding: 24px; }
  .hero__actions .btn { width: 100%; }
}
