/* RISING LIGHT PTE. LTD. — risinglightsg.com */

:root {
  --ink: #0b1b33;
  --ink-block: #0b1b33;
  --bg: #ffffff;
  --bg-soft: #f5f6fa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #5b6475;
  --line: #e4e7ee;
  --sun-1: #f97316;
  --sun-2: #fbbf24;
  --accent: #c2410c;
  --accent-soft: #fff4e6;
  --good: #047857;
  --good-soft: #e7f6ef;
  --info: #1d4ed8;
  --info-soft: #eaf0ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 18px;
  --max: 1120px;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink-block: #1f3358;
    --bg: #0a1120;
    --bg-soft: #0f182b;
    --surface: #111b30;
    --text: #e7ebf3;
    --muted: #9aa5ba;
    --line: #22304b;
    --accent: #fb923c;
    --accent-soft: rgba(251, 146, 60, .12);
    --good: #34d399;
    --good-soft: rgba(52, 211, 153, .12);
    --info: #93b4ff;
    --info-soft: rgba(147, 180, 255, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun-2); outline-offset: 3px; border-radius: 6px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.brand span { font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: var(--bg-soft); }
.nav-links .lang { border: 1px solid var(--line); color: var(--text); margin-left: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%;
  background: radial-gradient(60% 55% at 50% 100%, rgba(251, 191, 36, .28), rgba(249, 115, 22, .10) 45%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px); line-height: 1.06; letter-spacing: -.035em;
  margin: 22px 0 18px; max-width: 16ch; font-weight: 800;
}
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--sun-1), var(--sun-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 60ch; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px;
  font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { background: #fbbf24; color: #0b1b33; } }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn svg { width: 18px; height: 18px; }

.facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 48px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--sun-1), var(--sun-2)); }

/* ---------- Sections ---------- */
section { scroll-margin-top: 72px; }
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.section-head h2, .h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }

/* ---------- Product cards ---------- */
.products { display: grid; gap: 28px; }
.product {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow);
}
.product.reverse .product-media { order: -1; }
.product-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: var(--ink-block); color: var(--sun-2);
}
.icon svg { width: 26px; height: 26px; }
.product h3 { font-size: 28px; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.product h3 small { display: block; font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-soon { color: var(--accent); background: var(--accent-soft); }
.badge-beta { color: var(--info); background: var(--info-soft); }
.badge-live { color: var(--good); background: var(--good-soft); }
.product p { color: var(--muted); margin: 0 0 18px; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%23ea580c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.link-arrow { font-weight: 600; text-decoration: none; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.product-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }

/* JetSpeed routing visual */
.route { display: grid; gap: 12px; }
.node, .branch {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--bg-soft);
}
.node b, .branch b { display: block; font-size: 16px; }
.node span, .branch span { display: block; color: var(--muted); font-size: 14px; }
.node.hub { background: var(--ink-block); border-color: var(--ink-block); color: #fff; }
.node.hub span { color: #cbd5e1; }
.down { height: 22px; width: 2px; margin: -4px auto; background: linear-gradient(var(--line), var(--sun-2)); border-radius: 2px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.branch.hot { border-color: color-mix(in srgb, var(--sun-1) 45%, var(--line)); background: var(--accent-soft); }
.branch.hot b { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }

/* P-ZIP screenshots */
.shots { display: flow-root; }
.shots picture { display: block; }
.shots picture:first-child { width: 92%; }
.shots picture:first-child img { border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 23, 42, .18); border: 1px solid var(--line); }
.shots picture:last-child { position: relative; width: 60%; margin: -20% 0 0 auto; }
.shots picture:last-child img { border-radius: 12px; box-shadow: 0 18px 40px rgba(15, 23, 42, .22); border: 1px solid var(--line); }
.caption, .product .caption { font-size: 13px; color: var(--muted); margin: 16px 0 0; text-align: center; }

/* AEIS stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--bg-soft); }
.stat b { display: block; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Principles ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin: 14px 0 8px; font-size: 20px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .icon { width: 42px; height: 42px; border-radius: 12px; }
.card .icon svg { width: 22px; height: 22px; }

/* ---------- Company ---------- */
.company { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.company p { color: var(--muted); }
.facts-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts-table th, .facts-table td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 16px; }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: 0; }
.facts-table th { width: 38%; color: var(--muted); font-weight: 500; }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center;
  background: var(--ink); color: #fff; border-radius: 24px; padding: 48px; position: relative; overflow: hidden;
}
.contact::after {
  content: ""; position: absolute; right: -80px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, .35), rgba(249, 115, 22, .1) 55%, transparent 70%);
}
.contact h2 { font-size: clamp(28px, 3.5vw, 38px); letter-spacing: -.02em; margin: 0 0 12px; line-height: 1.15; }
.contact p { color: #cbd5e1; margin: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.contact-list a {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: 14px; text-decoration: none;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
}
.contact-list a:hover { background: rgba(255, 255, 255, .1); }
.contact-list small { color: #94a3b8; font-size: 13px; }
.contact-list b { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-row nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--text); }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: 64px; margin: 0; letter-spacing: -.03em; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .product, .company, .contact { grid-template-columns: 1fr; }
  .product.reverse .product-media { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .product { padding: 28px; gap: 28px; }
  .contact { padding: 32px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav-links li.opt { display: none; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 64px 0; }
  .product { padding: 22px; }
  .product h3 { font-size: 24px; }
  .split { grid-template-columns: 1fr; }
  .facts-table th, .facts-table td { display: block; width: 100%; padding: 10px 16px; }
  .facts-table th { padding-bottom: 0; border-bottom: 0; }
  .contact { padding: 26px; border-radius: 20px; }
}

/* CJK headline measure: `ch` is too narrow for Chinese glyphs */
:lang(zh) .hero h1 { max-width: 13em; letter-spacing: -.01em; }
:lang(zh) .eyebrow, :lang(zh) .kicker { letter-spacing: .12em; }
:lang(zh) .hero h1 em { white-space: nowrap; }

/* Services grid + P-ZIP audience line */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.audience { margin: 20px 0 0 !important; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 15px; }
.audience b { color: var(--text); font-weight: 600; }
@media (max-width: 920px) { .grid-2 { grid-template-columns: 1fr; } }
