:root {
  --ink: #16324f;
  --ink-soft: #3f556d;
  --paper: #f8f5ee;
  --paper-alt: #eef3f1;
  --accent: #1f6f5c;
  --accent-dark: #165445;
  --warm: #d99a2b;
  --line: #dcd5c6;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(22, 50, 79, 0.1);
  --wrap: 1160px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.footer-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.wrap {
  width: min(var(--wrap), 100% - 40px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 238, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 1.4rem;
}

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

.brand-text small {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.main-nav > a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav > a:not(.btn):hover {
  color: var(--ink);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(31, 111, 92, 0.24);
}

.btn-small {
  padding: 9px 18px;
  font-size: 0.9rem;
}

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

.btn-ghost:hover {
  background: var(--ink);
  color: var(--white);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

/* Hero */

.hero {
  padding: clamp(32px, 6vw, 76px) 0 clamp(36px, 6vw, 72px);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(217, 154, 43, 0.18), transparent 65%),
    radial-gradient(700px 380px at 0% 10%, rgba(31, 111, 92, 0.12), transparent 60%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border: 1px solid rgba(31, 111, 92, 0.35);
  border-radius: 999px;
  background: rgba(31, 111, 92, 0.07);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-text .lead {
  font-size: 1.14rem;
  color: var(--ink-soft);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 34px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.hero-facts strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.3rem;
}

.hero-facts span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hero-media {
  margin: 0;
  position: relative;
}

.hero-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.hero-media figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-align: center;
}

/* Sections */

.section {
  padding: clamp(48px, 7vw, 88px) 0;
}

.section-alt {
  background: var(--paper-alt);
  border-block: 1px solid rgba(31, 111, 92, 0.12);
}

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

.section-head p:last-child {
  color: var(--ink-soft);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.split-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.split-text p {
  color: var(--ink-soft);
}

.check-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 32px;
  font-weight: 500;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--accent);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.5em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg);
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(31, 111, 92, 0.4);
}

.card-icon {
  display: inline-block;
  margin-bottom: 14px;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--warm);
}

.card h3 {
  margin-bottom: 8px;
}

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

/* Steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 26px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--warm);
}

.steps h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

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

/* Lead form */

.section-lead {
  background: var(--ink);
  color: var(--white);
  scroll-margin-top: 80px;
}

.section-lead h2 {
  color: var(--white);
}

.section-lead .eyebrow {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #e9d6a9;
}

.lead-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.lead-text p {
  color: rgba(255, 255, 255, 0.78);
}

.lead-text .check-light li {
  color: rgba(255, 255, 255, 0.9);
}

.check-light li::before {
  background: var(--warm);
}

.check-light li::after {
  border-color: var(--ink);
}

.lead-note a {
  color: var(--warm);
  font-weight: 700;
}

.lead-form {
  padding: clamp(22px, 3.5vw, 34px);
  background: var(--white);
  color: var(--ink);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.field label span {
  color: #b42318;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: #fdfcf9;
  border: 1px solid #cfc7b7;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.consent input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 92, 0.16);
}

.field textarea {
  resize: vertical;
  min-height: 84px;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

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

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 20px;
  font-size: 0.83rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.btn-submit {
  width: 100%;
  padding: 15px 24px;
}

.form-status {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-status.is-success {
  color: var(--accent-dark);
}

.form-status.is-error {
  color: #b42318;
}

/* Contacts */

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.contact-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
}

.contact-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.contact-card p {
  margin: 0 0 6px;
}

.contact-card a {
  font-weight: 700;
}

.muted {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  padding: 34px 0;
  background: #0f2438;
  color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  margin: 0 0 2px;
  color: var(--white);
  font-size: 1.1rem;
}

.site-footer .muted {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-copy {
  flex-basis: 100%;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .lead-grid {
    grid-template-columns: 1fr;
  }

  .split-media {
    order: -1;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-nav {
    gap: 14px;
  }

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

@media (max-width: 560px) {
  .wrap {
    width: min(var(--wrap), 100% - 28px);
  }

  .hero-facts,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero-facts {
    gap: 10px;
  }

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

  .brand-text small {
    display: none;
  }
}

/* Legal pages */

.legal-wrap {
  max-width: 820px;
}

.legal h1 {
  margin-bottom: 4px;
}

.legal h2 {
  margin-top: 34px;
  font-size: 1.35rem;
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal-back {
  margin-top: 40px;
}

/* Staff page */

.staff h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.token-form {
  max-width: 560px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.leads-summary {
  margin: 24px 0 12px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.leads-table th,
.leads-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #ece6da;
}

.leads-table th {
  background: var(--paper-alt);
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

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

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