/* ========================================================
   KYVERA INTERNATIONAL EDUCATION — DESIGN SYSTEM
   Colors:  charcoal bg #14161C / #1B1E27, orange #FF7A45, blue #3DA9FC
   Type:    Space Grotesk (display) + Inter (body)
   ======================================================== */

:root {
  --bg: #14161C;
  --bg-alt: #1B1E27;
  --bg-elevated: #20232D;
  --line: rgba(255,255,255,0.08);
  --text: #F5F3EE;
  --text-muted: #9BA0AE;
  --orange: #FF7A45;
  --blue: #3DA9FC;
  --grad: linear-gradient(135deg, var(--orange), var(--blue));
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.7rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color .25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--grad);
  color: #14161C;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,122,69,0.35); }
.btn-outline {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  padding: 0.6rem 1.3rem;
  font-size: 0.88rem;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-large { padding: 1.1rem 2.4rem; font-size: 1.05rem; margin-top: 1.6rem; }

/* ---------- Background drifting glow ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
  will-change: transform;
}
.blob-orange {
  width: 46vw; height: 46vw;
  background: var(--orange);
  top: -10%; left: -10%;
  animation: drift1 26s ease-in-out infinite;
}
.blob-blue {
  width: 40vw; height: 40vw;
  background: var(--blue);
  bottom: -15%; right: -10%;
  animation: drift2 32s ease-in-out infinite;
}
@keyframes drift1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-6vw, -8vh) scale(1.1); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20,22,28,0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  gap: 1.8rem;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 5.5rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-sub { margin-top: 1.3rem; max-width: 46ch; font-size: 1.05rem; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.portrait-frame {
  position: relative;
  width: min(320px, 80vw);
  border-radius: 20px;
  padding: 3px;
  background: var(--grad);
  opacity: 0;
  transform: scale(0.94);
  animation: portraitReveal 1.1s cubic-bezier(.2,.8,.2,1) 0.3s forwards;
}
@keyframes portraitReveal {
  to { opacity: 1; transform: scale(1); }
}
.portrait-svg { border-radius: 18px; width: 100%; }
.glow-ring {
  position: absolute;
  inset: -18px;
  border-radius: 30px;
  background: var(--grad);
  filter: blur(40px);
  opacity: 0.35;
  z-index: -1;
}
.portrait-caption { font-size: 0.78rem; color: var(--text-muted); text-align: center; max-width: 240px; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Stats ---------- */
.stats {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Section head ---------- */
.section-head { max-width: var(--container); margin: 0 auto; padding: 0 2rem; text-align: left; margin-bottom: 2.5rem; }
.section-head p { margin-top: 0.5rem; }

/* ---------- Services ---------- */
.services { max-width: var(--container); margin: 0 auto; padding: 6rem 2rem; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.service-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.service-card:hover { transform: translateY(-4px); border-color: rgba(255,122,69,0.4); }
.service-icon { width: 42px; height: 42px; margin-bottom: 1rem; }
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { font-size: 0.92rem; }

/* ---------- Success stories ---------- */
.stories { max-width: var(--container); margin: 0 auto; padding: 2rem 2rem 6rem; }
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.story-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.story-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.story-media {
  height: 150px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  position: relative;
  overflow: hidden;
}
.story-media::before {
  content: var(--flag);
  filter: grayscale(0.15);
  transition: transform 0.4s ease;
}
.story-card:hover .story-media::before { transform: scale(1.15); }
.story-info { padding: 1.1rem 1.3rem 1.4rem; }
.story-info h4 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 0.3rem; }
.story-info p { font-size: 0.86rem; }
.stories-cta { text-align: center; margin-top: 2.5rem; }

/* ---------- Testimonials ---------- */
.testimonials { max-width: var(--container); margin: 0 auto; padding: 2rem 2rem 6rem; }
.testimonial-slider { max-width: 700px; margin: 0 auto; text-align: center; }
.testimonial-track { position: relative; min-height: 150px; }
.testimonial {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.testimonial.active { opacity: 1; transform: translateX(0); pointer-events: auto; position: relative; }
.testimonial p { font-size: 1.2rem; color: var(--text); font-family: var(--font-display); font-weight: 500; line-height: 1.5; }
.testimonial cite { display: block; margin-top: 1.2rem; font-style: normal; font-size: 0.85rem; color: var(--text-muted); }
.testimonial-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 2rem; }
.testimonial-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; background: var(--line); cursor: pointer; transition: background 0.3s ease;
}
.testimonial-dots button.active { background: var(--grad); width: 22px; border-radius: 5px; }

/* ---------- Partners marquee ---------- */
.partners { padding: 3rem 0 5rem; border-top: 1px solid var(--line); }
.partners-label { text-align: center; font-size: 0.85rem; margin-bottom: 1.6rem; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: scroll-left 28s linear infinite;
}
.marquee-track span { font-family: var(--font-display); font-size: 1.05rem; color: var(--text-muted); white-space: nowrap; }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Final CTA ---------- */
.cta-final {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 2rem 7rem;
  text-align: center;
}
.cta-final p { margin-top: 0.8rem; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand p { margin-top: 0.6rem; font-size: 0.88rem; max-width: 30ch; }
.footer-links h5, .footer-contact h5 { font-family: var(--font-display); font-size: 0.85rem; margin-bottom: 1rem; color: var(--text); }
.footer-links a { display: block; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.6rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--orange); }
.footer-contact p { font-size: 0.88rem; margin-bottom: 0.5rem; }
.social-icons { display: flex; gap: 0.9rem; margin-top: 1rem; }
.social-icons a { color: var(--text-muted); transition: color 0.2s ease; }
.social-icons a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid var(--line); padding: 1.3rem 2rem; text-align: center; }
.footer-bottom p { font-size: 0.78rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .hero-visual { order: -1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
}
@media (max-width: 560px) {
  .service-grid, .story-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .marquee-track, .portrait-frame { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
