/* ============================================================
   Tabix — Онлайн-курсы лепки из полимерной глины
   Stylesheet
   ============================================================ */

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

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: #FAF8F5;
  color: #3E3029;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ---- VARIABLES ---- */
:root {
  --bg:        #FAF8F5;
  --fg:        #3E3029;
  --primary:   #B5614A;
  --primary-h: #9E5040;
  --primary-fg:#FFFFFF;
  --secondary: #8FA882;
  --muted-bg:  #F2EDE5;
  --muted-fg:  #7A6A5A;
  --card-bg:   #FFFFFF;
  --border:    #DDD5C8;
  --accent-bg: #EDD9CE;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.07);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.08);
  --transition: .25s ease;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { font-family: 'Lora', serif; line-height: 1.2; color: var(--fg); }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 500; }
p  { color: var(--muted-fg); }

.section-label {
  font-family: 'Nunito', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}

/* ---- LAYOUT ---- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 80px 0; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 2rem;
  border-radius: 9999px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 2px 10px rgba(181,97,74,.3);
}
.btn-primary:hover { background: var(--primary-h); box-shadow: 0 4px 16px rgba(181,97,74,.35); }

.btn-outline {
  background: rgba(255,255,255,.6);
  color: var(--fg);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(6px);
}
.btn-outline:hover { background: var(--muted-bg); }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}
.navbar.scrolled {
  background: rgba(250,248,245,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  padding: .75rem 0;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-logo {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  transition: opacity var(--transition);
}
.navbar-logo:hover { opacity: .8; }
.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.navbar-links a, .navbar-links button {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted-fg);
  transition: color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.navbar-links a:hover, .navbar-links button:hover { color: var(--primary); }
.navbar-cta { font-size: .9rem !important; padding: .6rem 1.4rem; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .menu-toggle { display: flex; }
  .navbar-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(250,248,245,.97);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .navbar-cta { width: 100%; justify-content: center; }
}

/* ---- HERO ---- */
#hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
#hero .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#hero .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .38;
  mix-blend-mode: multiply;
}
#hero .hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--bg) 38%, rgba(250,248,245,.7) 65%, transparent 100%);
}
#hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 600px; }
.hero-title { margin-bottom: 1.25rem; }
.hero-title em {
  font-style: italic;
  color: var(--primary);
}
.hero-desc {
  font-size: 1.15rem;
  margin-bottom: 2.25rem;
  max-width: 480px;
  color: var(--muted-fg);
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  opacity: .5;
  animation: bounce 2s infinite;
}
.hero-scroll svg { width: 24px; height: 24px; color: var(--fg); }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---- ABOUT CRAFT ---- */
#about { background: var(--muted-bg); }
#about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(221,213,200,.6);
}
.about-img-wrap img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.about-img-blob {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  background: var(--accent-bg);
  filter: blur(32px);
  opacity: .7;
  z-index: -1;
}
.about-text h2 { margin-bottom: 1rem; }
.about-text p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.about-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.about-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--fg);
  font-size: .97rem;
}
.about-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 9999px;
  background: rgba(143,168,130,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--secondary);
}
.about-icon svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
  #about .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img-wrap { order: 1; }
  .about-text { order: 2; }
}

/* ---- PORTFOLIO / RESULTS ---- */
#portfolio .section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}
#portfolio .section-header p { margin-top: .75rem; font-size: 1.05rem; }
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.portfolio-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-md);
  cursor: default;
}
.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}
.portfolio-card:hover img { transform: scale(1.05); }
.portfolio-card-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}
.portfolio-card-caption h3 { color: #fff; font-size: 1.3rem; margin-bottom: .3rem; }
.portfolio-card-caption p  { color: rgba(255,255,255,.8); font-size: .88rem; }

@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* ---- INSTRUCTOR ---- */
#instructor { background: var(--accent-bg); }
.instructor-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.instructor-photo { min-height: 320px; }
.instructor-photo img { width: 100%; height: 100%; object-fit: cover; }
.instructor-body {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.instructor-body h2 { margin-bottom: .75rem; }
.instructor-body p { margin-bottom: 1rem; font-size: 1rem; }
.instructor-social {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.5rem;
}
.instructor-social-avatars { display: flex; }
.instructor-social-avatars img {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  margin-right: -10px;
}
.instructor-social span {
  font-size: .87rem;
  font-weight: 600;
  color: var(--muted-fg);
  margin-left: 18px;
}

@media (max-width: 768px) {
  .instructor-card { grid-template-columns: 1fr; }
  .instructor-photo { min-height: 240px; }
  .instructor-body { padding: 2rem 1.5rem; }
}

/* ---- TESTIMONIALS ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.testimonial-quote {
  font-family: 'Lora', serif;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--primary);
  margin-bottom: .5rem;
}
.testimonial-text {
  font-style: italic;
  font-size: .95rem;
  color: rgba(62,48,41,.8);
  flex: 1;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}
.testimonial-author { font-weight: 700; font-size: .93rem; color: var(--fg); }
.testimonial-role { font-size: .82rem; color: var(--muted-fg); }

@media (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr; } }
@media (min-width: 640px) and (max-width: 900px) { .testimonials-grid { grid-template-columns: 1fr 1fr; } }

/* ---- LEAD FORM ---- */
#lead-form { background: rgba(181,97,74,.04); }
.lead-form-card {
  background: var(--card-bg);
  border: 1px solid rgba(181,97,74,.12);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: center;
}
.lead-form-card::before {
  content: '';
  position: absolute;
  top: -4rem; right: -4rem;
  width: 16rem; height: 16rem;
  border-radius: 9999px;
  background: rgba(181,97,74,.05);
  z-index: 0;
}
.lead-form-text { position: relative; z-index: 1; }
.lead-form-text h2 { margin-bottom: 1rem; }
.lead-form-text p  { margin-bottom: 2rem; font-size: 1.05rem; }
.lead-form-visual img {
  border-radius: var(--radius-md);
  aspect-ratio: 3/4;
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

form .field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
form label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted-fg);
}
form input {
  height: 3rem;
  padding: 0 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--fg);
  background: rgba(250,248,245,.6);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(181,97,74,.12);
}
form input.error { border-color: #C0392B; }
.field-error { font-size: .8rem; color: #C0392B; display: none; }
form input.error + .field-error { display: block; }
.form-submit { width: 100%; margin-top: .5rem; border-radius: var(--radius-sm); }
.form-note {
  font-size: .77rem;
  color: var(--muted-fg);
  text-align: center;
  margin-top: .75rem;
}
.form-note a { text-decoration: underline; }
.form-note a:hover { color: var(--primary); }

.form-success {
  display: none;
  background: rgba(143,168,130,.1);
  border: 1px solid rgba(143,168,130,.3);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}
.form-success.visible { display: block; }
.form-success svg { color: var(--secondary); margin: 0 auto 1rem; width: 48px; height: 48px; }
.form-success h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.form-success p  { font-size: .95rem; }
#lead-form-el.hidden { display: none; }

@media (max-width: 768px) {
  .lead-form-card { grid-template-columns: 1fr; padding: 2rem 1.5rem; }
  .lead-form-visual { display: none; }
}

/* ---- FAQ ---- */
#faq .section-header { text-align: center; margin-bottom: 3rem; }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--primary); }
.faq-chevron {
  flex-shrink: 0;
  width: 20px; height: 20px;
  transition: transform .3s ease;
  color: var(--muted-fg);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}
.faq-answer-inner { padding: 0 1.5rem 1.25rem; color: var(--muted-fg); font-size: .97rem; line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 300px; }

/* ---- SECTION HEADER (shared) ---- */
.section-header h2 { margin-bottom: .5rem; }

/* ---- FOOTER ---- */
footer {
  background: var(--muted-bg);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .footer-logo {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-block;
  margin-bottom: 1rem;
}
.footer-brand p { font-size: .9rem; max-width: 280px; }
.footer-col h4 {
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .7rem; }
.footer-col ul li a {
  font-size: .88rem;
  color: var(--muted-fg);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--primary); }
.footer-col address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .88rem;
  color: var(--muted-fg);
}
.footer-bottom {
  border-top: 1px solid rgba(221,213,200,.5);
  padding-top: 1.5rem;
  text-align: center;
  font-size: .83rem;
  color: var(--muted-fg);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---- COOKIE BANNER ---- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(62,48,41,.95);
  backdrop-filter: blur(8px);
  color: #f0ebe3;
  padding: 1rem 1.5rem;
  transform: translateY(100%);
  transition: transform .4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner p { font-size: .88rem; color: rgba(240,235,227,.8); flex: 1; min-width: 240px; }
.cookie-banner a { color: rgba(181,97,74,.9); text-decoration: underline; }
.cookie-banner-actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.cookie-accept {
  padding: .55rem 1.3rem;
  background: var(--primary);
  color: #fff;
  border-radius: 9999px;
  font-size: .88rem;
  font-weight: 700;
  transition: background var(--transition);
  font-family: inherit;
  cursor: pointer;
  border: none;
}
.cookie-accept:hover { background: var(--primary-h); }
.cookie-dismiss {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(240,235,227,.6);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1.25rem;
  line-height: 1;
  font-family: inherit;
  flex-shrink: 0;
}
.cookie-dismiss:hover { color: rgba(240,235,227,1); }

/* ---- LEGAL PAGES ---- */
.legal-page {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: 80vh;
}
.legal-content h1 { color: var(--primary); margin-bottom: 1.5rem; }
.legal-content h2 { font-size: 1.3rem; margin: 2rem 0 .75rem; }
.legal-content p, .legal-content li { color: var(--muted-fg); font-size: 1rem; line-height: 1.75; margin-bottom: .75rem; }
.legal-content ul { list-style: disc; padding-left: 1.5rem; }
.legal-content ul li { margin-bottom: .4rem; }
.legal-box {
  background: var(--muted-bg);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-top: 3rem;
}
.legal-box h3 { font-size: 1.05rem; margin-bottom: .75rem; }
.legal-box p  { font-size: .9rem; color: var(--muted-fg); margin: 0; }

/* ---- SCROLL ANIMATION ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }

/* ---- SUCCESS PAGE ---- */
.success-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  text-align: center;
}
.success-box { max-width: 520px; padding: 1rem; }
.success-icon {
  width: 80px; height: 80px;
  border-radius: 9999px;
  background: rgba(143,168,130,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--secondary);
}
.success-icon svg { width: 40px; height: 40px; }
.success-box h1 { font-size: 2.2rem; margin-bottom: 1rem; }
.success-box p  { font-size: 1.05rem; margin-bottom: 2rem; }
