/* ==========================================================================
   Ружа Симеонова — споделена дизайн система ("Спокойна яснота")
   Кремаво + приглушено лилаво + топло злато, в тон с логото. Lora (serif) + Manrope (sans).
   ========================================================================== */

:root {
  --color-cream: #F5F0E8;
  --color-white-soft: #FCFAF7;
  --color-forest: #4A3868;
  --color-forest-dark: #392A50;
  --color-sage: #B7A9DD;
  --color-terracotta: #C99A3E;
  --color-terracotta-dark: #A97D2E;
  --color-graphite: #292B2A;
  --color-sand: #DCCDBE;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;

  --radius-card: 20px;
  --radius-pill: 999px;

  --shadow-elevated: 0 1px 2px rgba(41, 43, 42, 0.04), 0 8px 24px -8px rgba(74, 56, 104, 0.22);
  --shadow-floating: 0 4px 8px rgba(41, 43, 42, 0.05), 0 24px 48px -16px rgba(74, 56, 104, 0.32);
  --shadow-terracotta: 0 8px 24px -10px rgba(201, 154, 62, 0.45);

  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
}

/* ---------- Logo: gentle wing flutter ---------- */
@keyframes logo-flutter {
  0%, 100% { transform: rotate(0deg) scaleX(1); }
  50% { transform: rotate(-3deg) scaleX(0.95); }
}
.logo-mark {
  transform-origin: 60% 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .logo-mark {
    animation: logo-flutter 2.6s ease-in-out infinite;
  }
}

/* ---------- Butterfly watermark background motif ----------
   !important is intentional here: this is a positioning utility that must
   always float free of normal flow, even inside .gradient-veil, whose
   `.gradient-veil > *` rule otherwise forces position:relative on every
   direct child at equal specificity (later in the cascade). Without this,
   a large watermark image is laid out in-flow and pushes real content far
   down the page instead of sitting behind it. */
.butterfly-bg {
  position: absolute !important;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0 !important;
  user-select: none;
}

body {
  background-color: var(--color-cream);
  color: var(--color-graphite);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.7;
}

h1, h2, h3, .font-serif-display {
  font-family: "Lora", "Georgia", serif;
  color: var(--color-forest);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { letter-spacing: -0.03em; }

::selection {
  background: var(--color-terracotta);
  color: var(--color-white-soft);
}

/* Focus visibility — never removed, only restyled to match the brand. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Texture: subtle grain for warm depth on large cream areas ---------- */
.grain-overlay {
  position: relative;
  isolation: isolate;
}
.grain-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---------- Layered radial gradient backdrop for hero / feature sections ---------- */
.gradient-veil {
  position: relative;
}
.gradient-veil::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 420px at 85% -10%, rgba(183, 169, 221, 0.30), transparent 60%),
    radial-gradient(520px 360px at -5% 110%, rgba(201, 154, 62, 0.16), transparent 60%);
}
.gradient-veil > * { position: relative; z-index: 1; }

/* ---------- The "thread" motif — a fine organic line used as a section divider ---------- */
.thread-divider {
  width: 100%;
  height: 40px;
  display: block;
  color: var(--color-sage);
}

/* ---------- Elevation system: base -> elevated -> floating ---------- */
.surface-base {
  background: var(--color-cream);
}
.surface-elevated {
  background: var(--color-white-soft);
  box-shadow: var(--shadow-elevated);
  border-radius: var(--radius-card);
}
.surface-floating {
  background: var(--color-white-soft);
  box-shadow: var(--shadow-floating);
  border-radius: var(--radius-card);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  transition: transform 220ms var(--ease-spring), box-shadow 220ms var(--ease-out), background-color 220ms var(--ease-out), color 220ms var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-forest);
  color: var(--color-white-soft);
  box-shadow: var(--shadow-elevated);
}
.btn-primary:hover {
  background: var(--color-forest-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-floating);
}

.btn-secondary {
  background: transparent;
  color: var(--color-forest);
  border-color: var(--color-forest);
}
.btn-secondary:hover {
  background: rgba(41, 72, 63, 0.06);
  transform: translateY(-1px);
}

.btn-terracotta {
  background: var(--color-terracotta);
  color: var(--color-white-soft);
  box-shadow: var(--shadow-terracotta);
}
.btn-terracotta:hover {
  background: var(--color-terracotta-dark);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-sm {
  height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

.link-text {
  color: var(--color-forest);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(41, 72, 63, 0.35);
  transition: text-decoration-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.link-text:hover {
  text-decoration-color: var(--color-terracotta);
  color: var(--color-terracotta-dark);
}

/* ---------- Social icon buttons (not styled as text links) ---------- */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white-soft);
  color: var(--color-forest);
  box-shadow: var(--shadow-elevated);
  text-decoration: none;
  transition: transform 220ms var(--ease-spring), background-color 220ms var(--ease-out), color 220ms var(--ease-out);
}
.social-icon:hover {
  background: var(--color-forest);
  color: var(--color-white-soft);
  transform: translateY(-2px);
}
footer .social-icon {
  background: rgba(252, 250, 247, 0.12);
  color: var(--color-white-soft);
  box-shadow: none;
}
footer .social-icon:hover {
  background: var(--color-terracotta);
  color: var(--color-white-soft);
}

/* ---------- Small diploma thumbnails ---------- */
.diploma-thumb {
  display: block;
  border-radius: 14px;
  box-shadow: var(--shadow-elevated);
  border: 1px solid rgba(74, 56, 104, 0.1);
  transition: transform 260ms var(--ease-spring), box-shadow 260ms var(--ease-out);
}
.diploma-thumb:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-floating);
}

.botanical-flank-mirror {
  transform: scaleX(-1);
}

/* ---------- Reviews carousel ---------- */
.reviews-viewport {
  overflow: hidden;
  border-radius: var(--radius-card);
}
.reviews-track {
  display: flex;
  align-items: stretch;
  transition: transform 500ms var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .reviews-track { transition: none; }
}
.review-card {
  flex: 0 0 100%;
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-white-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  padding: 40px 32px;
  text-align: center;
}
.review-card-text {
  font-family: "Lora", serif;
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-forest);
  margin-bottom: 20px;
}
.review-card-text::before { content: "\201C"; }
.review-card-text::after { content: "\201D"; }
.review-card-name {
  font-weight: 600;
  color: var(--color-terracotta-dark);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.reviews-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(74, 56, 104, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.reviews-dot.active {
  background: var(--color-terracotta);
  transform: scale(1.3);
}
.reviews-empty {
  text-align: center;
  color: var(--color-graphite);
  opacity: 0.65;
  padding: 48px 20px;
}
.hidden-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-white-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  transition: transform 260ms var(--ease-spring), box-shadow 260ms var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-floating);
}

/* ---------- Image treatment ---------- */
.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
}
.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-spring);
}
.photo-frame:hover img {
  transform: scale(1.03);
}
.photo-frame.tone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 57, 49, 0) 40%, rgba(29, 57, 49, 0.55) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 240, 232, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(41, 72, 63, 0.08);
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

/* ---------- Hero merged with header: full-bleed photo, header floats on top ----------
   Used only on pages with a #home-hero-photo section right at the top of <main>. */
body:has(#home-hero-photo) .site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
body:has(#home-hero-photo) .site-header .font-serif,
body:has(#home-hero-photo) .site-header .nav-link,
body:has(#home-hero-photo) .site-header svg {
  color: var(--color-white-soft);
}
body:has(#home-hero-photo) .site-header .nav-link.active {
  color: var(--color-white-soft);
}
body:has(#home-hero-photo) .site-header .nav-link::after {
  background: var(--color-terracotta);
}
body:has(#home-hero-photo) .site-header:hover,
body:has(#home-hero-photo) .site-header:has(#mobile-menu.flex) {
  background: rgba(57, 42, 80, 0.92);
  backdrop-filter: blur(10px);
}
body:has(#home-hero-photo) .site-header #mobile-menu {
  background: rgba(57, 42, 80, 0.97);
  border-top-color: rgba(252, 250, 247, 0.15);
}

.hero-photo {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0;
}
@media (min-width: 1024px) {
  .hero-photo { min-height: 760px; align-items: center; }
}
.hero-photo > img.hero-photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(57, 42, 80, 0.94) 0%, rgba(57, 42, 80, 0.75) 38%, rgba(57, 42, 80, 0.25) 62%, rgba(57, 42, 80, 0.05) 80%);
}
.hero-photo-content {
  position: relative;
  z-index: 2;
}

.btn-on-photo {
  border: 1px solid rgba(252, 250, 247, 0.6);
  color: var(--color-white-soft);
  background: transparent;
}
.btn-on-photo:hover {
  background: rgba(252, 250, 247, 0.12);
  border-color: var(--color-white-soft);
  transform: translateY(-1px);
}
.nav-link {
  position: relative;
  color: var(--color-graphite);
  font-weight: 500;
  padding: 8px 2px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 2px;
  height: 2px;
  background: var(--color-terracotta);
  transition: right 260ms var(--ease-spring);
}
.nav-link:hover::after,
.nav-link.active::after {
  right: 0;
}
.nav-link.active {
  color: var(--color-forest);
  font-weight: 700;
}

/* ---------- Mobile sticky CTA bar ---------- */
.mobile-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(252, 250, 247, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(41, 72, 63, 0.12);
  transform: translateY(100%);
  transition: transform 320ms var(--ease-spring);
}
.mobile-cta-bar.visible {
  transform: translateY(0);
}

/* ---------- Scroll reveal ----------
   Content is fully visible by default (opacity: 1) so it never depends on
   JS/IntersectionObserver to be readable — the animation is a pure add-on
   that plays once, from "from", when the element scrolls into view. */
.reveal {
  opacity: 1;
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal.in-view {
    animation: reveal-in 560ms var(--ease-out) both;
  }
}

/* ---------- Accordion (FAQ) ---------- */
.accordion-item {
  border-bottom: 1px solid rgba(41, 72, 63, 0.14);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding: 24px 4px;
  font-family: "Lora", serif;
  font-size: 18px;
  color: var(--color-forest);
  cursor: pointer;
}
.accordion-icon {
  flex-shrink: 0;
  transition: transform 300ms var(--ease-spring);
}
.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}
.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms var(--ease-out);
}
.accordion-item.open .accordion-panel {
  grid-template-rows: 1fr;
}
.accordion-panel-inner {
  overflow: hidden;
}
.accordion-panel-content {
  padding: 0 4px 24px;
  color: var(--color-graphite);
  max-width: 68ch;
}

/* ---------- Eyebrow label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--color-terracotta);
}

/* ---------- Booking: calendar & slots ---------- */
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 180ms var(--ease-spring), background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.calendar-day[data-available="true"] {
  background: var(--color-white-soft);
  color: var(--color-forest);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(41,43,42,0.05);
}
.calendar-day[data-available="true"]:hover {
  background: var(--color-forest);
  color: var(--color-white-soft);
  transform: translateY(-2px);
}
.calendar-day[data-selected="true"] {
  background: var(--color-terracotta) !important;
  color: var(--color-white-soft) !important;
}
.calendar-day[data-available="false"] {
  color: rgba(41, 43, 42, 0.28);
  cursor: not-allowed;
}
.calendar-day.empty { visibility: hidden; }

.slot-btn {
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--color-white-soft);
  color: var(--color-forest);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 1px 2px rgba(41,43,42,0.05);
  transition: transform 180ms var(--ease-spring), background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.slot-btn:hover {
  background: var(--color-forest);
  color: var(--color-white-soft);
  transform: translateY(-2px);
}
.slot-btn[data-selected="true"] {
  background: var(--color-terracotta);
  color: var(--color-white-soft);
}

/* ---------- Progress steps ---------- */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--color-sand);
  color: var(--color-forest);
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out);
}
.step-dot.active {
  background: var(--color-forest);
  color: var(--color-white-soft);
}
.step-dot.done {
  background: var(--color-sage);
  color: var(--color-white-soft);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--color-sand);
  min-width: 16px;
}

/* ---------- Form fields ---------- */
.field-label {
  display: block;
  font-weight: 600;
  color: var(--color-forest);
  margin-bottom: 6px;
  font-size: 14px;
}
.field-input {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(41, 72, 63, 0.2);
  background: var(--color-white-soft);
  padding: 12px 16px;
  font-size: 16px;
  color: var(--color-graphite);
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.field-input:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(201, 154, 62, 0.18);
}
.field-error {
  color: var(--color-terracotta-dark);
  font-size: 13px;
  margin-top: 6px;
  display: none;
}
.field-error.visible { display: block; }

/* ---------- Utility ---------- */
.container-app {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 1024px) {
  .container-app { padding-left: 64px; padding-right: 64px; }
}
@media (min-width: 1536px) {
  .container-app { max-width: 1340px; }
}

.section-py {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
@media (min-width: 1024px) {
  .section-py { padding-top: var(--space-12); padding-bottom: var(--space-12); }
}
