:root {
  --bg: #e8efe9;
  --bg-deep: #d5e0d8;
  --ink: #1c2a24;
  --ink-soft: #4a5c54;
  --muted: #6d7f76;
  --accent: #2f6b5a;
  --accent-hover: #255647;
  --surface: rgba(255, 252, 248, 0.72);
  --line: rgba(28, 42, 36, 0.12);
  --welcome-1: #9bb8a8;
  --welcome-2: #c5d4c0;
  --welcome-3: #7a9e8e;
  --accent-glow: rgba(47, 107, 90, 0.08);
  --panel-about-from: #f3f6f2;
  --panel-reviews-end: #eef3ef;
  --panel-contacts-from: #dfe9e2;
  --panel-contacts-to: #c9d8cf;
  --photo-1: #b7c9bc;
  --photo-2: #8fa897;
  --photo-3: #6f8b7c;
  --panel-products-end: #eef3ef;
  --panel-modalities-end: #e8efe9;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.scroller {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.panel {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  align-items: center;
  padding: clamp(4rem, 8vw, 6rem) clamp(1.25rem, 5vw, 4rem);
  overflow: hidden;
}

.panel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: transparent;
}

.panel > .panel-inner,
.panel > .welcome-content {
  position: relative;
  z-index: 1;
}

.i18n[hidden] {
  display: none !important;
}

.lang-switch {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top, 0px) + 0.75rem);
  right: max(2.75rem, env(safe-area-inset-right, 0px) + 2.5rem);
  z-index: 30;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  pointer-events: auto;
}

.lang-btn {
  box-sizing: border-box;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.55rem;
  border-radius: 0.4rem;
  border: 1.5px solid rgba(28, 42, 36, 0.35);
  background: rgba(255, 252, 248, 0.92);
  color: #1c2a24;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.lang-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #f7faf8;
}

.panel-inner {
  width: min(1100px, 100%);
  margin-inline: auto;
}

.brand {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  max-width: 16ch;
}

.lede {
  margin: 0;
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.eyebrow {
  margin: 0 0 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 0.35rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: #f7faf8;
  border: 1px solid var(--accent);
}

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

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(28, 42, 36, 0.28);
  color: var(--ink);
}

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

/* —— Welcome —— */
.panel--welcome {
  color: var(--ink);
  padding: 0;
}

.welcome-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 35%, rgba(255, 252, 248, 0.45), transparent 55%),
    linear-gradient(135deg, var(--welcome-1) 0%, var(--welcome-2) 45%, var(--welcome-3) 100%);
  background-size: 100% 100%, 120% 120%;
  background-position: center, 30% 40%;
  animation: drift 18s ease-in-out infinite alternate;
  transform: scale(1.04);
}

.welcome-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(28, 42, 36, 0.18), transparent 40%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 40px,
      rgba(255, 255, 255, 0.03) 40px,
      rgba(255, 255, 255, 0.03) 41px
    );
}

.welcome-content {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 5vw, 4rem);
  width: min(1100px, 100%);
  margin-inline: auto;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 2;
  width: 1.5rem;
  height: 2.25rem;
  border: 1.5px solid rgba(28, 42, 36, 0.35);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 0.35rem;
  text-decoration: none;
}

.scroll-hint span {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--ink);
  animation: hint 1.6s var(--ease) infinite;
}

/* —— About —— */
.panel--about {
  background:
    linear-gradient(160deg, var(--panel-about-from) 0%, var(--bg) 50%, var(--bg-deep) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.about-photo {
  margin: 0;
}

.photo-placeholder {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 420px;
  border-radius: 0.25rem;
  background:
    linear-gradient(145deg, var(--photo-1) 0%, var(--photo-2) 55%, var(--photo-3) 100%);
  box-shadow: inset 0 0 0 1px rgba(28, 42, 36, 0.08);
}

.about-photo-img {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 420px;
  border-radius: 0.25rem;
  object-fit: cover;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(28, 42, 36, 0.08);
}

.about-copy p:not(.eyebrow) {
  color: var(--ink-soft);
  max-width: 38ch;
  margin: 0 0 1rem;
}

/* —— Reviews —— */
.panel--reviews {
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, var(--accent-glow), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--panel-reviews-end));
}

.review-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.review {
  margin: 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--accent);
}

.review blockquote {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.35;
  max-width: 42ch;
}

.review cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
}

/* —— Contacts —— */
.panel--contacts {
  background:
    linear-gradient(200deg, var(--panel-contacts-from) 0%, var(--panel-contacts-to) 100%);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}

.contact-details {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.contact-details a:not(.btn) {
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.contact-details a:not(.btn):hover {
  border-bottom-color: var(--ink);
}

.muted {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.contact-details .btn {
  margin-top: 0.5rem;
}

/* —— Side dots —— */
.dots {
  position: fixed;
  right: clamp(0.75rem, 2.5vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: grid;
  gap: 0.75rem;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(28, 42, 36, 0.25);
  border: none;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}

/* —— Reveal motion —— */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.32s; }

.panel.is-active .reveal {
  /* kept for snap; visibility driven by observer */
}

@keyframes drift {
  from { background-position: center, 25% 35%; }
  to { background-position: center, 55% 55%; }
}

@keyframes hint {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(0.55rem); opacity: 1; }
}

@media (max-width: 800px) {
  .about-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .modalities-list {
    grid-template-columns: 1fr;
    max-width: 36rem;
  }

  .photo-placeholder {
    max-width: 320px;
  }

  .brand {
    font-size: clamp(2.4rem, 14vw, 3.5rem);
  }

  h1 {
    max-width: 18ch;
  }

  .dots {
    right: 0.65rem;
  }
}

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

  .welcome-bg,
  .scroll-hint span {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* —— Products —— */
.panel--products {
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, var(--accent-glow), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--panel-products-end));
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
  margin-top: 2rem;
  max-width: 960px;
}

.product-card {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.product-card__photo,
.product-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 0.25rem;
  box-shadow: inset 0 0 0 1px rgba(28, 42, 36, 0.08);
}

.product-card__photo {
  object-fit: cover;
}

.product-card__placeholder {
  background:
    linear-gradient(145deg, var(--photo-1) 0%, var(--photo-2) 55%, var(--photo-3) 100%);
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.product-modal[hidden] {
  display: none;
}

.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 42, 36, 0.55);
  border: none;
  cursor: pointer;
}

.product-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(90dvh, 720px);
  overflow: auto;
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: #fffdf9;
  box-shadow: 0 24px 60px rgba(28, 42, 36, 0.22);
}

.product-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.product-modal__title {
  margin: 0 0 1.25rem;
  padding-right: 2rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.product-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

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

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

/* —— Modalities —— */
.panel--modalities {
  background:
    linear-gradient(160deg, var(--panel-about-from) 0%, var(--bg-deep) 55%, var(--panel-modalities-end) 100%);
  text-align: center;
}

.modalities-inner h2,
.modalities-intro,
.modalities-list {
  margin-inline: auto;
}

.modalities-intro {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.modalities-list {
  list-style: none;
  margin: 1.25rem auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.75rem;
  max-width: 52rem;
  text-align: center;
}

.modalities-item {
  line-height: 1.35;
}

.modalities-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.35vw, 1rem);
  font-weight: 500;
  color: var(--ink);
}

.modalities-course {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82em;
  font-style: italic;
  color: var(--accent);
}

.cert-gallery {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.cert-gallery__btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.cert-gallery__btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--accent);
}

.cert-gallery__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.cert-gallery__viewport {
  overflow: hidden;
  min-width: 0;
}

.cert-gallery__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2rem) / 3);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.cert-thumb {
  scroll-snap-align: start;
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(28, 42, 36, 0.1);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cert-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 42, 36, 0.12);
}

.cert-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cert-lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.cert-lightbox[hidden] {
  display: none;
}

.cert-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(28, 42, 36, 0.78);
  cursor: pointer;
}

.cert-lightbox__img {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 960px);
  max-height: 88dvh;
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* —— Social links —— */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.25rem 0 0.75rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  text-decoration: none;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.social-link__icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.social-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.social-link--instagram:hover {
  color: #e4405f;
  background: rgba(228, 64, 95, 0.08);
}

.social-link--facebook:hover {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
}

.social-link--facebook-group:hover {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
}

@media (max-width: 800px) {
  .cert-gallery__track {
    grid-auto-columns: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 520px) {
  .cert-gallery__track {
    grid-auto-columns: 85%;
  }
}
