/* Commercial landing page — the public face of Top Management Systems.
   Separate from the application's stylesheet on purpose: a marketing surface and
   an operational tool have different jobs, and neither should carry the other's
   weight. The application uses a light corporate treatment; this page keeps the
   deep navy and the bubbles.

   Everything here is CSS. The Content-Security-Policy allows no external fonts,
   no inline styles and no third-party origins, so the glass is built from
   layered gradients rather than photographs — which also means no image
   requests on the page a first-time visitor loads.

   Palette: the brand's own three blues (brand/README.md). They are logo colours
   and fail AA as body text on this ground, so type uses lightened tints. */

:root {
  --navy: #04102F;
  --navy-2: #071C57;
  --navy-3: #0A2A7A;
  --ink: #F4F8FF;
  --ink-muted: #C2D2F2;
  --brand-indigo: #6666FF;
  --brand-deep: #003399;
  --brand-primary: #336699;
  --accent: #9DB0FF;
  --accent-solid: #3D5CE8;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --glass: rgba(255, 255, 255, 0.06);
  --focus: #FFD24A;
  --shell: min(1180px, 100%);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--navy);
  background-image:
    radial-gradient(62rem 46rem at 16% -10%, rgba(64, 98, 220, 0.42), transparent 62%),
    radial-gradient(54rem 42rem at 86% 2%, rgba(31, 78, 168, 0.40), transparent 60%),
    radial-gradient(48rem 40rem at 74% 94%, rgba(12, 54, 160, 0.52), transparent 64%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 42%, var(--navy-3) 70%, var(--navy-2) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--focus);
  color: #000;
  padding: 10px 14px;
  z-index: 100;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---- the bubbles -------------------------------------------------------- */
/* A soap bubble is mostly rim and highlight: the centre is nearly transparent,
   the edge catches light, and one bright specular dot sells the sphere. Four
   stacked gradients per bubble do that with no image and no script. */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  border-radius: 50%;
  /* A bubble is a film, not a ball: the centre must stay almost empty or it
     reads as a milky disc. Nearly all of the colour lives in the last 20% of
     the radius, with one small specular dot doing the work of selling depth. */
  background-image:
    radial-gradient(circle at 31% 25%, rgba(255, 255, 255, 0.95) 0 1.1%, rgba(255, 255, 255, 0.22) 4%, transparent 14%),
    radial-gradient(circle at 74% 78%, rgba(175, 205, 255, 0.16), transparent 26%),
    radial-gradient(circle at 50% 50%,
      transparent 62%,
      rgba(90, 135, 255, 0.12) 80%,
      rgba(170, 205, 255, 0.40) 91%,
      rgba(232, 243, 255, 0.66) 96.5%,
      rgba(255, 255, 255, 0.22) 99%,
      transparent 100%),
    radial-gradient(circle at 42% 38%, rgba(94, 123, 255, 0.05), transparent 72%);
  box-shadow:
    inset -10px -16px 48px rgba(6, 24, 78, 0.22),
    0 26px 70px rgba(2, 10, 40, 0.34);
  opacity: 0.85;
}

.bubble--1 { width: 34rem; height: 34rem; left: -12rem; top: 2rem; }
.bubble--2 { width: 9rem; height: 9rem; left: 12rem; top: 16rem; }
.bubble--3 { width: 26rem; height: 26rem; right: -8rem; top: 5rem; }
.bubble--4 { width: 5rem; height: 5rem; right: 18rem; top: 22rem; }
.bubble--5 { width: 30rem; height: 30rem; left: -6rem; bottom: -10rem; }
.bubble--6 { width: 38rem; height: 38rem; right: -10rem; bottom: -16rem; }
.bubble--7 { width: 3.2rem; height: 3.2rem; left: 46%; top: 8rem; }
.bubble--8 { width: 6rem; height: 6rem; right: 34%; bottom: 8rem; }

/* Bubbles drift; they do not dance. Motion is removed entirely for anyone who
   has asked for that. */
@media (prefers-reduced-motion: no-preference) {
  .bubble { animation: drift 22s ease-in-out infinite alternate; will-change: transform; }
  .bubble--2 { animation-duration: 15s; animation-delay: -4s; }
  .bubble--3 { animation-duration: 26s; animation-delay: -9s; }
  .bubble--4 { animation-duration: 13s; animation-delay: -2s; }
  .bubble--5 { animation-duration: 30s; animation-delay: -12s; }
  .bubble--6 { animation-duration: 34s; animation-delay: -6s; }
  .bubble--7 { animation-duration: 11s; animation-delay: -3s; }
  .bubble--8 { animation-duration: 17s; animation-delay: -7s; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -2.2rem, 0) scale(1.03); }
}

/* ---- shell -------------------------------------------------------------- */

.site-header,
main,
.site-footer { position: relative; z-index: 1; }

.site-header {
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px) clamp(18px, 4vw, 34px);
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 44px);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand__mark { filter: drop-shadow(0 4px 14px rgba(102, 102, 255, 0.55)); }
.brand__name { font-size: clamp(0.95rem, 1.4vw, 1.08rem); }

.site-nav { display: flex; gap: clamp(14px, 2.4vw, 30px); flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 140ms ease, box-shadow 180ms ease, background 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent-solid), #2C46C4);
  color: #FFFFFF;
  box-shadow: 0 14px 30px rgba(61, 92, 232, 0.42);
}
.btn--primary:hover { box-shadow: 0 18px 38px rgba(61, 92, 232, 0.55); }
.btn--ghost {
  background: var(--glass);
  color: var(--ink);
  border-color: var(--line-strong);
  padding: 10px 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn--quiet { color: var(--ink-muted); padding-left: 8px; padding-right: 8px; }
.btn--quiet:hover { color: var(--ink); }
.btn__arrow { transition: transform 160ms ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

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

main { width: var(--shell); margin: 0 auto; padding: 0 clamp(18px, 4vw, 34px); }

.hero {
  padding: clamp(46px, 9vw, 120px) 0 clamp(40px, 7vw, 92px);
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
}
.hero__title {
  font-size: clamp(2.6rem, 6.6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 clamp(18px, 2.4vw, 26px);
  font-weight: 700;
}
.hero__accent {
  background: linear-gradient(120deg, #AFC0FF, #7E97FF 45%, #5E7BFF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
  color: var(--ink-muted);
  margin: 0 auto clamp(26px, 3.4vw, 38px);
  max-width: 36rem;
}
.hero__actions { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0; }
.hero__note {
  margin: clamp(24px, 3vw, 34px) auto 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  max-width: 32rem;
}

/* ---- sections ----------------------------------------------------------- */

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 clamp(24px, 3vw, 40px);
}

.pillars, .assurance, .closing { padding: clamp(36px, 6vw, 78px) 0; }

.pillars__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}

.pillar, .assurance__item {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(22px, 2.6vw, 30px);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  background-size: 100% 1px;
  background-position: top left;
  background-repeat: no-repeat;
}
.pillar h3 { margin: 14px 0 8px; font-size: 1.22rem; letter-spacing: -0.01em; }
.pillar p, .assurance__item dd { color: var(--ink-muted); margin: 0; }
.pillar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1.15rem;
  color: var(--accent);
  background: rgba(102, 102, 255, 0.16);
  border: 1px solid rgba(157, 176, 255, 0.34);
}

.assurance__grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(14px, 2vw, 22px);
}
.assurance__item dt { font-weight: 700; margin-bottom: 8px; font-size: 1.05rem; }

.closing { text-align: center; padding-bottom: clamp(48px, 7vw, 96px); }
.closing__lead { color: var(--ink-muted); margin: 0 0 26px; font-size: 1.08rem; }

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

.site-footer {
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(24px, 3vw, 34px) clamp(18px, 4vw, 34px) clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.site-footer__meta { margin: 0; }
.site-footer a { color: var(--accent); }

@media (max-width: 640px) {
  .site-nav { order: 3; width: 100%; justify-content: center; }
  .bubble--1, .bubble--3, .bubble--5, .bubble--6 { opacity: 0.75; }
}
