/* MahjongYuk.id — jade felt, warm gold, cream paper.
   Palette references the table itself: green baize, bamboo tiles, red dragon. */

:root {
  --jade-900: #07271d;
  --jade-800: #0b3d2e;
  --jade-700: #12503c;
  --jade-600: #1a6b50;
  --jade-100: #dcece5;
  --jade-050: #f0f7f4;

  --gold-600: #a97c1c;
  --gold-500: #d4a63c;
  --gold-100: #f7ecd2;

  --red-600:  #b2372a;
  --red-100:  #fbe6e3;

  --cream:    #faf7f0;
  --paper:    #ffffff;
  --ink:      #14201b;
  --ink-soft: #55635c;
  --line:     #e4ded1;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 1px 2px rgba(7, 39, 29, .06), 0 8px 24px rgba(7, 39, 29, .07);
  --shadow-lg: 0 2px 4px rgba(7, 39, 29, .05), 0 24px 56px rgba(7, 39, 29, .13);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--jade-700); text-decoration-color: color-mix(in srgb, var(--jade-700) 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--jade-600); }

.wrap { width: min(1160px, calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { width: min(780px, calc(100% - 2.5rem)); margin-inline: auto; }

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { max-width: 620px; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .13em;
  text-transform: uppercase; color: var(--gold-600); margin-bottom: .85rem;
}

.lead { font-size: 1.12rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.tiny { font-size: .82rem; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.center { text-align: center; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  padding: .78rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  text-decoration: none; transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--jade-800); color: #fff; box-shadow: 0 6px 18px rgba(11, 61, 46, .28); }
.btn-primary:hover { background: var(--jade-700); color: #fff; }
.btn-gold { background: var(--gold-500); color: var(--jade-900); box-shadow: 0 6px 18px rgba(212, 166, 60, .35); }
.btn-gold:hover { background: #e3b957; color: var(--jade-900); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--jade-700); color: var(--jade-700); background: var(--jade-050); }
.btn-sm { padding: .45rem .9rem; font-size: .84rem; }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: #9c2f24; color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 68px; }

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--jade-700), var(--jade-900));
  color: var(--gold-500); font-size: 1.05rem; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(212, 166, 60, .35);
}
.brand-dot { color: var(--gold-500); }

.nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--jade-800); }
.nav-cta { margin-left: .5rem; }

.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); padding: .2rem .4rem; }

@media (max-width: 860px) {
  .nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.4rem; gap: .35rem;
    box-shadow: var(--shadow); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .6rem 0; }
  .nav-cta { margin: .5rem 0 0; }
  .nav-toggle { display: block; margin-left: auto; }
}

/* -------------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; background: var(--jade-900); color: #fff; }
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background:
    radial-gradient(680px 340px at 78% -8%, rgba(212, 166, 60, .28), transparent 70%),
    radial-gradient(520px 380px at 8% 108%, rgba(26, 107, 80, .55), transparent 72%);
}
.hero .wrap { position: relative; z-index: 1; padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold-500); }
.hero p { color: rgba(255, 255, 255, .78); font-size: 1.1rem; max-width: 48ch; }
.hero .eyebrow { color: var(--gold-500); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }

.hero-stats { display: flex; gap: 2rem; margin-top: 2.75rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 1.6rem; color: var(--gold-500); line-height: 1.1; }
.hero-stats span { font-size: .82rem; color: rgba(255, 255, 255, .62); }

/* live rate card in the hero */
.rate-card {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(212, 166, 60, .3);
  border-radius: 20px; padding: 1.6rem; backdrop-filter: blur(8px);
}
.rate-card .rate-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-500); font-weight: 800; }
.rate-card .rate-now { font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1.05; margin: .35rem 0 .1rem; }
.rate-card .rate-unit { color: rgba(255, 255, 255, .6); font-size: .95rem; font-weight: 600; }
.rate-card hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .13); margin: 1.15rem 0; }
.rate-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.rate-card li { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; color: rgba(255, 255, 255, .78); }
.rate-card li b { color: #fff; font-weight: 700; }

.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; margin-right: .45rem; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }

/* ------------------------------------------------------------------- cards */

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.step { position: relative; padding-top: .5rem; }
.step-num {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--jade-050); color: var(--jade-800); font-weight: 800; border: 1px solid var(--jade-100);
  margin-bottom: .9rem;
}
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

.feature-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem;
  background: var(--gold-100); margin-bottom: .9rem;
}

/* ------------------------------------------------------------ pricing table */

.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.price-table th { font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.price-table td:last-child, .price-table th:last-child { text-align: right; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table .rate { font-weight: 800; font-size: 1.02rem; }

.plan-card { display: flex; flex-direction: column; }
.plan-card .plan-price { font-size: 2.1rem; font-weight: 800; color: var(--jade-800); line-height: 1.1; }
.plan-card .plan-price small { font-size: .95rem; font-weight: 600; color: var(--ink-soft); }
.plan-rules { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .5rem; font-size: .92rem; color: var(--ink-soft); }
.plan-rules li::before { content: "◆"; color: var(--gold-500); margin-right: .5rem; font-size: .7rem; }

/* ------------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .62rem; border-radius: 999px;
  font-size: .74rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  background: var(--jade-050); color: var(--jade-700); border: 1px solid var(--jade-100);
}
.badge-live   { background: #e8f8ee; color: #15803d; border-color: #bbf0cd; }
.badge-idle   { background: var(--jade-050); color: var(--jade-700); }
.badge-warn   { background: var(--gold-100); color: var(--gold-600); border-color: #eddcb4; }
.badge-danger { background: var(--red-100); color: var(--red-600); border-color: #f3cdc7; }
.badge-off    { background: #f1f0ec; color: #7c7a72; border-color: #e2e0d9; }

/* -------------------------------------------------------------------- forms */

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .4rem; }
.field .hint { font-size: .82rem; color: var(--ink-soft); margin-top: .3rem; }
.field .error { font-size: .82rem; color: var(--red-600); margin-top: .3rem; font-weight: 600; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="date"], input[type="time"], input[type="number"], select, textarea {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: var(--paper); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--jade-600); box-shadow: 0 0 0 3px rgba(26, 107, 80, .14);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red-600); }
textarea { min-height: 96px; resize: vertical; }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.choice {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .85rem 1rem; cursor: pointer;
  background: var(--paper); transition: border-color .15s, background .15s;
}
.choice:has(input:checked) { border-color: var(--jade-700); background: var(--jade-050); box-shadow: 0 0 0 1px var(--jade-700); }
.choice input { margin-right: .5rem; accent-color: var(--jade-700); }
.choice b { display: block; font-size: .95rem; }
.choice span { font-size: .82rem; color: var(--ink-soft); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .form-row, .choice-row { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- estimate box */

.estimate {
  position: sticky; top: 90px; background: var(--jade-900); color: #fff;
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-lg);
}
.estimate h3 { color: #fff; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; color: var(--gold-500); }
.estimate .total { font-size: 2.2rem; font-weight: 800; line-height: 1.15; margin: .2rem 0 .1rem; }
.estimate .lines { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; font-size: .89rem; }
.estimate .lines li { display: flex; justify-content: space-between; gap: 1rem; color: rgba(255, 255, 255, .78); }
.estimate .lines li b { color: #fff; }
.estimate hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .14); margin: 1rem 0; }
.estimate .note { font-size: .8rem; color: rgba(255, 255, 255, .55); margin: 1rem 0 0; }

/* ------------------------------------------------------------------- footer */

.site-footer { background: var(--jade-900); color: rgba(255, 255, 255, .7); padding: 3.5rem 0 2rem; margin-top: 4rem; }
.site-footer .brand { color: #fff; margin-bottom: .8rem; }
.site-footer h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .9rem; }
.site-footer a { color: rgba(255, 255, 255, .7); text-decoration: none; }
.site-footer a:hover { color: var(--gold-500); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .84rem;
}

/* -------------------------------------------------------------------- misc */

.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-600); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: .8rem 0 0; color: var(--ink-soft); }

.alert { padding: .9rem 1.15rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .93rem; font-weight: 600; }
.alert-success { background: #e8f8ee; color: #15803d; border: 1px solid #bbf0cd; }
.alert-error   { background: var(--red-100); color: var(--red-600); border: 1px solid #f3cdc7; }

.cta-band { background: var(--gold-100); border-top: 1px solid #eddcb4; border-bottom: 1px solid #eddcb4; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.5rem 0; flex-wrap: wrap; }
.cta-band h2 { margin: 0; }
.cta-band p { margin: .35rem 0 0; color: var(--ink-soft); }
