/* SimWork public site. Brand palette from SIMWORK_LANDING_PAGE_PROMPT.md.
   System fonts on purpose: loading a web font from a third party would send
   every visitor's IP address to it, which the privacy policy would then have
   to declare. */

:root {
  --navy: #071A3D;
  --navy-2: #0D2554;
  --teal: #12D8C4;
  --teal-strong: #009C94;
  --coral: #FF735C;
  --yellow: #FFBD4A;
  --paper: #F7FAFC;
  --ink: #10213A;
  --muted: #4A5B75;
  --line: #D9E2EC;
  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  line-height: 1.6; font-size: 17px; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-strong); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 .5rem; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 .75rem; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; margin: 0 0 .3rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--navy);
  padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
mark.todo { background: #FFE7A3; color: #6B4A00; padding: 0 4px; border-radius: 4px; font-weight: 700; }

/* ---- header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(7, 26, 61, .97); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800;
  font-size: 1.2rem; }
.brand:hover { color: var(--teal); }
.mark { width: 30px; height: 30px; }
.site-nav { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: wrap; }
.site-nav > a, .submenu > summary { color: #D8E4F5; text-decoration: none; padding: 8px 10px; border-radius: 8px;
  font-size: .95rem; cursor: pointer; }
.site-nav > a:hover, .submenu > summary:hover, .site-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
/* BM / EN: the same page in the other language. */
.lang-toggle { color: #fff; text-decoration: none; font-weight: 800; font-size: .9rem; letter-spacing: .04em;
  padding: 8px 10px; min-height: 40px; display: inline-flex; align-items: center;
  border: 1px solid rgba(255,255,255,.35); border-radius: 8px; }
.lang-toggle:hover { border-color: var(--teal); color: var(--teal); }
.submenu { position: relative; }
.submenu > summary { list-style: none; }
.submenu > summary::-webkit-details-marker { display: none; }
.submenu > summary::after { content: " ▾"; font-size: .8em; }
.submenu ul { position: absolute; top: calc(100% + 6px); left: 0; margin: 0; padding: 6px; list-style: none;
  background: #fff; border-radius: 12px; min-width: 240px; box-shadow: 0 12px 32px rgba(7,26,61,.25); }
.submenu ul a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.submenu ul a:hover, .submenu ul a[aria-current="page"] { background: #E6FBF8; color: var(--navy); }

/* ---- buttons --------------------------------------------------------------- */
.btn { display: inline-block; background: var(--teal); color: var(--navy); font-weight: 800; text-decoration: none;
  padding: 14px 22px; border-radius: 12px; border: 2px solid var(--teal); min-height: 48px; }
.btn:hover { background: #3CE6D4; color: var(--navy); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(18,216,196,.12); color: inherit; }
.btn-small { padding: 9px 14px; min-height: 40px; font-size: .92rem; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.5rem 0 1rem; }
.cta-row.center { justify-content: center; }

/* ---- hero ------------------------------------------------------------------ */
.hero { background: radial-gradient(1200px 500px at 85% 10%, #13407E 0%, transparent 60%), var(--navy);
  color: #E7EFFA; padding: 56px 0 64px; }
.hero h1 { color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 800; color: var(--yellow); margin: 0 0 .5rem; }
.lead { font-size: 1.2rem; max-width: 36ch; }
.proof { font-size: .95rem; color: #B7C8E2; }
/* The Malay page says, before the sign-up, that the simulation itself is in English. */
.lang-note { font-size: .9rem; color: #D8E4F5; border-left: 3px solid var(--yellow); padding: 4px 0 4px 12px; margin-top: 1rem; }
.hero-art img { display: block; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }

/* ---- sections -------------------------------------------------------------- */
main > section { padding: 64px 0; }
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { color: var(--muted); max-width: 62ch; margin-top: 0; }
.note { background: #FFF6E3; border-left: 4px solid var(--yellow); padding: 12px 16px; border-radius: 8px; max-width: 70ch; }

.journey { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); counter-reset: none; }
.journey li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  border-top: 5px solid var(--teal); }
.journey li:nth-child(2n) { border-top-color: var(--coral); }
.journey li:nth-child(3n) { border-top-color: var(--yellow); }
.journey p { margin: 0; color: var(--muted); font-size: .96rem; }
.day { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-strong); margin-bottom: 4px; }

.themes { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.themes li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 2px; }
.themes span:last-child { color: var(--muted); font-size: .9rem; }
.theme-icon { font-size: 1.8rem; }

.features { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.features li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.band .features li { background: var(--paper); }
.features p { margin: 0; color: var(--muted); font-size: .96rem; }

.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 24px 0; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.plan-main { border: 2px solid var(--teal); box-shadow: 0 10px 30px rgba(0,156,148,.12); }
.price { font-size: 2rem; font-weight: 800; color: var(--navy); margin: .2rem 0 .8rem; }
.price span { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan ul, .ticks { padding-left: 1.2rem; }
.plan li, .ticks li { margin: .35rem 0; }

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.callout { background: var(--navy); color: #E7EFFA; border-radius: var(--radius); padding: 24px; }
.callout h3 { color: #fff; }
.callouts { display: grid; gap: 16px; }

.faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--navy); }
.faq p { margin: 0 0 14px; color: var(--muted); }

.final { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #E7EFFA; }
.final h2 { color: #fff; }
.final .small { color: #B7C8E2; }

/* ---- legal pages ----------------------------------------------------------- */
.legal { padding-top: 40px; padding-bottom: 56px; }
.legal h2 { margin-top: 2rem; font-size: 1.35rem; }
.legal h3 { margin-top: 1.2rem; }
.legal li { margin: .3rem 0; }
.meta { color: var(--muted); font-size: .92rem; }
.lang-switch { margin: 0 0 .5rem; font-size: .92rem; font-weight: 700; }
.contact-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 24px 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.card p, .card address { margin: 0; font-style: normal; }
.topics li { margin: .6rem 0; }

/* ---- footer ---------------------------------------------------------------- */
.site-footer { background: var(--navy); color: #C4D3EA; padding: 40px 0 24px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--teal); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.footer-h { color: #fff; font-size: 1rem; margin: 0 0 .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer address { font-style: normal; margin-top: .6rem; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; font-size: .85rem; color: #9FB3D1; }
.footer-base p { margin: .3rem 0; }

/* ---- landing-page music button ------------------------------------------------ */
.music-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: inline-flex; align-items: center;
  gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 2px solid rgba(255,255,255,.25);
  background: rgba(7,26,61,.92); color: #fff; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
  box-shadow: 0 8px 24px rgba(7,26,61,.35); }
.music-toggle[hidden] { display: none; }
.music-toggle:hover { border-color: var(--teal); }
.music-toggle.is-on { background: var(--teal); color: var(--navy); border-color: var(--teal); }
.music-icon { font-size: 1.1rem; }
@media (prefers-reduced-motion: no-preference) {
  .music-toggle.is-on .music-icon { animation: music-bob 0.6s ease-in-out infinite alternate; }
}
@keyframes music-bob { from { transform: translateY(1px); } to { transform: translateY(-2px); } }

/* ---- small screens ----------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid, .two-col, .footer-grid { grid-template-columns: 1fr; }
  /* The words and the sign-up button come first. With the logo on top, a
     visitor from an advert saw a logo and a menu, and the button was at the
     very bottom of the first screen, half under the music button. The brand is
     already in the header. */
  .hero-art { max-width: 280px; margin: 0 auto; }
  /* Wrapped, not scrolled sideways: a scrolling row hid Policies and Contact
     off the right edge, which is exactly what a reviewer looks for. */
  .site-nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 2px; padding-bottom: 6px; }
  .site-nav > a, .submenu > summary { white-space: nowrap; padding: 6px 8px; font-size: .9rem; }
  .header-inner { padding-top: 8px; gap: 8px; }
  /* Brand, BM / EN and the sign-up button share the first row. The switch made
     that row too wide for a 375px phone, and the button wrapped onto a line of
     its own. */
  .lang-toggle { padding: 6px 8px; min-height: 36px; }
  .header-inner > .btn-small { padding: 8px 10px; font-size: .86rem; }
  .brand { margin-right: auto; }
  .submenu ul { position: fixed; top: auto; left: 16px; right: 16px; }
  main > section { padding: 44px 0; }
  body { font-size: 16px; }
  /* Icon only, so it no longer covers the hero's button. The label stays in the
     accessibility tree, so the button still has a name. */
  .music-toggle { padding: 10px; min-width: 44px; justify-content: center; }
  .music-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
