:root {
  --bg: #faf6f3;
  --bg-alt: #f3e8e2;
  --text: #2b2320;
  --text-soft: #6b5b54;
  --dark: #2b2320;
  --accent: #b76e79;
  --accent-1: #c98a93;
  --accent-2: #b76e79;
  --accent-solid: #b76e79;
  --accent-dark: #8a4a54;
  --white: #ffffff;
  --border: #e6d9d2;
  --shadow: 0 10px 30px rgba(43, 35, 32, 0.08);
  --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  color: var(--text);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

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

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}
.btn-accent {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(138, 74, 84, 0.3);
}
.btn-accent:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent-solid); color: var(--accent-dark); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 243, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
}
.nav {
  display: flex;
  gap: 32px;
}
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
}
.nav a:hover { color: var(--accent-dark); }
.header-cta {
  display: flex;
  gap: 10px;
  margin-left: 24px;
}
.header-cta .btn { padding: 10px 18px; font-size: 0.88rem; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  padding: 100px 0 90px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 20%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(138, 74, 84, 0.5) 0%, rgba(58, 40, 42, 0.68) 100%);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: #e6c3c8;
  font-weight: 700;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 20px;
  color: #fff;
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.hero .btn-outline:hover { border-color: #fff; }

/* Sections */
section { padding: 90px 0; scroll-margin-top: 88px; }
section h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  text-align: center;
}
.section-lead {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--text-soft);
}

/* Services */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}
.price-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.price-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.price-card .price {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.price-card .price span {
  font-size: 1rem;
  font-family: 'Manrope', sans-serif;
  color: var(--text-soft);
  font-weight: 500;
  -webkit-text-fill-color: var(--text-soft);
}
.price-desc { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 0; }
.price-note {
  text-align: center;
  max-width: 640px;
  margin: 32px auto 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* About */
.about { background: var(--bg-alt); }
.about-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}
.about-photo { position: sticky; top: 100px; }
.about-photo > img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.cert-badge {
  display: block;
  position: relative;
  margin-top: 16px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cert-badge img {
  width: 100%;
  display: block;
  filter: brightness(0.85);
}
.cert-badge span {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(13, 12, 16, 0.75);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  padding: 8px;
}
.about-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.about-list {
  margin: 0 0 20px;
  padding-left: 20px;
}
.about-list li { margin-bottom: 10px; color: var(--text-soft); }

/* Device */
.device-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}
.device-photo img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  background: #fff;
}
.device-list {
  margin: 0;
  padding-left: 20px;
}
.device-list li { margin-bottom: 12px; color: var(--text-soft); }
.device-list strong { color: var(--text); }

/* Gallery */
.gallery { background: var(--bg-alt); }
.gallery-carousel {
  position: relative;
  margin: 0 -24px;
}
.gallery-grid {
  --item-w: min(420px, 70vw);
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 32px calc(50% - (var(--item-w) / 2));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery-grid::-webkit-scrollbar { display: none; }
.gallery-item {
  position: relative;
  flex: 0 0 var(--item-w);
  scroll-snap-align: center;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow);
  opacity: 0.45;
  transform: scale(0.82);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.gallery-item.is-active {
  opacity: 1;
  transform: scale(1.12);
  z-index: 2;
  box-shadow: 0 20px 45px rgba(43, 35, 32, 0.22);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 5;
}
.gallery-nav:hover { color: var(--accent-dark); border-color: var(--accent-solid); }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
@media (max-width: 640px) {
  .gallery-nav { display: none; }
}
.watermarked::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='140'><text x='0' y='75' font-family='Manrope, sans-serif' font-size='22' font-weight='700' fill='white' fill-opacity='0.38' transform='rotate(-28 130 70)'>ACADEM EPIL</text></svg>");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* FAQ */
.faq-item {
  max-width: 800px;
  margin: 0 auto 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 6px 28px;
  box-shadow: var(--shadow);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 32px 20px 0;
  font-weight: 700;
  font-size: 1.05rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 18px;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-solid);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body {
  padding: 0 0 24px;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.faq-body ul, .faq-body ol { margin: 0 0 16px; padding-left: 20px; }
.faq-body li { margin-bottom: 6px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body strong { color: var(--text); }

/* Reviews */
.reviews { background: var(--bg-alt); }
.rating-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 48px;
  flex-wrap: wrap;
}
.rating-score {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
}
.rating-stars { color: #ff9f43; letter-spacing: 2px; }
.rating-count { color: var(--text-soft); font-size: 0.9rem; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.review-author {
  margin: 0;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.95rem;
}
.review-stars { color: #ff9f43; letter-spacing: 2px; font-size: 0.9rem; white-space: nowrap; }
.review-text { color: var(--text); font-size: 0.95rem; margin-bottom: 0; }
.review-text.js-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-text.js-clamp.expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.review-toggle {
  display: block;
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.review-toggle:hover { text-decoration: underline; }
.reviews-link {
  display: block;
  width: fit-content;
  margin: 40px auto 0;
}

/* Contacts */
.contacts-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: none; }
.contact-list span:first-child {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}
.contact-list a { color: var(--accent-dark); font-weight: 600; }
.contacts-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contacts-cta .btn { text-align: center; }

/* Footer */
.site-footer {
  background: var(--dark);
  color: #cfc9d6;
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}
.footer-note { color: #b8a9a3; }

/* Floating CTA */
.floating-ctas {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 60;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.floating-ctas.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.floating-cta {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(138, 74, 84, 0.4);
}
.floating-cta-tg { background: var(--accent-dark); }
.floating-cta:hover { filter: brightness(1.08); }

/* Responsive */
@media (max-width: 860px) {
  .contacts-inner { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 320px; margin: 0 auto 32px; }
  .device-inner { grid-template-columns: 1fr; }
  .device-photo { max-width: 380px; margin: 0 auto 32px; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav.open { max-height: 360px; overflow-y: auto; }
  .nav a {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .header-cta { display: none; }
  .burger { display: flex; }
  section { padding: 60px 0; }
  .hero { padding: 88px 0 56px; }
  .eyebrow { margin-bottom: 10px; }
  .hero h1 { margin-bottom: 14px; }
  .hero-sub { margin-bottom: 22px; }
  .hero-actions { gap: 12px; }
}
