/* =========================================================
   KAIRUL REWARDS — referral.css
   Gaya mengikut styles.css Ujian Simulasi:
   hijau pain pekat + hijau jed + emas, motif titik OMR.
   Letak fail ini di: styles/referral.css
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;700;800&family=Figtree:wght@400;500;600;700&display=swap');

:root {
  --ink: #07231d;
  --pine: #0e3d33;
  --pine-2: #14523f;
  --jade: #1fb985;
  --jade-deep: #0e8a63;
  --mint: #d9f5e9;
  --gold: #ffc83d;
  --gold-deep: #9a6b00;
  --paper: #f2f6f3;
  --white: #fff;
  --text: #0f231d;
  --muted: #55695f;
  --line: #dce6df;
  --font-display: 'Plus Jakarta Sans', 'Poppins', system-ui, sans-serif;
  --font-body: 'Figtree', 'Poppins', system-ui, sans-serif;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 32px;
  --shadow-md: 0 18px 40px -22px rgba(7, 35, 29, .35);
  --shadow-lg: 0 50px 90px -40px rgba(7, 35, 29, .6);
  --dots-dark: radial-gradient(circle, rgba(255,255,255,.09) 1.5px, transparent 1.6px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.015em; }
ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }

/* Ikon bergaris (semua svg kecuali logo) */
svg { flex: none; }
svg:not(.mark) {
  width: 1.1em; height: 1.1em; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ============ Navigasi ============ */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 700 1.08rem var(--font-display); letter-spacing: -.01em; }
.logo b { font-weight: 800; color: var(--jade-deep); margin-left: 2px; }
.mark { width: 38px; height: 38px; transform: rotate(-6deg); }
.mark rect { fill: var(--gold); }
.mark circle { fill: var(--ink); }
.mark circle.gold { fill: var(--jade-deep); }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .92rem;
  transition: transform .25s var(--ease), background .25s;
}
.nav-link:hover { transform: translateY(-2px); background: var(--pine-2); }

/* ============ Butang ============ */
.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px; border-radius: 999px; background: var(--gold); color: var(--ink);
  font-weight: 700; font-size: 1.02rem; line-height: 1.2;
  box-shadow: 0 10px 26px -10px rgba(255,200,61,.8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(255,200,61,.9); }
.primary svg { transition: transform .25s var(--ease); }
.primary:hover svg { transform: translateX(4px); }

/* ============ Hero (panel gelap bertitik) ============ */
.hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
  padding: 72px 56px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(31,185,133,.45), transparent 46%),
    radial-gradient(circle at 0% 100%, rgba(255,200,61,.2), transparent 42%),
    var(--ink);
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--dots-dark) 0 0 / 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.hero .eyebrow {
  padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); font-size: .82rem; letter-spacing: .03em; color: var(--mint);
}
.sparkle { color: var(--gold); }
h1 { margin: 22px 0 20px; font-size: clamp(2.5rem, 5.2vw, 4.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
h1 span {
  background: linear-gradient(95deg, var(--gold), #fff0b8 60%, var(--jade));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { max-width: 52ch; margin-bottom: 32px; font-size: 1.12rem; color: rgba(255,255,255,.78); }
.lead strong { color: #fff; font-weight: 700; }
.hint { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: .9rem; font-weight: 600; color: var(--mint); }
.hint svg { color: var(--jade); stroke-width: 3; }

/* Kad perjalanan reward (gaya kad laporan) */
.hero-visual {
  width: min(430px, 100%); justify-self: center; padding: 24px; border-radius: var(--r-xl);
  color: var(--text); background: #fff;
  box-shadow: var(--shadow-lg), 0 0 0 8px rgba(255,255,255,.07);
  transform: rotate(2deg); transition: transform .5s var(--ease);
}
.hero-visual:hover { transform: rotate(0); }
.visual-head {
  display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px;
  border-bottom: 1px dashed var(--line); font-weight: 700; font-size: .78rem; letter-spacing: .06em;
}
.visual-head svg { padding: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: var(--jade-deep); }
.ladder { display: grid; gap: 10px; padding-block: 18px; }
.ladder-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
}
.ladder-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--pine); color: var(--gold); }
.ladder-icon svg { width: 21px; height: 21px; }
.ladder-text { display: grid; line-height: 1.3; }
.ladder-text b { font: 700 1rem var(--font-display); }
.ladder-text small { font-size: .8rem; color: var(--muted); }
.ladder-count { padding: 4px 12px; border-radius: 999px; background: var(--mint); color: var(--jade-deep); font-weight: 700; font-size: .8rem; white-space: nowrap; }
.ladder-row.featured { background: var(--ink); box-shadow: 0 0 0 2px var(--gold); color: #fff; }
.ladder-row.featured .ladder-icon { background: var(--gold); color: var(--ink); }
.ladder-row.featured .ladder-text small { color: rgba(255,255,255,.7); }
.ladder-row.featured .ladder-count { background: rgba(255,200,61,.16); color: var(--gold); }
.visual-foot { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); background: #fff7df; font-size: .86rem; line-height: 1.5; }
.visual-foot svg { margin-top: 2px; color: var(--gold-deep); }

/* ============ Seksyen am ============ */
.rewards-section, .section { padding: 96px 0 0; }
.section-intro { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-intro .eyebrow {
  margin-bottom: 14px; padding: 5px 14px; border-radius: 999px;
  background: var(--mint); color: var(--jade-deep); font-weight: 700; font-size: .8rem; letter-spacing: .04em;
}
.section-intro h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; }
.section-intro h2 span { color: var(--jade-deep); }
.section-intro p { margin-top: 14px; font-size: 1.08rem; color: var(--muted); }

/* ============ Kad reward (gaya kad harga) ============ */
.reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; max-width: 1040px; margin: 0 auto; }
.reward-card {
  position: relative; display: flex; flex-direction: column; padding: 34px 30px;
  border-radius: var(--r-xl); background: #fff; box-shadow: 0 0 0 1px var(--line);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.reward-card:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px var(--jade), var(--shadow-md); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.tier { padding: 4px 12px; border-radius: 999px; background: var(--mint); color: var(--jade-deep); font-weight: 700; font-size: .78rem; letter-spacing: .04em; }
.card-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--pine); color: var(--gold); }
.card-icon svg { width: 24px; height: 24px; }
.reward-card h3 { font-size: 1.6rem; font-weight: 800; }
.value { margin-top: 14px; font: 800 2.3rem/1.05 var(--font-display); letter-spacing: -.03em; }
.value small { display: block; margin-top: 8px; font: 500 .9rem/1.4 var(--font-body); letter-spacing: 0; color: var(--muted); }
.card-line { margin-block: 24px; border-top: 1px dashed rgba(127,150,140,.4); }
.target { margin-top: auto; color: var(--muted); font-size: .96rem; }
.target b { margin-right: 4px; font: 800 2.4rem/1 var(--font-display); letter-spacing: -.03em; color: var(--text); }
.details { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.details span { padding: 4px 12px; border-radius: 999px; background: var(--mint); color: var(--jade-deep); font-weight: 700; font-size: .8rem; }

.reward-note {
  display: flex; gap: 12px; align-items: flex-start; max-width: 1040px; margin: 32px auto 0;
  padding: 14px 18px; border-radius: var(--r-md); background: #fff7df; font-size: .9rem; line-height: 1.5;
}
.reward-note svg { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--gold); color: var(--ink); }

/* ============ Cara ia berfungsi (gaya kad kelebihan) ============ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li {
  padding: 28px 24px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 0 0 1px var(--line);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.steps li:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px var(--jade), var(--shadow-md); }
.num { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 16px; background: var(--pine); color: var(--gold); font: 800 1.2rem var(--font-display); }
.steps h3 { margin-bottom: 8px; font-size: 1.2rem; font-weight: 700; }
.steps p { color: var(--muted); font-size: .95rem; line-height: 1.55; }

/* ============ CTA bawah (gaya kad contoh mudah) ============ */
.bottom {
  position: relative; margin-block: 96px 0; padding: 72px 40px; border-radius: var(--r-xl);
  text-align: center; color: #fff;
  background: var(--dots-dark) 0 0 / 26px 26px, linear-gradient(135deg, var(--pine), var(--ink));
  box-shadow: var(--shadow-lg);
}
.bottom-tag { display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--gold); font-weight: 700; font-size: .8rem; letter-spacing: .04em; }
.bottom h2 { margin: 18px auto 14px; font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; }
.bottom p { max-width: 48ch; margin: 0 auto 30px; color: rgba(255,255,255,.78); }

/* ============ Kaki ============ */
footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
  margin-block: 48px 24px; padding: 32px 36px; border-radius: var(--r-xl);
  background: var(--ink); color: rgba(255,255,255,.7); font-size: .88rem;
}
.fine { max-width: 60ch; font-size: .82rem; }

/* ============ Responsif ============ */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 44px; padding: 56px 36px; }
  .reward-grid { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 760px) {
  .hero { padding: 40px 22px; }
  .hero-visual { transform: none; }
  .rewards-section, .section { padding-top: 68px; }
  .steps { grid-template-columns: 1fr; }
  .bottom { margin-top: 68px; padding: 48px 22px; }
  .primary { width: 100%; }
  footer { justify-content: center; text-align: center; padding: 28px 22px; }
}
@media (max-width: 480px) {
  .ladder-row { grid-template-columns: auto 1fr; }
  .ladder-count { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
