/* =====================================================================
   Hok Mahjong — stylesheet utama
   Tema: bersih, modern, elegan dengan nuansa klasik oriental (hijau
   gelap + krem + aksen emas/merah). Mobile-first & responsif penuh.
   ===================================================================== */

:root {
  --cream: #fcf9ed;
  --cream-2: #f5efde;
  --green: #013e31;
  --green-2: #0b5a48;
  --green-3: #0e7a60;
  --red: #b02e2e;
  --red-dark: #7a1f1f;
  --gold: #c9a227;
  --gold-soft: #e4c96a;
  --ink: #1c2924;
  --muted: #5b6b62;
  --line: #e4dcc4;
  --white: #ffffff;
  --shadow: 0 8px 30px rgba(1, 62, 49, 0.1);
  --shadow-sm: 0 2px 8px rgba(1, 62, 49, 0.12);
  --radius: 14px;
  --font-display:
    "Playfair Display", Georgia, "Times New Roman", "Noto Serif SC", serif;
  --font-body:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  padding-top: 72px;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--green-3);
  text-decoration: none;
}
a:hover {
  color: var(--green);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--green);
  font-weight: 700;
}
h1 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
}
h3 {
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
}
h4 {
  font-size: 1.05rem;
}

.section {
  padding: 32px 0;
}
.section-alt {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}
.section-head .kicker {
  display: inline-block;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 10px;
}
.section-head p {
  color: var(--muted);
  margin-top: 12px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
  text-decoration: none;
}
.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover {
  background: var(--green-2);
  color: #fff;
  transform: translateY(-1px);
}
.btn-orange {
  background: #ff5f1f;
  color: #fff;
}
.btn-orange:hover {
  background: #e67e22;
  color: #fff;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: #fff;
}
.btn-gold {
  background: var(--gold);
  color: #2b2305;
}
.btn-gold:hover {
  background: var(--gold-soft);
  color: #2b2305;
}
.btn-red {
  background: var(--red);
  color: #fff;
}
.btn-red:hover {
  background: var(--red-dark);
  color: #fff;
}
.btn-wa {
  background: #25d366;
  color: #fff;
}
.btn-wa:hover {
  background: #1eb958;
  color: #fff;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(252, 249, 237, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition:
    box-shadow 0.3s ease,
    background 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 8px 28px rgba(1, 62, 49, 0.14);
  background: rgba(252, 249, 237, 0.98);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
  transition: height 0.3s ease;
}
.site-header.scrolled .header-inner {
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition:
    width 0.3s ease,
    height 0.3s ease;
}
.site-header.scrolled .brand-logo {
  width: 38px;
  height: 38px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--green);
}
.brand-text small {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav > a:not(.nav-cta) {
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.93rem;
}
.main-nav > a:not(.nav-cta):hover {
  color: var(--green);
  background: rgba(1, 62, 49, 0.06);
}
.main-nav > a.active {
  color: var(--green);
  font-weight: 700;
}
.main-nav .nav-cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: 0.2s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #f4efe0;
  background: radial-gradient(
    1100px 600px at 80% -10%,
    #0b5a48 0%,
    #013e31 55%,
    #012b22 100%
  );
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(
    rgba(201, 162, 39, 0.18) 1px,
    transparent 1.6px
  );
  background-size: 26px 26px;
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-top: 84px;
  padding-bottom: 96px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  color: #f7f1dd;
}
.hero .tagline {
  font-size: 1.2rem;
  color: #cfe0d4;
  margin: 18px 0 8px;
  max-width: 560px;
}
.hero p {
  color: #b9cdc2;
  max-width: 560px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(228, 201, 106, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-logo {
  width: clamp(180px, 28vw, 300px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  border: 3px solid rgba(228, 201, 106, 0.5);
}

/* ---------- Cards / features ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card .icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(1, 62, 49, 0.08);
  color: var(--green);
  margin-bottom: 16px;
}
.card h3 {
  margin-bottom: 8px;
}
.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-card {
  text-align: left;
}
.feature-card .cta {
  display: inline-block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Tiles ---------- */
.tile {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}
.tile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.tile-row .tile {
  width: clamp(36px, 6.5vw, 56px);
}
.tile-row.tile-lg .tile {
  width: clamp(42px, 8vw, 68px);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 14px;
  max-width: 700px;
  margin: auto auto auto 0;
}
.tile-grid.tiles-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 224px;
}
.tile-grid.tiles-4 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 303px;
}
.tile-grid.tiles-8 {
  grid-template-columns: repeat(8, 1fr);
  max-width: 621px;
}
.tile-grid .tile {
  width: 100%;
}

.tile-caption {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

.tile-suit {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.tile-suit h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.tile-suit .count {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.tile-suit p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th,
td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
thead th {
  background: var(--green);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
  position: sticky;
  top: 0;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: rgba(1, 62, 49, 0.03);
}
tr.tier td {
  background: rgba(1, 62, 49, 0.08);
  color: var(--green);
  font-weight: 700;
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.zh {
  color: var(--red);
  font-family: "Noto Serif SC", "SimSun", serif;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-green {
  background: rgba(14, 122, 96, 0.12);
  color: var(--green-2);
}
.badge-red {
  background: rgba(176, 46, 46, 0.1);
  color: var(--red);
}
.badge-gold {
  background: rgba(201, 162, 39, 0.16);
  color: #7a620f;
}

/* ---------- Winning hand cards ---------- */
.hand-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.hand-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 6px;
}
.hand-card header h3 {
  margin-right: auto;
}
.hand-card .zh {
  font-size: 1.15rem;
}
.hand-card .desc {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 8px 0 16px;
}
.hand-card .fan-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cream-2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 16px;
}
.hand-card .fan-line strong {
  color: var(--green);
  font-size: 0.95rem;
}
.hand-card .fan-total {
  font-size: 1.3rem;
  color: var(--red);
  font-weight: 800;
}
.hand-breakdown {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}
.hand-breakdown li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}
.hand-breakdown li:last-child {
  border-bottom: 0;
}
.hand-breakdown span {
  color: var(--green);
  font-weight: 600;
}

/* ---------- Calculator ---------- */
.calc-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}
.scoring-group {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}
.scoring-group > summary,
.scoring-group > .group-title {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--cream-2);
  font-weight: 700;
  color: var(--green);
}
.scoring-group > summary::-webkit-details-marker {
  display: none;
}
.scoring-group .items {
  padding: 6px 8px 10px;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.check-item:hover {
  background: rgba(1, 62, 49, 0.04);
}
.check-item input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex: 0 0 auto;
}
.check-item .ci-body {
  flex: 1;
}
.check-item .ci-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.check-item .ci-top strong {
  font-size: 0.95rem;
  color: var(--ink);
}
.check-item .ci-top .zh {
  font-size: 0.9rem;
}
.check-item .ci-top .pts {
  margin-left: auto;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.check-item .ci-desc {
  font-size: 0.82rem;
  color: var(--muted);
}

.counter {
  display: flex;
  align-items: center;
  gap: 14px;
}
.counter button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 2px solid var(--green);
  background: var(--white);
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}
.counter button:hover {
  background: var(--green);
  color: #fff;
}
.counter .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  min-width: 30px;
  text-align: center;
}

.result-panel {
  position: sticky;
  top: 92px;
  background: var(--green);
  color: #eaf2ec;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.result-panel h3 {
  color: #fff;
  margin-bottom: 6px;
}
.result-panel .sub {
  color: #b9cdc2;
  font-size: 0.85rem;
}
.result-total {
  text-align: center;
  padding: 18px 0 8px;
}
.result-total .num {
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 800;
  color: var(--gold-soft);
  line-height: 1;
}
.result-total .lbl {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b9cdc2;
}
.result-fan {
  text-align: center;
  padding: 6px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.result-fan .num {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
}
.result-fan .lbl {
  font-size: 0.8rem;
  color: #b9cdc2;
}
.status {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  margin: 8px 0 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfe0d4;
}
.status-warn {
  background: rgba(201, 162, 39, 0.22);
  color: #f5dfa0;
}
.status-ok {
  background: rgba(37, 211, 102, 0.18);
  color: #a9e8c3;
}
.payout-list {
  list-style: none;
  margin-top: 10px;
}
.payout-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
  font-size: 0.88rem;
}
.payout-list li:last-child {
  border-bottom: 0;
}
.payout-list strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.active-list {
  margin-top: 14px;
}
.active-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
  font-size: 0.88rem;
}
.active-list li:last-child {
  border-bottom: 0;
}
.active-list .pts {
  color: var(--gold-soft);
  font-weight: 700;
  white-space: nowrap;
}
.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.empty-note {
  text-align: center;
  color: #9fb5a8;
  font-size: 0.85rem;
  padding: 12px 0;
}

/* ---------- Tile picker ---------- */
.picker-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.picker-tabs button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
}
.picker-tabs button.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.tile-btn {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 7px;
  position: relative;
}
.tile-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.tile-btn .tile {
  display: block;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.palette .tile-btn {
  width: 100%;
}
.palette .tile-btn .tile {
  width: 100%;
}
.tile-btn:hover .tile {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.tile-btn.dim .tile {
  opacity: 0.35;
}
.tile-btn.dim {
  cursor: not-allowed;
}
.hand-area {
  background: var(--white);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  min-height: 96px;
  padding: 16px;
  margin: 18px 0;
}
.hand-area h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.hand-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
  align-items: flex-start;
}
.hand-tiles .tile {
  cursor: pointer;
  width: clamp(40px, 7vw, 60px);
}
.hand-tiles .slot {
  width: clamp(40px, 7vw, 60px);
  aspect-ratio: 3 / 4;
  border: 2px dashed var(--line);
  border-radius: 7px;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--green-3);
  border-color: var(--green-3);
}
.field .hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Steps / flow ---------- */
.steps {
  counter-reset: step;
  display: grid;
  gap: 16px;
}
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.step .n {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.step h4 {
  color: var(--ink);
  font-family: var(--font-body);
  margin-bottom: 4px;
}
.step p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Callout ---------- */
.callout {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: #5b4a0f;
  font-size: 0.95rem;
}
.callout strong {
  color: #7a620f;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #02211b;
  color: #b9cdc2;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 32px;
  padding: 56px 20px 40px;
}
.site-footer h4 {
  color: #fff;
  margin-bottom: 14px;
  font-size: 1rem;
}
.site-footer ul {
  list-style: none;
}
.site-footer ul li {
  margin-bottom: 8px;
}
.site-footer a {
  color: #b9cdc2;
}
.site-footer a:hover {
  color: var(--gold-soft);
}
.footer-brand .brand {
  margin-bottom: 14px;
}
.footer-brand .brand-text strong {
  color: #fff;
}
.footer-brand p {
  font-size: 0.9rem;
}
.footer-contact li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.fc-icon {
  color: var(--gold-soft);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  font-size: 0.85rem;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.wa-float:hover {
  transform: scale(1.08);
  color: #fff;
}

/* ---------- Social links ---------- */
.social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.social-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.social-item:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  color: var(--ink);
}
.social-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}
.social-badge.fb {
  background: #1877f2;
}
.social-badge.ig {
  background: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
}
.social-badge.tiktok {
  background: #010101;
}
.social-badge.threads {
  background: #010101;
}
.social-badge.yt {
  background: #ff0000;
}
.social-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.social-text strong {
  color: var(--ink);
}
.social-text small {
  color: var(--muted);
}
.social-item .arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Misc ---------- */
.hero-about {
  padding: 40px 0 0;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
}

.cta-banner {
  background: linear-gradient(120deg, var(--green), var(--green-2));
  color: #eaf2ec;
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.cta-banner h2 {
  color: #fff;
}
.cta-banner p {
  color: #b9cdc2;
  margin: 10px 0 24px;
}

.text-center {
  text-align: center;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 32px;
}
.mb-2 {
  margin-bottom: 16px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
  }
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .result-panel {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px;
    display: none;
    box-shadow: var(--shadow);
  }
  .main-nav.open {
    display: flex;
  }
  .main-nav > a:not(.nav-cta) {
    padding: 12px 10px;
    font-size: 1rem;
  }
  .main-nav .nav-cta {
    margin: 8px 0 0;
    text-align: center;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .cta-banner {
    padding: 28px 20px;
  }
  .section {
    padding: 44px 0;
  }
  .tile-grid.tiles-3 {
    max-width: 33.33%;
  }
  .tile-grid.tiles-4 {
    max-width: 44.44%;
  }
  .tile-grid.tiles-8 {
    max-width: 88.89%;
  }
}

/* ---------- Layar ponsel kecil ---------- */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }
  .container {
    padding: 0 16px;
  }
  .section {
    padding: 16px 0;
  }
  .section-head {
    margin-bottom: 28px;
  }
  .section-head .kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }
  .lead {
    font-size: 1rem;
  }
  h1 {
    font-size: 1.65rem;
  }
  h2 {
    font-size: 1.35rem;
  }
  h3 {
    font-size: 1.12rem;
  }

  .hero .container {
    padding-top: 52px;
    padding-bottom: 60px;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero .tagline {
    font-size: 1.05rem;
  }
  .hero p {
    font-size: 0.95rem;
  }
  .hero-badge {
    font-size: 0.7rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .btn {
    padding: 11px 18px;
    font-size: 0.9rem;
  }

  .card {
    padding: 22px;
  }
  .step {
    padding: 16px;
    gap: 12px;
  }
  .step .n {
    width: 34px;
    height: 34px;
  }

  .tile-suit {
    padding: 16px;
  }
  .tile-row {
    gap: 5px;
  }
  .tile-row .tile {
    width: clamp(30px, 8.5vw, 44px);
  }
  .tile-row.tile-lg .tile {
    width: clamp(34px, 9.5vw, 50px);
  }
  .palette {
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 7px;
    padding: 10px;
  }

  .table-wrap {
    margin: 0 -4px;
  }
  table {
    font-size: 0.82rem;
  }
  th,
  td {
    padding: 9px 10px;
  }

  .hand-card {
    padding: 18px;
  }
  .hand-card .zh {
    font-size: 1.1rem;
  }
  .hand-card .desc {
    font-size: 0.85rem;
  }
  .hand-card .fan-line strong {
    font-size: 0.92rem;
  }
  .hand-card .fan-total {
    font-size: 1.2rem;
  }
  .hand-breakdown {
    font-size: 0.8rem;
  }
  .result-total .num {
    font-size: 2.5rem;
  }
  .result-fan .num {
    font-size: 1.6rem;
  }

  .cta-banner {
    padding: 24px 16px;
  }
  .cta-banner h2 {
    font-size: 1.4rem;
  }

  .social-badge {
    width: 38px;
    height: 38px;
  }
  .footer-grid {
    gap: 20px;
  }
}
