:root {
  --ink: #123043;
  --ink-soft: #425b6b;
  --paper: #f8f5ee;
  --paper-2: #efe9dc;
  --card: #fffdf8;
  --line: #ddd5c5;
  --accent: #1f6f5c;
  --accent-dark: #175648;
  --ochre: #c97a33;
  --ochre-soft: #f3e2cd;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(18, 48, 67, 0.09);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 245, 238, 0.92);
  border-bottom: 1px solid rgba(221, 213, 197, 0.7);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

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

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

.brand-text strong {
  font-family: Georgia, serif;
  font-size: 1.1rem;
}

.brand-text small {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

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

.main-nav a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

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

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

.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.hero {
  padding: clamp(38px, 6vw, 80px) 0 clamp(46px, 7vw, 90px);
  background:
    radial-gradient(circle at 88% 12%, rgba(201, 122, 51, 0.16), transparent 42%),
    radial-gradient(circle at 8% 90%, rgba(31, 111, 92, 0.12), transparent 44%);
}

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

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ochre);
}

.hero-text .lead {
  max-width: 34em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
}

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

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

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

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

.hero-art {
  position: relative;
}

.hero-art img {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: var(--paper-2);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-note {
  position: absolute;
  left: -14px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  font-size: 0.86rem;
}

.hero-note strong {
  font-family: Georgia, serif;
  font-size: 1rem;
}

.hero-note span {
  color: var(--ink-soft);
}

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

.section-tinted {
  background: var(--paper-2);
  border-block: 1px solid rgba(221, 213, 197, 0.7);
}

.section-lead {
  background:
    radial-gradient(circle at 92% 8%, rgba(31, 111, 92, 0.14), transparent 40%),
    var(--ink);
  color: var(--paper);
}

.section-lead .eyebrow {
  color: #e5b47e;
}

.section-lead h2 {
  color: #fff;
}

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

.section-head > p:last-child {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

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

.about-art img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow);
  background: var(--paper-2);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

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

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

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

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--paper);
}

.about-note {
  padding: 16px 18px;
  border-left: 3px solid var(--ochre);
  background: rgba(201, 122, 51, 0.08);
  border-radius: 0 10px 10px 0;
  font-size: 0.94rem;
}

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

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

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card-num {
  margin-bottom: 18px;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ochre);
}

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

.card p {
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.card-tag {
  margin-top: auto;
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ochre-soft);
  color: #7f4b18;
  font-size: 0.76rem;
  font-weight: 600;
}

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

.admission-intro {
  max-width: 38em;
  color: var(--ink-soft);
}

.steps {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.steps li > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, serif;
  font-weight: 700;
}

.steps strong {
  display: block;
  margin-bottom: 2px;
}

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

.admission-card {
  padding: 28px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.admission-card h3 {
  color: #fff;
}

.admission-card ul {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  padding-left: 20px;
  color: #d9e2e6;
  font-size: 0.94rem;
}

.admission-card p {
  color: #b8c7cd;
  font-size: 0.9rem;
}

.admission-card .text-link {
  color: #f0bd85;
}

.text-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.text-link:hover {
  color: var(--ochre);
}

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

.lead-text > p {
  color: #c3d0d5;
  max-width: 34em;
}

.lead-contacts {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.lead-phone {
  display: inline-block;
  margin-bottom: 4px;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.55rem;
  text-decoration: none;
}

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

.section-lead .muted {
  color: #9fb1b8;
}

.form-card {
  padding: clamp(22px, 3vw, 34px);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.field label > span {
  color: var(--ochre);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfc6b5;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.field-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-consent {
  margin-top: 4px;
}

.consent {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400 !important;
  font-size: 0.84rem !important;
  line-height: 1.5;
  color: var(--ink-soft);
}

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

.field-error {
  margin: 5px 0 0;
  color: #a8322a;
  font-size: 0.8rem;
  min-height: 0;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #b83b32;
  background: #fff7f6;
}

.btn-submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px 20px;
}

.form-status {
  margin: 14px 0 0;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(31, 111, 92, 0.12);
  color: var(--accent-dark);
}

.form-status.is-error {
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(184, 59, 50, 0.1);
  color: #8f2c24;
}

.form-note {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

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

.contact-card {
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-card h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.contact-card p {
  margin-bottom: 8px;
}

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

.site-footer {
  padding: 46px 0 24px;
  background: #0d2531;
  color: #c8d5da;
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid strong {
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.footer-grid p {
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-content: flex-start;
}

.footer-links a {
  color: #d7e1e4;
  text-decoration: none;
}

.footer-links a:hover {
  color: #f0bd85;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  color: #8fa3ab;
  font-size: 0.8rem;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .hero-grid,
  .about-grid,
  .admission-grid,
  .lead-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

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

  .contacts-grid {
    grid-template-columns: 1fr;
  }
}

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

  .brand-text small {
    display: none;
  }

  .header-inner {
    gap: 12px;
  }

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

  .field-two {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-note {
    left: 10px;
    bottom: 10px;
  }

  .footer-grid,
  .footer-bottom {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

.narrow {
  max-width: 820px;
}

.back-link {
  margin-top: 32px;
}

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

.staff-token-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  max-width: 620px;
  margin: 24px 0 8px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

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

.staff-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 22px 0 14px;
  font-weight: 600;
}

.staff-refresh {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent-dark);
  cursor: pointer;
}

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

.staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.staff-table th {
  background: var(--paper-2);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.staff-table td:nth-child(2) {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .staff-token-form {
    padding: 16px;
  }

  .staff-token-actions {
    width: 100%;
  }
}
