:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-muted: #f2ede4;
  --ink: #1c2b3a;
  --ink-soft: #4d5b68;
  --accent: #a8681c;
  --accent-strong: #8a5312;
  --accent-soft: #f1e0c4;
  --line: #e2d9cb;
  --danger: #a4342a;
  --success: #2f6a45;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 12px 32px rgba(28, 43, 58, 0.08);
  --container: 1160px;
  --serif: Georgia, "Times New Roman", "PT Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(40px, 6vw, 56px);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
}

h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px;
  max-width: 68ch;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 16px;
}

.noscript {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 12px 24px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: #f8efe0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.brand-city {
  font-size: 14px;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: #fdfaf4;
  border-color: var(--ink);
}

.btn-primary:hover {
  background: #2c3f52;
  border-color: #2c3f52;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: #fdfaf4;
}

.btn-small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hero */
.hero {
  padding: 64px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 16px;
}

.hero h1 {
  margin-bottom: 24px;
}

.lead {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
}

.hero-facts li {
  position: relative;
  padding-left: 16px;
}

.hero-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-contact {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 11 / 8;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-tinted {
  background: var(--surface-muted);
}

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

.section-lead {
  font-size: 20px;
  color: var(--ink-soft);
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px;
}

.card p {
  color: var(--ink-soft);
  margin: 0;
}

.card-index {
  display: inline-block;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 16px;
}

.card-person h3 {
  margin-bottom: 12px;
}

.fineprint {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Classes */
.classes-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 48px;
  align-items: start;
}

.classes-media {
  margin: 0;
  position: sticky;
  top: 104px;
}

.classes-media img {
  width: 100%;
  aspect-ratio: 11 / 8;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.steps {
  list-style: none;
  display: grid;
  gap: 20px;
  margin: 32px 0;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
}

.step-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
}

.steps h3 {
  margin-bottom: 4px;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
}

.note {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
}

.note p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Form */
.section-form {
  background: var(--surface-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

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

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 700;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.req {
  color: var(--danger);
}

.opt {
  font-weight: 400;
  color: var(--ink-soft);
}

input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 14px;
  margin: 8px 0 0;
}

.field-check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
}

.field-check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent-strong);
}

.field-check label {
  font-weight: 400;
  font-size: 14px;
  margin: 0;
  min-height: 24px;
}

.field-check .field-error {
  grid-column: 2;
  margin-top: 0;
}

.field-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 16px 0 0;
}

.form-status {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
}

.form-status.is-success {
  background: #e7f1ea;
  color: var(--success);
}

.form-status.is-error {
  background: #f7e5e2;
  color: var(--danger);
}

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-list {
  margin: 0;
  display: grid;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 24px;
}

.contact-list div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-list div:last-child {
  border-bottom: 0;
}

.contact-list dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.contact-list dd {
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 8px;
}

.footer-line {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer nav a {
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Legal / simple pages */
.page {
  padding: 64px 0 96px;
}

.page h1 {
  font-size: clamp(32px, 5vw, 40px);
}

.page .container {
  max-width: 800px;
}

.page h2 {
  font-size: 28px;
  margin-top: 40px;
}

/* Staff */
.staff-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.staff-toolbar .field {
  margin: 0;
  flex: 1 1 260px;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}

.leads-table th,
.leads-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.leads-table th {
  background: var(--surface-muted);
  font-size: 14px;
  white-space: nowrap;
}

.leads-table tr:last-child td {
  border-bottom: 0;
}

.leads-wrap {
  overflow-x: auto;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge.is-ok {
  background: #e7f1ea;
  color: var(--success);
}

.badge.is-warn {
  background: #f7e5e2;
  color: var(--danger);
}

.hint {
  font-size: 14px;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .hero-grid,
  .classes-grid,
  .form-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .classes-media {
    position: static;
    order: 2;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-nav {
    gap: 4px 16px;
  }

  .site-nav a {
    font-size: 14px;
  }
}

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

  .hero {
    padding: 40px 0 56px;
  }

  .section {
    padding: 64px 0;
  }

  .site-nav a:not(.btn) {
    display: none;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .contact-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .form-card {
    padding: 24px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

.container-wide {
  max-width: var(--container);
}

.leads-table select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
}

.page h1 {
  margin-bottom: 24px;
}
