@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #f7f4ef;
  --bg-card: #f0ece4;
  --fg: #2c2420;
  --primary: #b55533;
  --primary-hover: #9e4728;
  --muted: #7a6e68;
  --border: #ddd5c8;
  --border-light: #e9e3db;
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --radius: 0.5rem;
  --shadow-sm: 0 1px 3px rgba(44,36,32,0.07), 0 1px 2px rgba(44,36,32,0.04);
  --max-w: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,244,239,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--fg);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all 0.3s;
}

footer {
  background: var(--fg);
  color: rgba(247,244,239,0.85);
  padding: 3rem 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--bg);
  margin-bottom: 0.75rem;
}

.footer-desc {
  font-size: 0.875rem;
  color: rgba(247,244,239,0.6);
  max-width: 220px;
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,244,239,0.45);
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(247,244,239,0.6);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--bg);
}

.footer-requisites {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-requisites p {
  font-size: 0.875rem;
  color: rgba(247,244,239,0.6);
}

.footer-bottom {
  border-top: 1px solid rgba(247,244,239,0.12);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(247,244,239,0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  line-height: 1;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 2rem;
  height: 48px;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
  padding: 0.75rem 2rem;
  height: 48px;
}

.btn-outline:hover {
  background: var(--bg-card);
}

.btn-outline-white {
  background: transparent;
  color: var(--bg);
  border-color: rgba(247,244,239,0.4);
  padding: 0.75rem 2rem;
  height: 48px;
}

.btn-outline-white:hover {
  background: rgba(247,244,239,0.08);
}

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

.btn-full {
  width: 100%;
}

.btn-lg {
  height: 52px;
  padding: 0.875rem 2.5rem;
  font-size: 1rem;
}

section.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.38;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 35%, rgba(247,244,239,0.82) 65%, rgba(247,244,239,0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-content h1 em {
  font-style: italic;
  color: var(--primary);
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

section.philosophy {
  padding: 6rem 0;
  background: var(--bg-card);
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-intro h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

.section-intro p {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.75;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.two-col img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}

.for-whom h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.for-whom ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.for-whom li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.for-whom li .dot {
  color: var(--primary);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.for-whom li p {
  font-size: 1rem;
  line-height: 1.6;
}

section.process {
  padding: 6rem 0;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  border-left: 2px solid rgba(181,85,51,0.3);
  padding: 0.25rem 0 0.25rem 1.25rem;
}

.step h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--muted);
}

section.gallery {
  padding: 6rem 0;
  background: var(--bg-card);
}

.gallery-wrap {
  display: flex;
  justify-content: center;
}

.gallery-wrap img {
  max-width: 600px;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

section.enroll {
  padding: 6rem 0;
}

.form-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-card-head {
  text-align: center;
  margin-bottom: 2rem;
}

.form-card-head h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-card-head p {
  font-size: 0.9rem;
  color: var(--muted);
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form-field input {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-field input::placeholder {
  color: rgba(122,110,104,0.55);
}

.form-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(181,85,51,0.12);
}

.form-note {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
}

.form-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-note a:hover {
  color: var(--primary);
}

.legal-page {
  flex: 1;
  padding: 4rem 0 5rem;
}

.legal-page .container {
  max-width: 720px;
}

.legal-page h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.legal-date {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  display: block;
}

.legal-section {
  margin-bottom: 2.25rem;
}

.legal-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.legal-section p {
  font-size: 0.9375rem;
  color: var(--fg);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.legal-section ul {
  list-style: disc;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.legal-section ul li {
  font-size: 0.9375rem;
  color: var(--fg);
  line-height: 1.6;
}

.success-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
}

.success-card {
  max-width: 440px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(181,85,51,0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-card h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.success-card p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.success-card .signature {
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(44,36,32,0.07);
  z-index: 200;
  padding: 1rem 1.5rem;
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.cookie-inner p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.cookie-inner a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-inner a:hover {
  color: var(--primary);
}

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1.25rem;
    z-index: 99;
  }

  nav.main-nav.open {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .two-col .order-2 {
    order: 2;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
