/* AI Untuk Indonesia Naik Kelas — landing page
   Design tokens carried over from the source "Broadsheet" system:
   Source Serif 4, warm paper neutrals, teal/magenta accents. */

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-surface-2: #ffffff;
  --color-text: #201e1d;
  --color-accent: #0088b0;
  --color-accent-600: #1186ac;
  --color-accent-700: #006786;
  --color-accent-2: #d6006c;
  --color-divider: rgba(32, 30, 29, 0.16);

  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;

  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;
  --space-6: 30px;
  --space-8: 40px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 2px rgba(32, 30, 29, 0.14);
  --shadow-md: 0 6px 20px rgba(32, 30, 29, 0.14);
  --shadow-lg: 0 24px 60px rgba(32, 30, 29, 0.22);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 420ms;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0; }
a { color: var(--color-accent-700); }
img { display: block; max-width: 100%; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px);
}

.text-muted { color: rgba(32, 30, 29, 0.68); }

/* — nav — */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(243, 242, 242, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out);
}
.nav.is-scrolled {
  border-bottom-color: var(--color-divider);
  background: rgba(243, 242, 242, 0.92);
}
.nav-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  margin-right: auto;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav a.nav-link {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  position: relative;
}
.nav a.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1px;
  background: var(--color-accent);
  transition: right var(--dur-fast) var(--ease-out);
}
.nav a.nav-link:hover::after { right: 0; }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* — buttons — */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-accent-600); }
.btn-primary:active:not(:disabled) { background: var(--color-accent-700); }
.btn-ghost { color: var(--color-accent-700); padding-inline: 10px; }
.btn-ghost:hover { background: rgba(0, 136, 176, 0.1); }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — hero — */
.hero {
  padding: clamp(72px, 12vw, 128px) 0 72px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--color-accent-700); }
.hero p.lede {
  font-size: 17px;
  line-height: 1.65;
  max-width: 58ch;
  margin-top: 28px;
  color: rgba(32, 30, 29, 0.85);
}
.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: 30px;
}

/* reveal-on-scroll + hero entrance */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 90ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* — stats strip — */
.stats {
  padding: 36px 0 44px;
  border-top: 2px solid var(--color-text);
  border-bottom: 1px solid var(--color-text);
}
.stats-labels {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0 0 18px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(32, 30, 29, 0.65);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 28px;
}
.stat b {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  color: var(--color-accent-700);
  letter-spacing: -0.01em;
}
.stat span {
  display: block;
  font-size: 13.5px;
  margin-top: 4px;
  color: rgba(32, 30, 29, 0.75);
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* — feature cards — */
.section { padding: 84px 0; }
.section-kicker {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(32, 30, 29, 0.65);
  margin-bottom: 16px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 48px;
  margin-top: 16px;
}
.cards h3 { font-size: 22px; line-height: 1.25; }
.cards p { font-size: 15.5px; line-height: 1.75; margin-top: 14px; color: rgba(32, 30, 29, 0.8); }
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
}

/* — data / cover section — */
.data-section {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px 64px;
  align-items: center;
}
.data-section h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; margin-top: 6px; }
.data-section p { font-size: 15.5px; line-height: 1.75; margin-top: 16px; max-width: 48ch; color: rgba(32, 30, 29, 0.8); }
@media (max-width: 860px) {
  .data-section { grid-template-columns: 1fr; }
}

.cover-figure {
  margin: 0;
  perspective: 1200px;
}
.cover-frame {
  position: relative;
  aspect-ratio: 989 / 1400;
  max-width: 390px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotateX(2deg) rotateY(-6deg);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
  will-change: transform;
}
.cover-frame:hover {
  transform: rotateX(0deg) rotateY(0deg) scale(1.015);
}
.cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* — image carousel — */
.gallery-section { padding-top: 20px; }
.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.gallery-heading .section-kicker { margin-bottom: 8px; }
.gallery-heading h2 { font-size: clamp(26px, 3vw, 34px); }
.carousel-controls { display: flex; gap: 8px; }
.carousel-button,
.carousel-dot {
  border: 1px solid var(--color-divider);
  cursor: pointer;
  background: var(--color-surface-2);
  color: var(--color-text);
}
.carousel-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.carousel-button:hover { background: var(--color-accent); color: #fff; }
.carousel-button:active { transform: scale(0.94); }
.carousel-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.carousel { overflow: hidden; border-radius: var(--radius-lg); background: var(--color-surface); }
.carousel-track { display: flex; transition: transform 480ms var(--ease-out); }
.carousel-slide { flex: 0 0 100%; margin: 0; display: grid; place-items: center; min-height: 420px; padding: clamp(20px, 4vw, 48px); }
.carousel-slide img { width: auto; height: min(70vh, 620px); max-width: 100%; object-fit: contain; box-shadow: var(--shadow-md); }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel-dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.carousel-dot.is-active { background: var(--color-accent); border-color: var(--color-accent); transform: scale(1.35); }
.carousel-button:focus-visible, .carousel-dot:focus-visible, .carousel:focus-visible { outline: 3px solid rgba(0, 136, 176, 0.3); outline-offset: 3px; }
@media (max-width: 600px) {
  .gallery-heading { align-items: start; }
  .carousel-slide { min-height: 360px; padding: 20px; }
  .carousel-slide img { height: min(68vh, 500px); }
}

/* — quote — */
.quote-section { padding: 76px 0 92px; }
blockquote {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.4;
  max-width: 34ch;
  margin: 0;
  color: var(--color-text);
}
.quote-cite {
  display: block;
  font-size: 15.5px;
  margin-top: 28px;
  color: rgba(32, 30, 29, 0.7);
}

/* — download / lead-gate — */
.download-section {
  padding: 76px 0 88px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  margin: 0 0 40px;
}
.download-inner { padding: 0 clamp(28px, 4vw, 56px); }
.download-section h3 { font-size: clamp(24px, 2.6vw, 30px); }
.download-section > .download-inner > p { font-size: 15.5px; line-height: 1.75; margin-top: 16px; max-width: 58ch; color: rgba(32, 30, 29, 0.8); }

.lead-form {
  margin-top: 30px;
  max-width: 520px;
}
.field-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.field { flex: 1; min-width: 220px; }
.field label {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  color: rgba(32, 30, 29, 0.7);
}
.input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder { color: rgba(32, 30, 29, 0.45); }
.input:hover { border-color: rgba(32, 30, 29, 0.4); }
.input:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 136, 176, 0.15);
}
.input.is-invalid { border-color: var(--color-accent-2); }

.hint {
  font-size: 13px;
  color: rgba(32, 30, 29, 0.6);
  margin-top: 10px;
}
.hint.error { color: var(--color-accent-2); }

.form-submit-row {
  margin-top: 8px;
}

.btn-primary .spinner {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-primary.is-loading .spinner { display: inline-block; }
.btn-primary.is-loading .btn-label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* success state */
.lead-success {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  max-width: 520px;
  padding: 18px 20px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  animation: rise 480ms var(--ease-out);
}
.lead-success.is-visible { display: flex; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.check-badge {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--color-accent);
  display: grid;
  place-items: center;
}
.check-badge svg { width: 18px; height: 18px; stroke: #fff; }
.check-badge path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw 420ms var(--ease-out) 200ms forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.lead-success-text strong { display: block; font-family: var(--font-heading); font-size: 15.5px; }
.lead-success-text span { display: block; font-size: 13.5px; color: rgba(32, 30, 29, 0.7); margin-top: 3px; }

.lead-pending .lead-success-text span { color: var(--color-accent-2); }

/* — footer — */
footer.site-footer {
  padding: 48px 0 64px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(32, 30, 29, 0.65);
  border-top: 1px solid var(--color-divider);
}
footer.site-footer a { color: inherit; }
