/* Landing Kelas Coding — Yippy Edu. Palet & tipografi mengikuti style guide workspace. */
:root {
  --primary: #563f7a;
  --primary-dark: #3d2c5a;
  --action: #ef8f00;
  --action-hover: #d67f00;
  --yellow: #fdcb12;
  --canvas: #fcfbf8;
  --surface: #ffffff;
  --border: #e5e5e5;
  --text: #201c23;
  --muted: #6b6670;
  --tint: #f6f1fa;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(32, 28, 35, 0.06);
  --shadow-md: 0 10px 28px rgba(61, 44, 90, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Poppins', 'Avenir Next', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1184px, 100% - 2 * clamp(20px, 4vw, 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  text-decoration: none;
}

.brand img {
  width: 56px;
  height: auto;
}

.brand-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
}

.brand-label {
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.nav {
  display: none;
  gap: 4px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  background: #f2edf6;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
}

/* Buttons — kontras dijaga: ungu + putih, atau kuning + teks gelap. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 0 rgba(61, 44, 90, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 14px rgba(61, 44, 90, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary-dark);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #f7f3fa;
}

.btn-light {
  background: var(--yellow);
  color: #201c23;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

.btn-light:hover {
  background: #ffd93d;
}

.btn-sm {
  min-height: 42px;
  padding: 0 20px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding-block: clamp(32px, 6vw, 72px);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  font-weight: 800;
}

.lead {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 58ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: flex;
  flex-direction: column;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.chips strong {
  font-size: 1.25rem;
  line-height: 1.2;
}

.chips span {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Skeleton image */
.skel {
  position: relative;
  overflow: hidden;
  background: var(--border);
  border-radius: var(--radius-xl);
}

.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.65) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skel.is-loaded img {
  opacity: 1;
}

.skel.is-loaded::after,
.skel.is-error::after {
  display: none;
}

.skel.is-error img {
  display: none;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.hero-art .skel,
.path-art {
  box-shadow: var(--shadow-md);
}

/* Sections */
.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: clamp(28px, 5vw, 56px);
  scroll-margin-top: 72px;
}

.section h2,
.closing h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  line-height: 1.15;
  font-weight: 800;
}

.section-lead {
  color: var(--muted);
  max-width: 62ch;
}

.tint {
  padding-inline: clamp(20px, 4vw, 48px);
  border-radius: var(--radius-xl);
  background: var(--tint);
  margin-block: 8px;
}

/* Ways */
.ways {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.way {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .way {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
  }
}

.way--layar {
  background: #f3f8ff;
}

.way--offscreen {
  background: #f1fbf5;
}

.way--project {
  background: #fff8e6;
}

.way-media {
  max-width: 180px;
  border-radius: var(--radius-md);
}

.way-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.way-copy h3 {
  font-size: 1.25rem;
}

.way-copy p {
  color: var(--muted);
  max-width: 60ch;
}

.tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.path-art {
  margin-block: 12px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.steps h3 {
  font-size: 1.0625rem;
}

.steps p {
  font-size: 0.9375rem;
  color: var(--muted);
}

.num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

/* Badges */
.badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .badges {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .badges {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.badges li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badges li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.badges img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
  margin-top: 8px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 4px 18px;
}

.faq summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-dark);
}

.faq details[open] summary {
  margin-bottom: 4px;
}

.faq p {
  padding-bottom: 14px;
  color: var(--muted);
}

/* Closing — semua teks eksplisit putih di atas ungu. */
.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-block: 24px 56px;
  padding: clamp(32px, 6vw, 64px) 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, #563f7a 0%, #3d2c5a 100%);
  color: #ffffff;
  text-align: center;
}

.closing h2 {
  color: #ffffff;
}

.closing p {
  max-width: 48ch;
  color: rgba(255, 255, 255, 0.88);
}

.closing img {
  width: 96px;
  height: auto;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: #ffffff;
}

/* Footer */
.site-footer {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (max-width: 599px) {
  .brand-divider,
  .brand-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .skel::after {
    animation: none;
  }
  .skel img,
  .badges li,
  .btn {
    transition: none;
  }
}
