/* ==========================================================
   Landing Page PMB SD YIMI Gresik — Neuromorphism UI
   Biru langit + putih. Mobile-first.
   ========================================================== */

:root {
  --sky: #38BDF8;
  --primary: #0284C7;
  --primary-btn: #0369A1;   /* varian lebih gelap agar teks putih lolos kontras AA */
  --deep: #075985;
  --soft: #E0F2FE;
  --bg: #F4F9FF;
  --white: #FFFFFF;
  --text: #0F172A;
  --text-2: #475569;        /* sedikit lebih gelap dari #64748B demi kontras AA di atas latar biru muda */
  --text-muted: #64748B;
  --green: #15803D;         /* varian #16A34A yang lolos kontras dengan teks putih */
  --danger: #B91C1C;

  --r-sm: 14px;
  --r: 20px;
  --r-lg: 24px;

  --sh-out: 8px 8px 18px rgba(56, 130, 190, .16), -8px -8px 18px rgba(255, 255, 255, .95);
  --sh-out-sm: 5px 5px 12px rgba(56, 130, 190, .15), -5px -5px 12px rgba(255, 255, 255, .95);
  --sh-in: inset 4px 4px 9px rgba(56, 130, 190, .16), inset -4px -4px 9px rgba(255, 255, 255, .95);
  --sh-press: inset 3px 3px 7px rgba(0, 0, 0, .18), inset -2px -2px 6px rgba(255, 255, 255, .15);

  --font: "Plus Jakarta Sans", "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--primary-btn); }
a:hover { color: var(--deep); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--deep); letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 6vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 4.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, 1120px); margin-inline: auto; }
.container-narrow { width: min(100% - 32px, 760px); }
.center { text-align: center; margin-top: 2rem; }

:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--deep); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 249, 255, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px rgba(56, 130, 190, .12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--deep); }
.brand-logo { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1rem; font-weight: 800; }
.brand-text small { font-size: .75rem; color: var(--text-2); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font: 700 1rem/1.2 var(--font);
  text-decoration: none; text-align: center;
  border: 0; border-radius: var(--r); cursor: pointer;
  color: var(--deep); background: var(--bg);
  box-shadow: var(--sh-out-sm);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-press); }
.btn-primary { background: linear-gradient(145deg, #0369A1, #075985); color: #fff; box-shadow: 6px 6px 14px rgba(7, 89, 133, .3), -4px -4px 10px rgba(255, 255, 255, .9); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-wa { background: linear-gradient(145deg, #16A34A, #15803D); color: #fff; box-shadow: 6px 6px 14px rgba(21, 128, 61, .28), -4px -4px 10px rgba(255, 255, 255, .9); }
.btn-wa:hover { color: #fff; filter: brightness(1.08); }
.btn-primary:active, .btn-wa:active { box-shadow: var(--sh-press); }
.btn-header { min-height: 44px; padding: 10px 16px; font-size: .9rem; white-space: nowrap; }
.btn-block { width: 100%; }
.icon { width: 22px; height: 22px; flex: none; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: linear-gradient(180deg, var(--soft) 0%, var(--bg) 100%); }
.section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--text-2); margin: 0; }
.note { text-align: center; color: var(--text-2); font-size: .95rem; margin: 28px 0 0; }

/* ---------- Hero ---------- */
.hero { padding: 36px 0 56px; background: radial-gradient(900px 400px at 85% -10%, var(--soft), transparent 70%), var(--bg); }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.badge {
  display: inline-block; padding: 8px 16px; margin-bottom: 18px;
  font-size: .82rem; font-weight: 700; color: var(--deep);
  background: var(--bg); border-radius: 999px; box-shadow: var(--sh-out-sm);
}
.lead { font-size: 1.05rem; color: var(--text-2); max-width: 56ch; }
.cta-row { display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.trust-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trust-list li {
  padding: 8px 14px; font-size: .85rem; font-weight: 600; color: var(--deep);
  background: var(--bg); border-radius: 999px; box-shadow: var(--sh-in);
}

.hero-visual { position: relative; padding: 0 0 28px; }
.photo-frame { padding: 12px; background: var(--bg); border-radius: var(--r-lg); box-shadow: var(--sh-out); }
.photo-frame img { width: 100%; border-radius: var(--r); aspect-ratio: 16 / 9; object-fit: cover; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px; font-size: .85rem; font-weight: 700; color: var(--deep);
  background: var(--bg); border-radius: var(--r); box-shadow: var(--sh-out-sm);
  animation: floaty 6s ease-in-out infinite;
}
.float-card-a { left: 8px; bottom: 0; }
.float-card-b { right: 8px; bottom: 36px; animation-delay: -3s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Cards ---------- */
.card-grid, .program-grid { display: grid; gap: 22px; }
.card {
  padding: 26px; background: var(--bg); border-radius: var(--r);
  box-shadow: var(--sh-out); transition: transform .25s ease;
}
.card:hover { transform: translateY(-4px); }
.card p { margin: 0; color: var(--text-2); }
.card-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px;
  color: var(--primary); background: var(--bg); border-radius: 18px; box-shadow: var(--sh-in);
}
.card-icon svg { width: 28px; height: 28px; }
.program h3 { color: var(--primary-btn); }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 18px; grid-template-columns: 1fr; }
.gallery figure {
  margin: 0; padding: 8px; background: var(--bg); border-radius: var(--r); box-shadow: var(--sh-out-sm);
}
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: calc(var(--r) - 6px); }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.steps li {
  display: flex; gap: 16px; align-items: flex-start; padding: 22px;
  background: var(--bg); border-radius: var(--r); box-shadow: var(--sh-out-sm);
}
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; color: var(--text-2); }
.step-no {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px;
  font-weight: 800; color: var(--deep); background: var(--bg); border-radius: 50%; box-shadow: var(--sh-in);
}

/* ---------- FAQ ---------- */
.accordion { display: grid; gap: 16px; }
.acc-item { background: var(--bg); border-radius: var(--r); box-shadow: var(--sh-out-sm); }
.acc-item h3 { margin: 0; font-size: 1rem; }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 56px; padding: 16px 20px; text-align: left;
  font: 700 1rem/1.4 var(--font); color: var(--deep);
  background: transparent; border: 0; border-radius: var(--r); cursor: pointer;
}
.acc-trigger[aria-expanded="true"] { box-shadow: var(--sh-in); }
.acc-icon { position: relative; flex: none; width: 22px; height: 22px; }
.acc-icon::before, .acc-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2.500px;
  background: var(--primary); border-radius: 2px; transform: translate(-50%, -50%); transition: transform .25s ease;
}
.acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-trigger[aria-expanded="true"] .acc-icon::after { transform: translate(-50%, -50%) rotate(0); }
.acc-panel { padding: 4px 20px 20px; color: var(--text-2); animation: fadeIn .25s ease; }
.acc-panel[hidden] { display: none; }
.acc-panel p { margin: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Form ---------- */
.form-card { padding: 26px; background: var(--bg); border-radius: var(--r-lg); box-shadow: var(--sh-out); }
.field { margin-bottom: 18px; }
label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .95rem; color: var(--deep); }
.req { color: var(--danger); }
.opt { font-weight: 500; color: var(--text-muted); }
input, textarea {
  width: 100%; padding: 14px 16px; min-height: 48px;
  font: 500 1rem/1.4 var(--font); color: var(--text);
  background: var(--bg); border: 2px solid transparent; border-radius: var(--r-sm);
  box-shadow: var(--sh-in); transition: border-color .2s ease;
}
textarea { resize: vertical; min-height: 110px; }
input::placeholder { color: var(--text-muted); }
input:focus, textarea:focus { outline: none; border-color: var(--primary); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.error { min-height: 0; margin: 6px 0 0; font-size: .85rem; font-weight: 600; color: var(--danger); }
.error:empty { display: none; }
.form-note { margin: 16px 0 0; font-size: .85rem; color: var(--text-2); }
.form-status { margin: 12px 0 0; font-size: .9rem; font-weight: 600; color: var(--deep); }
.form-status:empty { display: none; }

/* ---------- CTA penutup ---------- */
.final-cta { padding-top: 24px; }
.cta-card {
  padding: 40px 24px; text-align: center; border-radius: var(--r-lg);
  background: linear-gradient(145deg, #0369A1, #075985); color: #fff;
  box-shadow: 10px 10px 24px rgba(7, 89, 133, .28), -8px -8px 20px rgba(255, 255, 255, .9);
}
.cta-card h2 { color: #fff; }
.cta-card p { max-width: 56ch; margin-inline: auto; color: #E0F2FE; }
.cta-center { align-items: center; justify-content: center; margin-bottom: 0; }
.cta-card .btn-primary { background: #fff; color: var(--deep); box-shadow: 4px 4px 10px rgba(0, 0, 0, .2); }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 28px; background: var(--soft); color: var(--text-2); }
.footer-grid { display: grid; gap: 28px; }
.footer-brand address { margin-top: 12px; font-style: normal; font-size: .95rem; max-width: 34ch; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a, .footer-contact a { color: var(--deep); font-weight: 600; }
.footer-contact p { margin: 4px 0; }
.footer-contact strong { color: var(--deep); }
.footer-copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(7, 89, 133, .15); font-size: .85rem; }
.footer-copy p { margin: 0; }

/* ---------- Floating WhatsApp (mobile) ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 12px 20px; border-radius: 999px;
  font-weight: 800; color: #fff; text-decoration: none;
  background: linear-gradient(145deg, #16A34A, #15803D);
  box-shadow: 0 8px 20px rgba(21, 128, 61, .4);
  transition: opacity .25s ease, transform .25s ease;
}
.wa-float:hover { color: #fff; }
.wa-float.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
body { padding-bottom: 0; }

/* ---------- Reveal animation (progressive enhancement) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Breakpoints ---------- */
@media (min-width: 600px) {
  .cta-row { flex-direction: row; flex-wrap: wrap; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .section { padding: 88px 0; }
  .hero { padding: 64px 0 88px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .program-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { flex-direction: column; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .form-card { padding: 36px; }
  .wa-float { display: none; }
  .brand-text strong { font-size: 1.1rem; }
}

@media (max-width: 899px) {
  /* beri ruang agar tombol melayang tidak menutupi footer */
  .site-footer { padding-bottom: 96px; }
}

@media (max-width: 380px) {
  .brand-text small { display: none; }
  .btn-header { padding: 10px 12px; font-size: .85rem; }
}

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