/* «Круг» — веломастерская.
   Палитра: графит + тёплая бумага + один акцент (тёплый оранжевый).
   Заголовки первого экрана — Oswald (локальные файлы, кириллица + латиница). */

/* Oswald, вариативный шрифт: один файл покрывает веса 500 и 600 (как у Google Fonts) */
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/oswald-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/oswald-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/oswald-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/oswald-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --graphite: #23272c;
  --paper: #f5f1e8;
  --paper-dim: #ece5d6;
  --card: #ffffff;
  --line: #e0d8c6;
  --ink: #22252a;
  --ink-soft: #5c6066;
  --chalk: #f7f3ea;
  --chalk-soft: #c4c9ce;
  --chalk-dim: #9aa1a8;
  --accent: #d9480f;
  --accent-dark: #b23a0b;
  --accent-bright: #ff9e66;
  --accent-soft: #fbe9dc;
  --error: #b42318;
  --error-bg: #feefed;
  --ok: #1b7a3e;
  --ok-bg: #eaf6ee;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
figure { margin: 0; }
h1, h2, h3, p, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul { margin: 0; padding: 0; }

[hidden] { display: none !important; }

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Фокус с клавиатуры виден на любом фоне */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hero :focus-visible { outline-color: var(--chalk); }

/* Кнопки */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn--wide { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* honeypot-ловушка от спама: невидима для человека */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* --- Первый экран --- */

.hero {
  background: var(--graphite);
  color: var(--chalk);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 1440px;
  margin-inline: auto;
  min-height: 560px;
}

.hero__panel {
  align-self: center;
  padding: clamp(40px, 7vw, 88px) clamp(24px, 5vw, 72px);
}

.hero__label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.hero__title {
  margin-top: 16px;
  font-family: "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Главная фраза — самая заметная */
.hero__title-main {
  display: block;
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: #fcf8f0;
}

/* Услуги — чуть меньше, читаются как продолжение */
.hero__title-sub {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--chalk-soft);
}

.hero__text {
  margin-top: 18px;
  max-width: 44ch;
  font-size: 1.06rem;
  color: var(--chalk-soft);
}

.hero__panel .btn { margin-top: 28px; }

.hero__prices {
  margin-top: 26px;
  font-size: 0.92rem;
  color: var(--chalk-dim);
}

.hero__photo { min-height: 320px; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; min-height: 0; }
  .hero__photo { min-height: 260px; }
}

@media (max-width: 480px) {
  .hero__photo { min-height: 220px; }
}

/* --- Разделы: общий ритм --- */

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
}

#calc { scroll-margin-top: 16px; }

.services { padding-top: clamp(56px, 9vw, 96px); }

.section-note {
  margin-top: 10px;
  color: var(--ink-soft);
}

/* --- Услуги и цены --- */

.services__grid {
  list-style: none;
  margin-top: 32px;
  display: grid;
  gap: 24px;
}

.card {
  display: flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(34, 37, 42, 0.05);
}

.card__photo { flex: 0 0 42%; min-height: 200px; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }

.card__body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.card h3 { font-size: 1.25rem; }

.card__desc {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.card__price {
  margin-top: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 639px) {
  .card { flex-direction: column; }
  .card__photo { flex-basis: auto; min-height: 0; }
  .card__photo img { height: 200px; }
}

@media (min-width: 1100px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .card { flex-direction: column; }
  .card__photo { flex-basis: auto; }
  .card__photo img { height: 210px; }
}

/* --- Расчёт и заявка --- */

.calc { padding-top: clamp(56px, 9vw, 96px); }

.calc__panel {
  margin-top: 28px;
  padding: clamp(20px, 3vw, 36px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(34, 37, 42, 0.06);
}

.calc__grid { display: grid; gap: clamp(24px, 4vw, 48px); }

@media (min-width: 900px) {
  .calc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.calc__services legend {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.choices { display: grid; gap: 10px; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--card);
  border: 1.5px solid #d8cfbc;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice:hover { border-color: var(--accent); }

.choice.is-checked {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

.choice input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent);
}

.choice__name { font-weight: 600; }

.choice__price {
  margin-left: auto;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.choice.is-checked .choice__price { color: var(--accent-dark); }

.calc__sum {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.calc__sum-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.calc__sum-value {
  margin-top: 4px;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.calc__sum-hint {
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Форма */

.field + .field { margin-top: 18px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.97rem;
}

.field input {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid #cfc6b2;
  border-radius: 10px;
}

.field input.is-invalid {
  border-color: var(--error);
  background: var(--error-bg);
}

.field-hint {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.field-error {
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--error);
}

.calc__form .btn { margin-top: 24px; }

.form-status {
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 10px;
  font-weight: 600;
}

.form-status.is-ok {
  background: var(--ok-bg);
  border: 1.5px solid var(--ok);
  color: #14532d;
}

.form-status.is-error {
  background: var(--error-bg);
  border: 1.5px solid var(--error);
  color: var(--error);
}

/* --- Мастерская --- */

.workshop {
  margin-top: clamp(56px, 9vw, 96px);
  padding-block: clamp(44px, 7vw, 72px);
  background: var(--paper-dim);
  border-block: 1px solid var(--line);
}

.workshop__grid { display: grid; gap: 28px; }

@media (min-width: 900px) {
  .workshop__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(32px, 5vw, 56px);
  }
}

.workshop__text p {
  margin-top: 14px;
  max-width: 52ch;
  color: var(--ink-soft);
}

.workshop__note {
  padding: 12px 16px;
  background: var(--card);
  border: 1px dashed #c9bfac;
  border-radius: 10px;
  font-weight: 600;
  color: var(--ink);
}

.workshop__photo img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (min-width: 900px) {
  .workshop__photo img { height: 380px; }
}

/* --- Подвал --- */

.footer {
  background: var(--graphite);
  color: var(--chalk);
}

.footer__inner {
  padding-block: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
}

.footer__name { font-weight: 700; }
.footer__note { font-size: 0.92rem; color: var(--chalk-dim); }

@media (max-width: 640px) {
  .container { padding-inline: 16px; }
}
