/* =========================================================
   TERA.OR.ID — HOMEPAGE STYLE
   Style khusus halaman ini. Token warna & font diambil dari CDN
   design-system (lihat brand-tokens.css), struktur footer ada di
   footer-standard.css.
   ========================================================= */

:root {
  /* near-black used behind the hero video cards; not part of the shared
     design-system palette, so it's defined locally here. */
  --ink-dark: #0a1730;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  margin: 0;
}

a {
  font-family: var(--font-sans);
}

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

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------- BUTTONS -------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: var(--radius-button, 4px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.35);
}

/* -------------------- HERO (main) -------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #eef3ff 0%, var(--background) 55%, var(--background) 100%);
}
.hero-glow {
  position: absolute;
  top: -220px;
  right: -60px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217,164,65,0.28) 0%, rgba(217,164,65,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-glow.two {
  top: -120px;
  left: -180px;
  right: auto;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(13,110,253,0.18) 0%, rgba(13,110,253,0) 70%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-max, 1152px);
  margin: 0 auto;
  padding: 128px 24px 0;
}
.hero-main {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 96px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary-dark);
  background: var(--muted-bg);
  border: 1px solid var(--card-border);
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-pill);
  margin: 0 0 28px;
}
.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero-main-text {
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--foreground);
  margin: 0 0 36px;
  text-wrap: balance;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--primary-foreground);
  background: var(--primary);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 26px;
  border-radius: var(--radius-button, 4px);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-hero-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(13,110,253,0.3);
}
.btn-hero-primary svg { width: 15px; height: 15px; }

/* -------------------- HERO CARD SEQUENCE -------------------- */
/* Driven by native page scroll: .hero-pin is tall, its inner box is
   sticky, and JS maps scroll progress to the active card index. */
.hero-pin {
  position: relative;
  z-index: 2;
  height: 700vh; /* long slice of scroll per card; tweak to taste */
}
.hero-pin-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* boxed by default, grows to full-screen mid-run, shrinks back at the ends */
.hero-frame {
  position: relative;
  width: min(1240px, 92vw);
  height: min(640px, 74vh);
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(10,23,48,0.28);
  transition: width 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.75s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.75s ease;
}
.hero-pin.is-full .hero-frame {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
}
.hero-carousel-strip {
  height: 100%;
  transform: translateY(calc(var(--active, 0) * -100%));
  transition: transform 0.85s cubic-bezier(0.5, 0, 0.15, 1);
}
.hero-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px;
  isolation: isolate;
  overflow: hidden;
}
/* gradient placeholder (fallback behind the video) */
.hero-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  display: block;
}
.hero-card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  display: block;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(8,18,38,0.78) 0%, rgba(8,18,38,0.32) 48%, rgba(8,18,38,0) 74%);
}
.hero-card-num {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.8);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-card.is-current .hero-card-num {
  opacity: 0.8;
  transition-delay: 0.12s;
}
/* text fades + rises in on the active card */
.hero-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 680px;
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-card.is-current .hero-card-body {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}
.hero-card p {
  font-weight: 700;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.2;
  margin: 0;
  max-width: 640px;
  text-wrap: balance;
  color: #fff;
  letter-spacing: -0.01em;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--primary-foreground);
  background: var(--primary);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-button, 4px);
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10,23,48,0.28);
}
.hero-cta svg { width: 14px; height: 14px; }

/* dot indicator (not interactive — the sequence advances by scroll) */
.hero-dots {
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 4;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transition: background 0.2s ease, height 0.2s ease;
}
.hero-dot.is-active {
  background: #fff;
  height: 22px;
  border-radius: var(--radius-pill);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,0.85);
  animation: hero-bob 1.8s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.hero-scroll-hint.is-hidden { opacity: 0; }
.hero-scroll-hint svg { width: 18px; height: 18px; }
@keyframes hero-bob {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-hint { animation: none; }
  .hero-carousel-strip,
  .hero-frame,
  .hero-card-body { transition: none; }
}

/* -------------------- STATS -------------------- */
.stats {
  background: var(--card);
  color: var(--foreground);
  padding: 80px 0;
  border-bottom: 1px solid var(--card-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.stat {
  padding: 0 24px;
  border-left: 1px solid var(--card-border);
}
.stat:first-child { border-left: none; }

.stat-number {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

/* -------------------- TESTIMONIALS -------------------- */
.testimonials {
  padding: 88px 0;
}

.section-heading {
  text-align: center;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--primary-dark);
  margin-bottom: 48px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}

.testimonial-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(13, 110, 253, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.testimonial-quote {
  font-size: 15px;
  line-height: 1.7;
  color: var(--foreground);
  flex-grow: 1;
  margin: 0 0 20px;
}

.testimonial-author {
  font-size: 13.5px;
  color: var(--muted);
}

.testimonial-author strong {
  display: block;
  color: var(--foreground);
  font-size: 14.5px;
  margin-bottom: 2px;
}

/* -------------------- FOUNDERS -------------------- */
.founders {
  padding: 88px 0;
  background: var(--background);
}

.founders-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: center;
  max-width: 880px;
  margin: 0 auto;
}

.founder-photo-placeholder {
  width: 220px;
  height: 220px;
  border-radius: 16px;
  background: var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.founder-photo-placeholder svg {
  width: 88px;
  height: 88px;
  color: #ffffff;
}

.founder-name {
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.founder-role {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.founder-story {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 860px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }
  .stat:nth-child(3) { border-left: none; }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .founders-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

@media (max-width: 700px) {
  .hero-inner { padding: 96px 24px 0; }
  .hero-main { padding-bottom: 56px; }
  .hero-card { padding: 30px; }
  .hero-card-body { gap: 22px; }
  .hero-card-num { top: 22px; }
  .hero-dots { right: 16px; }
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }
  .stat { border-left: none; }
}
