/* =====================================================================
   I Can Read Kudus — styles.css
   Palet hangat ramah anak. Mobile-first. Vanilla, tanpa framework.
   ===================================================================== */
:root {
  --red: #e8402c;        /* primary — hangat, energik */
  --red-d: #c7321f;
  --yellow: #ffc21f;     /* aksen ceria */
  --blue: #2ba6e0;       /* aksen sejuk */
  --green: #37b979;
  --ink: #23314e;        /* teks utama (navy lembut) */
  --ink-soft: #5c6b86;   /* teks sekunder */
  --cream: #fff7ef;      /* background hangat */
  --white: #ffffff;
  --line: #ffe3d6;
  --shadow: 0 14px 40px rgba(35, 49, 78, .12);
  --radius: 20px;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 800;
  font-size: 1rem; text-decoration: none; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(232,64,44,.35); }
.btn-primary:hover { background: var(--red-d); transform: translateY(-2px); }
.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 8px 20px rgba(255,194,31,.35); }
.btn-yellow:hover { transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--red); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--red); }

/* ---------- Demo badge ---------- */
.demo-ribbon {
  position: relative; z-index: 60;
  background: var(--ink); color: #fff; text-align: center;
  font-size: .78rem; font-weight: 700; padding: 6px 10px; letter-spacing: .3px;
}
.demo-ribbon span { opacity: .85; font-weight: 600; }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,247,239,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; text-decoration: none; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--red); color: #fff; font-weight: 900; font-size: 1.1rem;
  box-shadow: 0 6px 14px rgba(232,64,44,.3);
}
.logo small { display: block; font-size: .64rem; font-weight: 700; color: var(--red); letter-spacing: 1px; }
.nav-links { display: none; gap: 26px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 700; color: var(--ink); font-size: .95rem; }
.nav-links a:hover { color: var(--red); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* ---------- Hero ---------- */
.hero { padding: 54px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 34px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.badge-pill {
  display: inline-flex; gap: 8px; align-items: center; background: #fff;
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 800; color: var(--red); margin-bottom: 18px;
}
.hero h1 { font-size: 2.3rem; line-height: 1.15; margin: 0 0 16px; font-weight: 900; letter-spacing: -.5px; }
.hero h1 .hl { color: var(--red); position: relative; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px;
  background: var(--yellow); opacity: .5; z-index: -1; border-radius: 4px;
}
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); margin: 0 0 26px; max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-trust { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 20px; font-size: .86rem; color: var(--ink-soft); font-weight: 700; }
.hero-trust b { color: var(--ink); }
@media (min-width: 560px) { .hero h1 { font-size: 2.9rem; } }

/* kartu hero kanan */
.hero-card {
  background: #fff; border-radius: 26px; padding: 26px; box-shadow: var(--shadow);
  border: 1px solid var(--line); position: relative;
}
.hero-card .blob { position: absolute; font-size: 2rem; }
.hero-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.hero-card .sub { color: var(--ink-soft); font-size: .9rem; margin: 0 0 18px; }
.mini-chat { background: var(--cream); border-radius: 16px; padding: 14px; }
.mini-chat .mc-row { display: flex; gap: 8px; margin-bottom: 10px; }
.mini-chat .mc-ava { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; font-size: .85rem; }
.mini-chat .mc-bub { background: #fff; border-radius: 14px; padding: 9px 13px; font-size: .9rem; box-shadow: 0 3px 10px rgba(35,49,78,.06); }
.mini-chat .mc-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.mini-chat .mc-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 700; color: var(--red); }

/* ---------- Section dasar ---------- */
section { padding: 56px 0; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 38px; }
.sec-head .ey { color: var(--red); font-weight: 900; letter-spacing: 1.5px; font-size: .78rem; text-transform: uppercase; }
.sec-head h2 { font-size: 1.9rem; margin: 8px 0 12px; font-weight: 900; letter-spacing: -.5px; }
.sec-head p { color: var(--ink-soft); margin: 0; font-size: 1.04rem; }

/* ---------- AI highlight ---------- */
.ai { background: linear-gradient(160deg, #fff 0%, #fff4ec 100%); }
.ai-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 900px) { .ai-grid { grid-template-columns: .9fr 1.1fr; } }
.ai-feats { display: grid; gap: 14px; }
.ai-feat { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.ai-feat .ic { font-size: 1.6rem; flex: none; }
.ai-feat h4 { margin: 0 0 3px; font-size: 1.02rem; }
.ai-feat p { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.ai-cta-note { font-size: .86rem; color: var(--ink-soft); margin-top: 16px; }

/* ---------- Program cards ---------- */
.cards { display: grid; gap: 22px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: 0 8px 22px rgba(35,49,78,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic { font-size: 2.4rem; }
.card h3 { margin: 12px 0 2px; font-size: 1.22rem; }
.card .age { display: inline-block; background: var(--cream); color: var(--red); font-weight: 800; font-size: .8rem; padding: 4px 11px; border-radius: 999px; margin-bottom: 12px; }
.card p { color: var(--ink-soft); font-size: .94rem; margin: 0 0 14px; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { font-size: .9rem; padding: 5px 0 5px 24px; position: relative; }
.card li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }

/* ---------- Metode ---------- */
.method { background: var(--ink); color: #fff; border-radius: 0; }
.method .sec-head h2 { color: #fff; }
.method .sec-head .ey { color: var(--yellow); }
.method .sec-head p { color: #c3cde0; }
.method-grid { display: grid; gap: 16px; }
@media (min-width: 680px) { .method-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .method-grid { grid-template-columns: repeat(4, 1fr); } }
.m-item { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 22px 18px; }
.m-item .ic { font-size: 2rem; }
.m-item h4 { margin: 10px 0 6px; font-size: 1.05rem; }
.m-item p { margin: 0; font-size: .9rem; color: #c3cde0; }

/* ---------- Free tools strip ---------- */
.free { background: linear-gradient(135deg, var(--red) 0%, #ff6a3d 100%); color: #fff; }
.free .sec-head h2, .free .sec-head p { color: #fff; }
.free .sec-head .ey { color: #ffe08a; }
.free-grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .free-grid { grid-template-columns: repeat(2, 1fr); } }
.free-card { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 18px; padding: 24px; backdrop-filter: blur(4px); }
.free-card .ic { font-size: 2.3rem; }
.free-card h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.free-card p { margin: 0 0 16px; font-size: .94rem; opacity: .95; }
.free-card .btn { background: #fff; color: var(--red); }
.free-card .btn:hover { transform: translateY(-2px); }

/* ---------- CTA / lokasi ---------- */
.cta { text-align: center; }
.cta-box {
  background: #fff; border: 1px solid var(--line); border-radius: 28px;
  padding: 44px 26px; box-shadow: var(--shadow); max-width: 760px; margin: 0 auto;
}
.cta-box h2 { font-size: 1.8rem; margin: 0 0 12px; }
.cta-box p { color: var(--ink-soft); margin: 0 0 24px; }
.cta-meta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: center; font-size: .9rem; color: var(--ink-soft); font-weight: 700; }
.cta-meta b { color: var(--ink); }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #aebbd4; padding: 36px 0; text-align: center; font-size: .88rem; }
footer .logo { color: #fff; justify-content: center; margin-bottom: 10px; }
footer .fnote { opacity: .6; font-size: .78rem; margin-top: 12px; }

/* =====================================================================
   WIDGET CHAT
   ===================================================================== */
.icr-chat { position: fixed; right: 18px; bottom: 18px; z-index: 80; font-family: var(--font); }

.icr-fab {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  background: var(--red); color: #fff; border: none; border-radius: 999px;
  padding: 13px 20px 13px 16px; font-weight: 800; font-size: .95rem; font-family: inherit;
  box-shadow: 0 10px 28px rgba(232,64,44,.45); position: relative;
  transition: transform .15s ease;
}
.icr-fab:hover { transform: translateY(-2px); }
.icr-fab-ic { font-size: 1.25rem; }
.icr-fab-dot { position: absolute; top: 9px; right: 12px; width: 9px; height: 9px; background: var(--green); border-radius: 50%; border: 2px solid var(--red); }
.icr-fab.pulse { animation: icrpulse 1.6s ease-in-out infinite; }
@keyframes icrpulse { 0%,100% { box-shadow: 0 10px 28px rgba(232,64,44,.45); } 50% { box-shadow: 0 10px 34px rgba(232,64,44,.7); } }
@media (max-width: 420px) { .icr-fab-txt { display: none; } .icr-fab { padding: 15px; } }

.icr-panel {
  position: absolute; right: 0; bottom: 64px;
  width: min(92vw, 380px); height: min(76vh, 580px);
  background: var(--white); border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(35,49,78,.3); display: flex; flex-direction: column;
  border: 1px solid var(--line);
  animation: icrup .22s ease;
}
.icr-panel[hidden] { display: none; }
@keyframes icrup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.icr-head { display: flex; align-items: center; gap: 11px; background: var(--red); color: #fff; padding: 14px 16px; }
.icr-ava { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--red); display: grid; place-items: center; font-weight: 900; flex: none; }
.icr-head-txt { flex: 1; line-height: 1.25; }
.icr-head-txt strong { font-size: 1rem; }
.icr-head-txt span { display: block; font-size: .76rem; opacity: .92; }
.icr-on { display: inline-block; width: 7px; height: 7px; background: #7dffb0; border-radius: 50%; }
.icr-x { background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0 4px; opacity: .9; }
.icr-x:hover { opacity: 1; }

.icr-body { flex: 1; overflow-y: auto; padding: 16px 14px; background: var(--cream); display: flex; flex-direction: column; gap: 10px; }
.icr-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.icr-msg-u { justify-content: flex-end; }
.icr-ava-sm { width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .75rem; flex: none; }
.icr-bub { padding: 10px 14px; border-radius: 16px; font-size: .92rem; max-width: 80%; word-wrap: break-word; }
.icr-msg-b .icr-bub { background: #fff; color: var(--ink); border-bottom-left-radius: 5px; box-shadow: 0 2px 8px rgba(35,49,78,.07); }
.icr-msg-u .icr-bub { background: var(--red); color: #fff; border-bottom-right-radius: 5px; }

.icr-typing { display: flex; gap: 4px; align-items: center; }
.icr-typing span { width: 7px; height: 7px; background: #c3ccdd; border-radius: 50%; animation: icrblink 1.2s infinite; }
.icr-typing span:nth-child(2) { animation-delay: .2s; }
.icr-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes icrblink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

/* kartu dalam chat (kuis / game / form / result) */
.icr-card { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 2px 10px rgba(35,49,78,.08); max-width: 86%; border: 1px solid var(--line); }
.icr-card-h { font-size: .72rem; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.icr-card-q { font-size: .96rem; font-weight: 700; margin-bottom: 12px; }
.icr-opts { display: flex; flex-direction: column; gap: 8px; }
.icr-opts-row { flex-direction: row; justify-content: center; gap: 10px; }
.icr-opt { text-align: left; background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .9rem; font-weight: 700; color: var(--ink); cursor: pointer; font-family: inherit; transition: all .12s; }
.icr-opt:hover:not(:disabled) { border-color: var(--red); background: #fff; }
.icr-opt:disabled { cursor: default; opacity: .9; }
.icr-opt.sel { border-color: var(--red); background: #fff; }
.icr-letter { width: 54px; height: 54px; font-size: 1.4rem; font-weight: 900; text-align: center; display: grid; place-items: center; border-radius: 14px; }
.icr-opt.ok { background: #e6f8ee; border-color: var(--green); color: #1c8a52; }
.icr-opt.no { background: #ffe9e5; border-color: var(--red); color: var(--red-d); }
.icr-emoji { font-size: 3.4rem; text-align: center; margin: 4px 0 10px; }
.icr-game .icr-card-q { text-align: center; }

.icr-result { background: linear-gradient(135deg,#fff7ef,#fff); border-color: var(--yellow); }
.icr-res-j { font-size: 1.05rem; font-weight: 900; margin-bottom: 6px; }
.icr-res-t { font-size: .9rem; color: var(--ink-soft); }

.icr-form label { display: block; font-size: .82rem; font-weight: 800; margin-bottom: 10px; }
.icr-form input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: .9rem; font-family: inherit; }
.icr-form input:focus { outline: none; border-color: var(--red); }
.icr-submit { width: 100%; background: var(--red); color: #fff; border: none; border-radius: 12px; padding: 12px; font-weight: 800; font-size: .92rem; cursor: pointer; font-family: inherit; margin-top: 4px; }
.icr-submit:disabled { background: var(--green); }
.icr-note { font-size: .72rem; color: var(--ink-soft); margin: 10px 0 0; }

.icr-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px 2px; background: var(--cream); max-height: 132px; overflow-y: auto; }
.icr-chip { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 13px; font-size: .82rem; font-weight: 700; color: var(--red); cursor: pointer; font-family: inherit; transition: all .12s; }
.icr-chip:hover { border-color: var(--red); background: #fff6f2; }

.icr-input { display: flex; gap: 8px; padding: 10px 12px; background: var(--cream); border-top: 1px solid var(--line); }
.icr-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 16px; font-size: .9rem; font-family: inherit; }
.icr-input input:focus { outline: none; border-color: var(--red); }
.icr-input button { background: var(--red); color: #fff; border: none; width: 42px; border-radius: 50%; cursor: pointer; font-size: 1.05rem; flex: none; }
.icr-input button:hover { background: var(--red-d); }
