/* Suba Disa - site styles (colours and type from the approved landing design, 28 Nov 2026) */
:root {
  --maroon: #6E1E2B; --maroon-dk: #5C1522; --maroon-hi: #84283A; --ink: #3B2A24; --muted: #6B5A50;
  --cream: #FBF6EC; --sand: #F4EADA; --sand-2: #F1E6D2; --line: #EADFCB; --line-2: #D8C9AE;
  --gold: #E0A33A; --gold-lt: #F8E7C4; --gold-ink: #3A0F17; --green: #2F6B3A; --wa: #178B50; --white: #FFFFFF;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: 'Noto Sans Sinhala', system-ui, sans-serif; font-size: 18px; line-height: 1.6; }
.page { max-width: 520px; margin: 0 auto; background: var(--cream); min-height: 100vh; }
a { color: var(--maroon); } a:hover { color: #4A121C; }
h1, h2, h3 { margin: 0; }
.serif { font-family: 'Noto Serif Sinhala', serif; }
.hide { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--cream); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .si { font-family: 'Noto Serif Sinhala', serif; font-weight: 700; font-size: 22px; color: var(--maroon-dk); line-height: 1.1; }
.brand .en { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 10px; letter-spacing: .32em; color: #A87A2C; margin-top: 2px; line-height: 1.1; }
.brand .words { display: flex; flex-direction: column; }

/* buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px; border: 0; font-weight: 700; text-decoration: none; text-align: center; padding: 6px 16px; width: 100%; font-size: 18px; line-height: 1.35; }
.btn-lg { min-height: 56px; font-size: 19px; }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 20px rgba(240,180,70,.55), 0 4px 12px rgba(0,0,0,.18); }
.btn-gold-soft { background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 18px rgba(224,163,58,.35); }
.btn-maroon { background: var(--maroon); color: #fff; box-shadow: 0 4px 14px rgba(110,30,43,.28); }
.btn-maroon:hover { color: #fff; }
.btn-outline { background: #fff; color: var(--maroon); border: 2px solid var(--maroon); box-shadow: 0 2px 10px rgba(110,30,43,.12); }
.btn-wa { background: var(--wa); color: #fff; font-size: 17px; box-shadow: 0 0 18px rgba(46,204,113,.40), 0 3px 10px rgba(0,0,0,.18); }
.btn-wa:hover { color: #fff; }
.btn-link { background: transparent; color: var(--maroon); min-height: 44px; font-weight: 500; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 32px 20px 28px; background: radial-gradient(120% 80% at 100% 0%, var(--maroon-hi) 0%, var(--maroon) 55%, #5E1724 100%); color: #FFF8EC; display: flex; flex-direction: column; gap: 16px; }
.hero .bg { position: absolute; z-index: -1; pointer-events: none; right: -96px; top: 36px; }
.hero .kicker { font-size: clamp(12px, 3.4vw, 15px); white-space: nowrap; color: #F3D9A4; font-weight: 500; }
.hero h1 { font-family: 'Noto Serif Sinhala', serif; font-size: 34px; line-height: 1.35; font-weight: 700; }
.hero p { margin: 0; color: #F7EBD8; }
.hero .small { font-size: 14px; color: #F3D9A4; }

section.block { padding: 28px 16px; display: flex; flex-direction: column; gap: 14px; }
.h2 { font-family: 'Noto Serif Sinhala', serif; font-size: 26px; line-height: 1.4; color: var(--maroon); }
.lead { margin: 0; font-size: 16px; color: var(--muted); }
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 24px 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 10px rgba(59,42,36,.06); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.trust .card { border-radius: 14px; padding: 14px; gap: 6px; }
.trust .t { font-weight: 700; font-size: 16px; line-height: 1.4; }
.trust .d { font-size: 14px; color: var(--muted); line-height: 1.5; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-row h3 { font-size: 21px; line-height: 1.4; }
.price { font-size: 22px; font-weight: 700; color: var(--maroon); white-space: nowrap; }
.card p { margin: 0; font-size: 16px; color: var(--muted); line-height: 1.55; }
.tick { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.55; }
.tick svg { flex: none; margin-top: 4px; }
.badge { align-self: flex-start; background: var(--gold-lt); color: #5A3A05; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chip { min-height: 58px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px 10px; border-radius: 12px; font-size: 16px; line-height: 1.35; border: 1px solid var(--line-2); background: var(--cream); color: var(--ink); }
.chip[aria-pressed="true"] { border: 2px solid var(--maroon); background: var(--maroon); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(110,30,43,.22); }
.row-btn { min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 12px; font-size: 16px; text-align: left; border: 1px solid var(--line-2); background: #fff; color: var(--ink); width: 100%; }
.row-btn[aria-pressed="true"] { border: 2px solid var(--maroon); background: var(--gold-lt); }
.dash-btn { min-height: 44px; border-radius: 12px; border: 1px dashed #B9A584; background: transparent; color: var(--maroon); font-size: 16px; font-weight: 700; }
.note { font-size: 14px; color: var(--muted); line-height: 1.5; }
.hint { background: var(--gold-lt); border-radius: 10px; padding: 10px 12px; font-size: 15px; line-height: 1.5; color: #5A3A05; }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.steps { background: var(--sand); }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .n { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--maroon); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.join { position: relative; isolation: isolate; overflow: hidden; padding: 28px 16px; background: radial-gradient(110% 70% at 0% 100%, var(--maroon-hi) 0%, var(--maroon) 60%); color: #FFF8EC; display: flex; flex-direction: column; gap: 14px; }
.join .bg { position: absolute; z-index: -1; pointer-events: none; left: -70px; bottom: -70px; }
.join input, .join select { min-height: 52px; border-radius: 12px; border: 0; padding: 0 14px; font: inherit; font-size: 18px; background: #FFF8EC; color: var(--ink); width: 100%; }
footer.foot { padding: 24px 16px 40px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--muted); }
footer.foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 16px; font-weight: 500; }
.field select, .field input[type=text], .field input[type=tel], .field input[type=search] { min-height: 52px; border-radius: 12px; border: 1px solid var(--line-2); padding: 0 12px; font: inherit; font-size: 18px; font-weight: 400; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.picked { font-size: 15px; font-weight: 400; color: var(--maroon); }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 16px; }
.check input { width: 22px; height: 22px; accent-color: var(--maroon); flex: none; }
.err { background: #FBE3E0; color: #7A1E14; border-radius: 12px; padding: 10px 14px; font-size: 15px; line-height: 1.5; }
.warn { background: var(--gold-lt); color: #5A3A05; border-radius: 12px; padding: 10px 14px; font-size: 15px; line-height: 1.5; }
.ok { background: #E8F3E6; color: #24502D; border-radius: 12px; padding: 12px 14px; font-size: 16px; line-height: 1.5; }

/* searchable list */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 4px; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 8px 24px rgba(59,42,36,.15); padding: 4px; }
.combo-list button { display: block; width: 100%; text-align: left; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; font-size: 17px; line-height: 1.35; }
.combo-list button:hover, .combo-list button:focus { background: var(--sand); outline: none; }
.combo-list .sub { display: block; font-size: 13px; color: var(--muted); }
.combo-list .none { padding: 10px; font-size: 15px; color: var(--muted); }

/* bottom sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(59,42,36,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { position: relative; width: 100%; max-width: 520px; display: flex; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 24px 24px 0 0; overflow: hidden; box-shadow: 0 -6px 30px rgba(0,0,0,.18); flex-direction: column; background: var(--cream); }
.sheet-bar { flex: none; position: relative; height: 52px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); background: var(--cream); }
.grip2 { width: 48px; height: 5px; border-radius: 999px; background: var(--line-2); }
.sheet .grip { display: none; }
.sheet { background: var(--cream); width: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.sheet-x { position: absolute; top: 6px; right: 10px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--maroon); display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 2px 8px rgba(59,42,36,.15); }
.sheet-x:hover { background: var(--sand); }
.sheet .grip { align-self: center; width: 48px; height: 5px; border-radius: 999px; background: var(--line-2); }
.sheet h2 { font-family: 'Noto Serif Sinhala', serif; font-size: 24px; line-height: 1.4; color: var(--maroon); }

/* chart view */
.view { padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.fact .k { font-size: 14px; color: var(--muted); }
.fact .v { font-size: 18px; font-weight: 700; line-height: 1.4; }
.fact .s { font-size: 13px; color: var(--muted); line-height: 1.4; }
table.pl { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
table.pl th, table.pl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.pl th { background: var(--sand); font-weight: 700; font-size: 14px; }
.kendara { width: 100%; max-width: 360px; align-self: center; }
.res { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; }
.res .mk { flex: none; width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.res .mk.y { background: #E8F3E6; color: var(--green); }
.res .mk.n { background: #FBE3E0; color: #7A1E14; }
.score { font-family: 'Noto Serif Sinhala', serif; font-size: 40px; font-weight: 700; color: var(--maroon); line-height: 1.2; }

/* policy pages */
.doc { padding: 24px 18px 48px; }
.doc h1 { font-family: 'Noto Serif Sinhala', serif; font-size: 28px; color: var(--maroon); line-height: 1.4; }
.doc h2 { scroll-margin-top: 96px; font-size: 19px; color: var(--maroon); margin: 22px 0 6px; line-height: 1.45; }
.doc p, .doc li { font-size: 16px; line-height: 1.7; }
.doc .sub { color: var(--muted); font-size: 15px; margin: 4px 0; }
.doc .en { margin-top: 40px; padding-top: 20px; border-top: 2px solid var(--line); font-family: system-ui, sans-serif; }
.ph { background: #FFF1B8; padding: 0 3px; border-radius: 3px; }

@media (min-width: 521px) { body { background: var(--sand-2); } .page { box-shadow: 0 0 30px rgba(59,42,36,.08); } }

/* ---------- Desktop layout (900px and wider). Phone styles above stay unchanged. ---------- */
.top-cta { display: none; }
@media (min-width: 900px) {
  :root { --wrap: 1160px; --gut: max(40px, calc((100% - var(--wrap)) / 2)); }
  body { background: var(--cream); }
  .page { max-width: none; box-shadow: none; }
  .top, .hero, section.block, .trust, .join, footer.foot, .view, .doc { padding-left: var(--gut); padding-right: var(--gut); }
  .top { position: sticky; top: 0; z-index: 20; padding-top: 12px; padding-bottom: 12px; background: rgba(251,246,236,.94); backdrop-filter: blur(6px); }
  .brand .si { font-size: 26px; } .brand svg { width: 44px; height: 44px; }
  .top-cta { display: flex; width: auto; min-height: 44px; padding: 6px 22px; font-size: 16px; border-radius: 12px; margin-left: auto; }

  /* hero: text left, large kendara art right */
  .hero { padding-top: 72px; padding-bottom: 72px; min-height: 520px; justify-content: center; gap: 20px; }
  .hero > *:not(.bg) { max-width: 660px; position: relative; }
  .hero h1 { max-width: 780px !important; }
  .hero .kicker { font-size: 16px; }
  .hero h1 { font-size: 52px; line-height: 1.3; }
  .hero p { font-size: 20px; line-height: 1.65; }
  .hero > div[style*="flex-direction:column"] { flex-direction: row !important; gap: 14px !important; }
  .hero .btn { width: auto; padding: 6px 28px; white-space: nowrap; }
  .hero .bg { width: 520px; height: 520px; right: calc(var(--gut) - 40px); top: 50%; transform: translateY(-50%); opacity: .9; }

  /* trust: four across */
  .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-top: 40px; padding-bottom: 24px; }
  .trust .card { padding: 20px; }

  /* prices: three columns; the topic builder takes two, packages sit beside it */
  #prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; align-items: start; padding-top: 40px; padding-bottom: 56px;
    grid-template-areas: "ph ph ph" "pl pl pl" "free por year" "build build pkh" "build build pkl" "build build pk1" "build build pk2" "build build pk3" "build build ."; }
  #prices .p-h { grid-area: ph; text-align: center; font-size: 34px; } #prices .p-l { grid-area: pl; text-align: center; margin-top: -10px; }
  #prices .c-free { grid-area: free; align-self: stretch; } #prices .c-por { grid-area: por; align-self: stretch; } #prices .c-year { grid-area: year; align-self: stretch; }
  #prices .c-free .btn, #prices .c-por .btn, #prices .c-year .btn { margin-top: auto; }
  #prices .c-build { grid-area: build; padding: 26px; }
  #prices .pk-h { grid-area: pkh; margin-top: 0 !important; } #prices .pk-l { grid-area: pkl; margin-top: -12px; }
  #prices .pk1 { grid-area: pk1; } #prices .pk2 { grid-area: pk2; } #prices .pk3 { grid-area: pk3; }
  .c-build .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c-build #periods { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* steps: three across */
  section.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; padding-top: 56px; padding-bottom: 56px; }
  .steps .h2 { grid-column: 1 / -1; text-align: center; font-size: 34px; }
  .step { flex-direction: column; gap: 12px; }
  .step .n { width: 48px; height: 48px; font-size: 20px; }

  /* example: readable width, centred */
  .example { align-items: center; padding-top: 56px; }
  .example > * { width: 100%; max-width: 820px; }
  .example .h2 { text-align: center; font-size: 34px; }

  /* promise: centred card, ticks in a row */
  .promise { margin: 8px auto 56px !important; max-width: var(--wrap); width: calc(100% - 80px); display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; padding: 28px 32px !important; }
  .promise h2, .promise p { grid-column: 1 / -1; }

  /* join: heading left, form right */
  .join { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
  .join h2 { font-size: 34px !important; }
  .join form { display: grid !important; grid-template-columns: 1fr 1fr; }
  .join form > :nth-child(3), .join form > button { grid-column: 1 / -1; }
  .join .bg { width: 360px; height: 360px; }

  footer.foot { flex-direction: row; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--line); }

  /* chart, order and porondam views; policy pages */
  main#chartView .view, main#orderView .view, #pMain .view { max-width: calc(820px + 2 * var(--gut)); margin: 0 auto; padding-left: 40px; padding-right: 40px; }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .doc { max-width: 900px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

  /* the bottom sheet becomes a centred window */
  .sheet-wrap { align-items: center; }
  .sheet-box { max-width: 600px; border-radius: 24px; max-height: 90vh; max-height: 90dvh; }
  .grip2 { display: none; }
}
@media (min-width: 1500px) { .hero h1 { font-size: 60px; } .hero .bg { width: 580px; height: 580px; } }
/* promise box: keep each line short enough for one line on phones (Leo, 1 Dec) */
@media (max-width: 899px) { .promise { margin: 0 12px 28px !important; padding: 18px 14px !important; } .promise .tick { font-size: 15px; gap: 8px; } }
@media (max-width: 389px) { .promise { margin: 0 10px 28px !important; padding: 16px 12px !important; } .promise .tick { font-size: 14px; } }

/* Hero kendara animation: desktop only, and only for people who have not asked for reduced motion (Leo, 1 Dec) */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .bg-anim .k-ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: k-draw 2.2s cubic-bezier(.4,0,.2,1) forwards; }
  .bg-anim .k1 { animation-delay: .2s; } .bg-anim .k2 { animation-delay: .7s; } .bg-anim .k3 { animation-delay: 1s; } .bg-anim .k4 { animation-delay: 1.4s; }
  .bg-anim .k-house { opacity: 0; animation: k-fade 1.6s ease 2.2s forwards; }
  .bg-anim .k-star { opacity: 0; transform-box: fill-box; transform-origin: center; animation: k-fade 1.2s ease 2.8s forwards, k-glow 6s ease-in-out 4s infinite; }
  .bg-anim .k-ln { stroke-opacity: .24; filter: url(#kglow); }
  .bg-anim .k-star { fill-opacity: .85; filter: url(#kstar); }
  .hero .bg-anim { animation: k-float 14s ease-in-out 3s infinite; will-change: transform; }
}
@keyframes k-draw { to { stroke-dashoffset: 0; } }
@keyframes k-fade { to { opacity: 1; } }
@keyframes k-glow { 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); } 50% { opacity: .55; transform: scale(1.18) rotate(45deg); } }
@keyframes k-float { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% - 10px)); } }

/* Glassy buttons, phone and desktop (Leo, 1 Dec): a soft light sheen on top, thin bright edge, slight depth. */
.btn-gold, .btn-gold-soft, .btn-maroon, .btn-wa, .btn-outline { position: relative; overflow: hidden; isolation: isolate;
  background-image: linear-gradient(180deg, rgba(255,255,255,.38) 0%, rgba(255,255,255,.10) 48%, rgba(255,255,255,0) 52%, rgba(0,0,0,.06) 100%);
  border: 1px solid rgba(255,255,255,.45); }
.btn-maroon, .btn-wa { background-image: linear-gradient(180deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,.07) 48%, rgba(255,255,255,0) 52%, rgba(0,0,0,.10) 100%); border-color: rgba(255,255,255,.28); }
.btn-outline { border: 2px solid var(--maroon); background-color: rgba(255,255,255,.75); }
.btn-gold::after, .btn-gold-soft::after, .btn-maroon::after, .btn-wa::after { content: ""; position: absolute; z-index: -1; left: 8%; right: 8%; top: 2px; height: 42%; border-radius: 12px 12px 40% 40% / 12px 12px 18px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0)); pointer-events: none; }
.btn-gold, .btn-gold-soft, .btn-maroon, .btn-wa { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 6px rgba(0,0,0,.10), var(--btn-glow, 0 4px 12px rgba(0,0,0,.18)); }
.btn-gold { --btn-glow: 0 0 20px rgba(240,180,70,.55), 0 4px 12px rgba(0,0,0,.18); }
.btn-gold-soft { --btn-glow: 0 0 18px rgba(224,163,58,.35); }
.btn-maroon { --btn-glow: 0 4px 14px rgba(110,30,43,.28); }
.btn-wa { --btn-glow: 0 0 18px rgba(46,204,113,.40), 0 3px 10px rgba(0,0,0,.18); }
.btn > * { position: relative; }
/* Desktop only: stronger glow */
@media (min-width: 900px) {
  .btn-gold { --btn-glow: 0 0 34px rgba(240,180,70,.80), 0 0 64px rgba(240,180,70,.35), 0 6px 16px rgba(0,0,0,.20); }
  .btn-gold-soft { --btn-glow: 0 0 30px rgba(224,163,58,.60), 0 0 56px rgba(224,163,58,.25); }
  .btn-maroon { --btn-glow: 0 0 26px rgba(132,40,58,.50), 0 6px 18px rgba(110,30,43,.35); }
  .btn-wa { --btn-glow: 0 0 32px rgba(46,204,113,.65), 0 0 60px rgba(46,204,113,.25), 0 4px 12px rgba(0,0,0,.20); }
  .btn-gold:hover, .btn-gold-soft:hover, .btn-maroon:hover, .btn-wa:hover { filter: brightness(1.05); }
}

/* Animated glass: a soft light sweep crosses each main button every few seconds (phone and desktop; off for reduced motion) */
.btn-gold::before, .btn-gold-soft::before, .btn-maroon::before, .btn-wa::before { content: ""; position: absolute; z-index: 0; top: -10%; bottom: -10%; left: 0; width: 38%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.62) 50%, rgba(255,255,255,0) 100%); transform: translateX(-160%) skewX(-18deg); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .btn-gold::before, .btn-gold-soft::before, .btn-maroon::before, .btn-wa::before { animation: glass-sweep 4.5s ease-in-out 1.5s infinite; }
  .btn-wa::before { animation-delay: 2.1s; } .btn-maroon::before { animation-delay: 2.6s; }
}
@keyframes glass-sweep { 0% { transform: translateX(-160%) skewX(-18deg); } 35%, 100% { transform: translateX(330%) skewX(-18deg); } }

/* Small close button on inner pages (Leo, 1 Dec): stays in the top right corner while scrolling */
.page-x { position: fixed; z-index: 40; top: 78px; right: 12px; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.92);
  color: var(--maroon); display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 2px 10px rgba(59,42,36,.18); backdrop-filter: blur(6px); }
.page-x:hover { background: var(--sand); color: var(--maroon); }
.view-x { display: none; }
body:has(#chartView:not(.hide)) .view-x, body:has(#orderView:not(.hide)) .view-x { display: flex; }
@media (min-width: 900px) { .page-x { top: 86px; right: max(16px, calc((100% - 1160px) / 2 - 52px)); } }

/* Hero chart animation on phones (Leo, 1 Dec): slower and gentler than desktop */
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  .bg-anim .k-ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: k-draw 3.6s cubic-bezier(.4,0,.2,1) forwards; }
  .bg-anim .k1 { animation-delay: .3s; } .bg-anim .k2 { animation-delay: 1s; } .bg-anim .k3 { animation-delay: 1.5s; } .bg-anim .k4 { animation-delay: 2.1s; }
  .bg-anim .k-house { opacity: 0; animation: k-fade 2.4s ease 3.4s forwards; }
  .bg-anim .k-star { opacity: 0; transform-box: fill-box; transform-origin: center; fill-opacity: .7; filter: url(#kstar); animation: k-fade 1.8s ease 4.2s forwards, k-glow 9s ease-in-out 6s infinite; }
}
