/* Celestra Group Limited — site styles
   Palette: deep indigo night, cool paper, one star-gold accent. */

:root {
  --ink: #1b1f3b;          /* headings, footer */
  --text: #3f4566;         /* body copy */
  --muted: #6c7191;        /* secondary copy (AA on paper) */
  --paper: #fafafc;        /* page background */
  --surface: #ffffff;      /* raised panels */
  --mist: #e4e5f0;         /* rules and borders */
  --indigo: #3d3bd4;       /* brand, links, primary action */
  --indigo-deep: #2b29a8;
  --indigo-wash: #eeeefd;
  --gold: #e3ad3c;         /* star accent, used sparingly */
  --night: #171a33;        /* featured plan, footer */
  --night-text: #c9cbe3;

  --font-display: "Bricolage Grotesque", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;

  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-sm: 8px;
  --r-lg: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef0ff;
    --text: #c3c6e0;
    --muted: #9599b8;
    --paper: #12142a;
    --surface: #1a1d38;
    --mist: #2c3054;
    --indigo: #8f8dff;
    --indigo-deep: #b0aeff;
    --indigo-wash: #23264a;
    --night: #0c0e20;
    --night-text: #b5b8d6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eef0ff; --text: #c3c6e0; --muted: #9599b8; --paper: #12142a; --surface: #1a1d38;
  --mist: #2c3054; --indigo: #8f8dff; --indigo-deep: #b0aeff; --indigo-wash: #23264a;
  --night: #0c0e20; --night-text: #b5b8d6; color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--indigo); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--indigo-deep); }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-deep); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #12142a; } }
:root[data-theme="dark"] .btn-primary { color: #12142a; }
.btn-line { border-color: var(--mist); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--mist);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 19px/1 var(--font-display); letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--indigo-wash); }
.header-cta { min-height: 40px; padding: 0 18px; font-size: 15px; }
.menu-btn { display: none; margin-left: auto; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--mist); background: transparent; color: var(--ink); font: 600 15px/1 var(--font-body); cursor: pointer; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }
  .header-cta { display: none; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 16px;
    background: var(--paper); border-bottom: 1px solid var(--mist);
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: 17px; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--mist); }
  .nav a:last-child { border-bottom: 0; }
  .nav a:hover { background: transparent; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px); letter-spacing: -0.035em; font-weight: 700; max-width: 14ch; }
.hero .lead { margin-top: 22px; font-size: clamp(18px, 1.6vw, 20px); max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .registered { margin-top: 28px; font-size: 14px; color: var(--muted); max-width: 34em; }

.constellation { position: relative; aspect-ratio: 1 / 0.92; width: 100%; }
.constellation svg { width: 100%; height: 100%; overflow: visible; }
.constellation .sky { fill: var(--night); }
.constellation .link { stroke: #6e6cf0; stroke-width: 1.4; stroke-linecap: round; opacity: .8; }
.constellation .dust { fill: #ffffff; opacity: .35; }
.constellation .star-core { fill: #ffffff; }
.constellation .star-glow { fill: var(--gold); opacity: .22; transition: opacity .2s, r .2s; }
.constellation .star-label { fill: #e9eaff; font: 500 15px var(--font-body); }
.constellation a { cursor: pointer; }
.constellation a:hover .star-glow, .constellation a:focus-visible .star-glow { opacity: .55; }
.constellation a:hover .star-label, .constellation a:focus-visible .star-label { fill: var(--gold); }
.constellation a:focus-visible { outline: none; }
.constellation .caption { position: absolute; left: 22px; bottom: 18px; color: var(--night-text); font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  .constellation .link { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s ease-out .2s forwards; }
  .constellation .star { opacity: 0; animation: appear .5s ease-out forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes appear { to { opacity: 1; } }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
}
@media (max-width: 520px) {
  .constellation .star-label { font-size: 19px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--mist); }
.section-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 72px); margin-bottom: clamp(36px, 5vw, 56px); align-items: end; }
.section-intro h2 { font-size: clamp(32px, 4.2vw, 50px); letter-spacing: -0.025em; }
.section-intro p { max-width: 36em; }
@media (max-width: 860px) { .section-intro { grid-template-columns: 1fr; } }

/* Services: ruled list, not cards */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 72px); }
.services li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 16px; padding: 28px 0; border-top: 1px solid var(--mist); }
.services svg { width: 22px; height: 22px; margin-top: 4px; color: var(--indigo); }
.services h3 { font-size: 22px; letter-spacing: -0.01em; }
.services p { margin-top: 8px; }
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }

/* Products */
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product { background: var(--surface); border: 1px solid var(--mist); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; }
.product h3 { font-size: 26px; letter-spacing: -0.015em; }
.product .for { margin-top: 6px; color: var(--muted); font-size: 15px; }
.product > p { margin-top: 16px; }
.product ul { margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--mist); }
.product li { padding: 10px 0 10px 24px; border-bottom: 1px solid var(--mist); position: relative; font-size: 16px; }
.product li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.also { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.also div { padding: 22px 0 0; border-top: 2px solid var(--ink); }
.also h3 { font-size: 19px; }
.also p { margin-top: 6px; font-size: 16px; }
@media (max-width: 760px) { .products, .also { grid-template-columns: 1fr; } }

/* Pricing */
.billing { display: inline-flex; padding: 4px; border: 1.5px solid var(--mist); border-radius: 999px; margin-bottom: 28px; background: var(--surface); }
.billing button { border: 0; background: transparent; color: var(--text); font: 600 15px/1 var(--font-body); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.billing button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.billing .save { font-weight: 500; opacity: .8; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--mist); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; }
.plan h3 { font-size: 22px; }
.plan .fit { margin-top: 6px; font-size: 15px; color: var(--muted); min-height: 2.9em; }
.plan .amount { margin-top: 22px; font: 700 clamp(36px, 3.4vw, 44px)/1 var(--font-display); color: var(--ink); letter-spacing: -0.03em; white-space: nowrap; }
.plan .amount .pre { display: block; margin-bottom: 6px; font: 500 15px var(--font-body); color: var(--muted); }
.plan.featured .amount .pre { color: #a3a6c9; }
.plan .amount span { font: 500 16px var(--font-body); color: var(--muted); letter-spacing: 0; }
.plan .alt-price { margin-top: 8px; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.plan ul { list-style: none; margin: 24px 0 28px; padding: 0; flex: 1; }
.plan li { padding: 8px 0 8px 28px; position: relative; font-size: 16px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--indigo); border-bottom: 2px solid var(--indigo); transform: rotate(-45deg); }
.plan.featured { background: var(--night); border-color: var(--night); color: var(--night-text); }
.plan.featured h3, .plan.featured .amount { color: #fff; }
.plan.featured .fit, .plan.featured .amount span, .plan.featured .alt-price { color: #a3a6c9; }
.plan.featured li::before { border-color: var(--gold); }
.plan.featured .btn-primary { background: var(--gold); color: #1b1f3b; }
.plan.featured .btn-primary:hover { background: #f0c25e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .plan.featured { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
  :root:not([data-theme="light"]) .constellation .sky { stroke: var(--mist); stroke-width: 1.5; }
}
:root[data-theme="dark"] .plan.featured { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
:root[data-theme="dark"] .constellation .sky { stroke: var(--mist); stroke-width: 1.5; }
.plan .tagline { display: inline-block; align-self: flex-start; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--gold); }
.price-notes { margin-top: 24px; font-size: 15px; color: var(--muted); max-width: 60em; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan .fit { min-height: 0; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--mist); }
.faq details:last-child { border-bottom: 1px solid var(--mist); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font: 600 19px/1.35 var(--font-display); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 30px; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 34px; }
.faq details p { padding: 0 0 22px; max-width: 40em; }

/* Company & contact */
.company { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); border-top: 1px solid var(--mist); }
.facts dt, .facts dd { padding: 16px 0; border-bottom: 1px solid var(--mist); margin: 0; }
.facts dt { color: var(--muted); font-size: 15px; padding-right: 28px; }
.facts dd { color: var(--ink); }
.contact-panel { background: var(--surface); border: 1px solid var(--mist); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); align-self: start; }
.contact-panel h3 { font-size: 24px; }
.contact-panel > p { margin-top: 8px; }
.contact-ways { list-style: none; padding: 0; margin: 22px 0 0; }
.contact-ways li { padding: 14px 0; border-top: 1px solid var(--mist); }
.contact-ways small { display: block; color: var(--muted); font-size: 14px; }
.contact-ways a { font-weight: 600; font-size: 18px; text-decoration: none; }
.contact-ways a:hover { text-decoration: underline; }
@media (max-width: 860px) { .company { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dt { padding-bottom: 0; border-bottom: 0; } .facts dd { padding-top: 4px; } }

/* ---------- Legal pages ---------- */
.legal-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); }
.legal-head h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; }
.legal-head p { margin-top: 12px; color: var(--muted); }
.legal-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-bottom: clamp(64px, 9vw, 112px); }
.toc { position: sticky; top: 92px; align-self: start; font-size: 15px; }
.toc h2 { font: 600 14px var(--font-body); color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--mist); }
.toc a { display: block; padding: 5px 0 5px 14px; color: var(--text); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--indigo); }
.prose { max-width: 68ch; }
.prose > p:first-child { font-size: 19px; color: var(--ink); }
.prose h2 { font-size: 24px; letter-spacing: -0.01em; margin: 44px 0 12px; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 20px; margin: 12px 0 0; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--ink); }
.prose address { font-style: normal; margin-top: 12px; }
@media (max-width: 860px) {
  .legal-body { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 16px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--night-text); padding: clamp(48px, 6vw, 72px) 0 28px; font-size: 15px; }
.site-footer a { color: #e6e7fb; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer .brand { color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-grid p { margin-top: 14px; max-width: 30em; }
.site-footer h2 { font: 600 14px var(--font-body); color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.footer-base { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: #9a9dc0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Language switcher ---------- */
.lang { display: flex; gap: 2px; padding: 3px; border: 1.5px solid var(--mist); border-radius: 999px; }
.lang a { font: 600 13px/1 var(--font-body); padding: 6px 9px; border-radius: 999px; color: var(--text); text-decoration: none; }
.lang a:hover { color: var(--ink); background: var(--indigo-wash); }
.lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 860px) {
  .lang { order: 2; margin-left: auto; }
  .menu-btn { order: 3; margin-left: 8px; }
}

/* ---------- Chinese typography ---------- */
html:lang(zh-Hant) { --font-display: "Bricolage Grotesque", "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", sans-serif; --font-body: "IBM Plex Sans", "PingFang HK", "Noto Sans HK", "Microsoft JhengHei", sans-serif; }
html:lang(zh-Hans) { --font-display: "Bricolage Grotesque", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; --font-body: "IBM Plex Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
html:lang(zh) body { line-height: 1.75; }
html:lang(zh) h1, html:lang(zh) h2, html:lang(zh) h3, html:lang(zh) .plan .amount { letter-spacing: 0; }
html:lang(zh) h1, html:lang(zh) h2 { line-height: 1.25; }
html:lang(zh) .hero h1 { max-width: none; font-size: clamp(32px, 4.4vw, 56px); }
html:lang(zh) .constellation .star-label { font-size: 16px; }
@media (max-width: 520px) { html:lang(zh) .constellation .star-label { font-size: 21px; } }
.legal-head .note { margin-top: 8px; font-size: 15px; }

.menu-btn, .lang, .brand { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 380px) { .menu-btn .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .menu-btn { padding: 0 11px; } }
