/* Firify 3D: scroll-driven WebGL page, light and soft, in the flame's four colours. */
:root {
  --ink: #101f4d;
  --navy: #101f4d;
  --deep: #183f8c;
  --orange: #f27a1a;
  --yellow: #e8a238;
  --teal: #22b8cc;
  --blue: #1c64b0;
  --muted: #46547a;
  --peach: #ffd9c2;
  --sky: #cdeef3;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: #fff; overflow-x: hidden; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 8% 100%, #b7e6ee 0%, transparent 70%),
    radial-gradient(50% 40% at 95% 0%, #ffe3cc 0%, transparent 70%), #fff;
}
#prog { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 30; background: linear-gradient(90deg, var(--teal), var(--blue), var(--orange)); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* loader */
#loader {
  position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-content: center; justify-items: center;
  gap: 16px; color: #fff; transition: opacity 0.8s, visibility 0.8s;
}
#loader.done { opacity: 0; visibility: hidden; }
#loader img { height: 120px; width: auto; animation: float 2.4s ease-in-out infinite alternate; }
#loader .logo { font-size: 40px; font-weight: 600; letter-spacing: -1px; background: linear-gradient(90deg, #30d8d8, #e8a238, #f27a1a); -webkit-background-clip: text; background-clip: text; color: transparent; }
#loader .msg { font-size: 15px; opacity: 0.85; min-height: 20px; }
#loader .bar { width: 200px; height: 3px; background: #333; border-radius: 3px; overflow: hidden; }
#loader .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--orange)); transition: width 0.3s; }
@keyframes float { to { transform: translateY(-10px) rotate(3deg); } }

/* nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 4vw; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(255, 255, 255, 0.6);
}
.brand { font-weight: 600; font-size: 26px; letter-spacing: -1px; display: flex; align-items: center; gap: 8px; color: var(--navy); text-decoration: none; }
.brand img { width: 22px; height: 36px; object-fit: contain; }
.links { display: flex; gap: 26px; font-size: 15px; }
.links a { color: var(--navy); text-decoration: none; opacity: 0.8; transition: 0.2s; padding: 8px 2px; }
.links a:hover, .links a.on { opacity: 1; color: var(--deep); }
.btns { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; min-height: 44px; padding: 0 14px; background: none; border: 0; font: inherit; font-weight: 500; font-size: 16px; color: var(--navy); cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 24px; border-radius: 12px;
  font-size: 15px; font-weight: 500; text-decoration: none; border: 1px solid var(--navy); color: var(--navy); background: transparent;
  cursor: pointer; font-family: inherit; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn.solid { background: var(--navy); color: #fff; }
.btn.fire { background: var(--orange); border-color: var(--orange); color: #101f4d; box-shadow: 0 5px 0 #b85a10, 0 14px 24px rgba(242, 122, 26, 0.35); }
.btn.fire:active { box-shadow: 0 1px 0 #b85a10; transform: translateY(4px); }
.btn.white { background: #fff; border-color: #fff; box-shadow: 0 6px 20px rgba(20, 90, 160, 0.18); }

/* sections */
main { position: relative; z-index: 2; }
section { min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; padding: 12vh 6vw 9vh; }
section.right { align-items: flex-end; text-align: right; }
section.center { align-items: center; text-align: center; justify-content: center; }
h1 { font-size: clamp(44px, 8vw, 112px); font-weight: 300; letter-spacing: -0.04em; line-height: 0.98; color: var(--navy); text-shadow: 0 1px 0 #fff, 0 3px 0 rgba(28, 100, 176, 0.25), 0 8px 18px rgba(16, 31, 77, 0.18); }
h1 b { font-weight: 600; color: var(--deep); }
h2 { font-size: clamp(32px, 5.2vw, 72px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.04; color: var(--navy); max-width: 16ch; text-shadow: 0 1px 0 #fff, 0 2px 0 rgba(28, 100, 176, 0.2), 0 6px 14px rgba(16, 31, 77, 0.14); }
h2 b { font-weight: 600; }
p.lead { margin: 18px 0 26px; font-size: clamp(17px, 1.6vw, 21px); color: var(--muted); max-width: 36ch; line-height: 1.5; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.center .row { justify-content: center; }
.scroll-hint {
  position: absolute; right: 6vw; bottom: 9vh; width: 168px; padding: 16px; border-radius: 20px; background: var(--teal); color: #101f4d;
  font-size: 20px; font-weight: 400; line-height: 1.15; box-shadow: 0 6px 0 #128196, 0 18px 28px rgba(16, 110, 140, 0.3);
}
.scroll-hint span { display: block; margin-top: 14px; text-align: right; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
.hero { position: relative; }

/* chunky 3D cards */
.card {
  position: relative; text-align: left; background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(236, 246, 252, 0.8));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.95); border-radius: 24px; padding: 26px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.95) inset, 0 -3px 8px rgba(28, 100, 176, 0.1) inset, 0 5px 0 rgba(168, 210, 232, 0.7), 0 8px 0 rgba(120, 175, 210, 0.3), 0 26px 44px rgba(16, 60, 130, 0.2);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s ease-out, box-shadow 0.3s; will-change: transform;
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.8), transparent 55%); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 22px; font-weight: 600; color: var(--navy); margin: 12px 0 8px; letter-spacing: -0.01em; }
.card p, .card li { font-size: 16px; color: var(--muted); }
.card ul { list-style: none; display: grid; gap: 8px; margin-top: 10px; }
.card li { padding-left: 24px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, var(--yellow), var(--orange)); }
.ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; font-weight: 600; color: #101f4d; box-shadow: 0 2px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 0 rgba(16, 31, 77, 0.2), 0 10px 16px rgba(16, 60, 130, 0.25); }
.ico.o { background: linear-gradient(145deg, #ffe0cc, var(--orange)); }
.ico.t { background: linear-gradient(145deg, #d2f5f8, var(--teal)); }
.ico.y { background: linear-gradient(145deg, #fbe9c4, var(--yellow)); }
.card .links2 { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.card .btn { padding: 10px 18px; font-size: 14px; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; max-width: 1200px; margin-top: 30px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; width: 100%; max-width: 1100px; margin-top: 30px; }
.step small { color: var(--deep); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; }

/* live demo card */
.demo { width: min(560px, 100%); margin-top: 6px; }
.demo label { display: block; font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.demo input {
  width: 100%; font: 500 clamp(40px, 6vw, 72px)/1 "Inter", sans-serif; letter-spacing: -0.04em; color: var(--navy); background: #fff; border: 0;
  border-radius: 16px; padding: 14px 18px; box-shadow: 0 2px 6px rgba(16, 31, 77, 0.12) inset, 0 2px 0 rgba(255, 255, 255, 0.9);
}
.verdict { margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--sky); }
.verdict strong { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.verdict span { font-size: 16px; color: var(--muted); }
.verdict[data-state="late"] { background: #ffe3cc; } .verdict[data-state="late"] strong { color: #b5420c; }
.verdict[data-state="review"] { background: #fbe9c4; } .verdict[data-state="ok"] strong { color: #0d7388; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; font-size: 15px; color: var(--muted); }
.examples button { min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 12px; border: 0; font: 500 15px inherit; font-family: inherit; color: var(--navy); background: #fff; cursor: pointer; box-shadow: 0 3px 0 rgba(120, 175, 210, 0.6), 0 8px 14px rgba(16, 60, 130, 0.15); transition: transform 0.15s, box-shadow 0.15s; }
.examples button:hover { transform: translateY(-2px); }
.examples button:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }

/* about */
.about p.story { font-size: clamp(20px, 2.1vw, 30px); line-height: 1.3; letter-spacing: -0.01em; max-width: 34ch; color: var(--navy); font-weight: 300; margin-top: 18px; }
.about p.story b { font-weight: 600; }
.about { align-items: flex-start; }

/* marquee + footer */
.marquee { position: relative; z-index: 2; overflow: hidden; white-space: nowrap; padding: 34px 0; background: var(--navy); color: #fff; }
.marquee div { display: inline-block; animation: slide 30s linear infinite; font-size: clamp(26px, 4vw, 54px); font-weight: 300; letter-spacing: -0.02em; }
.marquee span { margin: 0 28px; } .marquee span:nth-child(even) { color: var(--orange); }
@keyframes slide { to { transform: translateX(-50%); } }
footer { position: relative; z-index: 2; background: var(--navy); color: #c8d6ee; padding: 36px 6vw; font-size: 15px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer a { color: #fff; }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s, transform 0.9s; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .grid3, .steps { grid-template-columns: 1fr; }
  .links { display: none; }
  .scroll-hint { display: none; }
  section.right { align-items: flex-start; text-align: left; }
  section.center { align-items: flex-start; text-align: left; }
  .center .row { justify-content: flex-start; }
  .menu-btn { display: inline-block; }
  .links.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 12px 4vw 20px; background: #fff; }
  .links.open a { font-size: 22px; padding: 10px 0; }
  .btns .btn { padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* theme button */
.theme-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(16, 31, 77, 0.3); background: transparent; color: var(--navy); cursor: pointer; transition: transform 0.2s, background 0.2s; }
.theme-btn:hover { transform: translateY(-2px); }
.theme-btn:active { transform: scale(0.94); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .sun { display: none; }
:root[data-theme='dark'] .theme-btn .sun { display: block; }
:root[data-theme='dark'] .theme-btn .moon { display: none; }

/* dark mode */
:root[data-theme='dark'] {
  --ink: #eaf2ff; --navy: #eaf2ff; --deep: #7db4ff; --muted: #a9b8d8; --sky: rgba(34, 184, 204, 0.16);
  color-scheme: dark;
}
:root[data-theme='dark'] body { background: #070d22; color: var(--ink); }
:root[data-theme='dark'] .bg {
  background: radial-gradient(60% 50% at 8% 100%, rgba(34, 184, 204, 0.26) 0%, transparent 70%),
    radial-gradient(50% 40% at 95% 0%, rgba(242, 122, 26, 0.24) 0%, transparent 70%), #070d22;
}
:root[data-theme='dark'] nav { background: rgba(7, 13, 34, 0.7); }
:root[data-theme='dark'] .links a { color: var(--ink); }
:root[data-theme='dark'] .links a:hover, :root[data-theme='dark'] .links a.on { color: #5fd6e6; }
:root[data-theme='dark'] h1, :root[data-theme='dark'] h2 { text-shadow: 0 6px 28px rgba(0, 0, 0, 0.55); }
:root[data-theme='dark'] h1 b, :root[data-theme='dark'] h2 b { color: #5fd6e6; }
:root[data-theme='dark'] .card {
  background: linear-gradient(160deg, rgba(26, 44, 92, 0.88), rgba(12, 22, 54, 0.82)); border-color: rgba(125, 180, 255, 0.22);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.08) inset, 0 -3px 8px rgba(31, 100, 200, 0.12) inset, 0 5px 0 rgba(6, 12, 32, 0.95), 0 8px 0 rgba(6, 12, 32, 0.5), 0 26px 44px rgba(0, 0, 0, 0.55);
}
:root[data-theme='dark'] .card::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(125, 180, 255, 0.2), transparent 55%); }
:root[data-theme='dark'] .step small { color: #7db4ff; }
:root[data-theme='dark'] .demo input { background: #0b1636; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) inset; }
:root[data-theme='dark'] .verdict[data-state='late'] { background: rgba(242, 122, 26, 0.2); }
:root[data-theme='dark'] .verdict[data-state='late'] strong { color: #ffb070; }
:root[data-theme='dark'] .verdict[data-state='review'] { background: rgba(232, 162, 56, 0.2); }
:root[data-theme='dark'] .verdict[data-state='ok'] strong { color: #5fe0ee; }
:root[data-theme='dark'] .examples button { background: #16224a; color: var(--ink); box-shadow: 0 3px 0 rgba(4, 8, 24, 0.9), 0 8px 14px rgba(0, 0, 0, 0.4); }
:root[data-theme='dark'] .btn { border-color: rgba(234, 242, 255, 0.55); color: var(--ink); }
:root[data-theme='dark'] .btn.solid { background: #eaf2ff; border-color: #eaf2ff; color: #101f4d; }
:root[data-theme='dark'] .btn.white { background: #16224a; border-color: #16224a; color: var(--ink); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
:root[data-theme='dark'] .btn.fire { border-color: var(--orange); color: #101f4d; box-shadow: 0 5px 0 #b85a10, 0 14px 24px rgba(242, 122, 26, 0.3); }
:root[data-theme='dark'] .theme-btn { border-color: rgba(234, 242, 255, 0.4); }
:root[data-theme='dark'] .links.open { background: #070d22; }
:root[data-theme='dark'] .marquee, :root[data-theme='dark'] footer { background: #050a1a; }
:root[data-theme='dark'] .about p.story { color: var(--ink); }

/* ---------- multi-page additions ---------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; }
section.tight { min-height: 0; justify-content: flex-start; padding: 12vh 6vw 4vh; }
section.page-hero { min-height: 58vh; justify-content: flex-end; padding-top: 18vh; padding-bottom: 6vh; }
.page-hero h1 { font-size: clamp(40px, 6.4vw, 88px); }
.page-hero .lead { max-width: 44ch; }
.links a.on { opacity: 1; color: var(--deep); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; width: 100%; margin-top: 26px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; width: 100%; max-width: 1240px; margin-top: 30px; }
.grid3.left, .grid2.left, .grid4.left { margin-left: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; width: 100%; }
.cols .card { margin-top: 0; }
.body-text { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: var(--muted); max-width: 46ch; }
.body-text b { color: var(--navy); font-weight: 600; }
.more { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
.center .more { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.center .chips { justify-content: center; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 99px; background: #fff; color: var(--navy); text-decoration: none; font-size: 16px; font-weight: 500; box-shadow: 0 3px 0 rgba(120, 175, 210, 0.6), 0 10px 18px rgba(16, 60, 130, 0.14); }
.num { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--deep); }
.feature-list { list-style: none; display: grid; gap: 10px; margin-top: 14px; }
.feature-list li { position: relative; padding-left: 26px; font-size: 17px; color: var(--muted); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: linear-gradient(135deg, var(--yellow), var(--orange)); }
.note { margin-top: 18px; font-size: 16px; color: var(--muted); max-width: 52ch; }

/* contact form */
.form { display: grid; gap: 14px; }
.form label { display: block; font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 17px; color: var(--navy); background: #fff; border: 0; border-radius: 14px; padding: 14px 16px; box-shadow: 0 2px 6px rgba(16, 31, 77, 0.12) inset, 0 2px 0 rgba(255, 255, 255, 0.9); }
.form textarea { min-height: 130px; resize: vertical; }
.contact-lines { display: grid; gap: 14px; margin-top: 8px; }
.contact-lines p { font-size: 18px; color: var(--muted); }
.contact-lines a { color: var(--navy); font-weight: 600; }

/* footer links */
footer .flinks { display: flex; gap: 20px; flex-wrap: wrap; }
footer .flinks a { text-decoration: none; opacity: 0.9; }
footer .flinks a:hover { text-decoration: underline; }

:root[data-theme='dark'] .chip { background: #16224a; color: var(--ink); box-shadow: 0 3px 0 rgba(4, 8, 24, 0.9), 0 10px 18px rgba(0, 0, 0, 0.4); }
:root[data-theme='dark'] .form input, :root[data-theme='dark'] .form select, :root[data-theme='dark'] .form textarea { background: #0b1636; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) inset; }
:root[data-theme='dark'] .num { color: #7db4ff; }
:root[data-theme='dark'] .links a.on { color: #5fd6e6; }
:root[data-theme='dark'] .body-text b, :root[data-theme='dark'] .contact-lines a { color: var(--ink); }

@media (max-width: 1100px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .grid2, .grid4, .cols { grid-template-columns: 1fr; }
  section.page-hero { min-height: 48vh; }
  section.tight { padding-top: 9vh; }
}

/* ---------- home hero with the mascot video ---------- */
.hero-dark { position: relative; background: #0a1028; color: #eaf2ff; overflow: hidden; min-height: 100vh; justify-content: center; padding: 14vh 6vw 10vh; }
.hero-media { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 68%; aspect-ratio: 16 / 9; }
.hero-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px 50px #0a1028, inset 170px 0 120px -40px #0a1028; }
.hero-video { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity 0.4s ease; }
.hero-video.fade { opacity: 0; }
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.hero-dark h1 { color: #eaf2ff; text-shadow: 0 6px 28px rgba(0, 0, 0, 0.5); }
.hero-dark h1 b { color: #5fd6e6; }
.hero-dark .lead { color: #b9c6e4; }
.hero-dark .btn.white { background: #16224a; border-color: #16224a; color: #eaf2ff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.hero-dark .scroll-hint { z-index: 1; }
nav.on-dark { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
nav.on-dark .brand, nav.on-dark .links a, nav.on-dark .menu-btn { color: #eaf2ff; }
nav.on-dark .links a.on { color: #5fd6e6; }
nav.on-dark .theme-btn { color: #eaf2ff; border-color: rgba(234, 242, 255, 0.4); }
nav.on-dark .btn.solid { background: #eaf2ff; border-color: #eaf2ff; color: #101f4d; }
@media (max-width: 860px) {
  .hero-dark { display: block; padding: 0 6vw 10vh; }
  .hero-media { position: relative; top: auto; right: auto; transform: none; aspect-ratio: auto; height: 46vh; margin: 0 -6vw; width: calc(100% + 12vw); }
  .hero-video { object-fit: cover; object-position: 62% 50%; }
  .hero-copy { margin-top: 4vh; }
}
