/* moose softwares — apex teaser. Committed dark, product-forward.
   Self-contained: no external fonts, no external JS. Motion is CSS +
   a small inline enhancement script; everything degrades gracefully. */

:root {
  color-scheme: dark;

  --bg:        #0a0b0e;
  --bg-raise:  #101216;
  --panel:     #14161c;

  --ink:       #f2f3f6;
  --ink-2:     #b9bec9;
  --ink-3:     #7b818f;

  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);

  --accent:    #5b8bff;

  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 24px 60px -28px rgba(0, 0, 0, 0.75);

  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --space:  clamp(1.25rem, 4vw, 2rem);
  --serif:  ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans:   -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed; inset: 0; z-index: -3;
  background: linear-gradient(180deg, #10131a 0%, var(--bg) 42%, #08090c 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Subtle drifting ambient light — cool, low-opacity, not a neon glow. */
.ambient {
  position: fixed; z-index: -2; top: -12%; right: -8%;
  width: 62vw; height: 62vh; pointer-events: none;
  background: radial-gradient(closest-side, rgba(112, 142, 214, 0.11), transparent 72%);
  filter: blur(26px);
  animation: drift 26s ease-in-out infinite;
}
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-6%, 5%); } }

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--space); }

/* ---- Top bar (full-bleed, glass-on-scroll) ---------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.topbar.scrolled {
  background: rgba(10, 11, 14, 0.66);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom-color: var(--line-soft);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: clamp(0.9rem, 2.2vw, 1.4rem);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.brand span { font-weight: 590; letter-spacing: -0.01em; font-size: 1.02rem; }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 0.82rem; letter-spacing: 0.02em; color: var(--ink-2); }
.status .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pulse 3.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(91, 139, 255, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(91, 139, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 139, 255, 0); }
}

/* The status pill doubles as a link to Jackdaw once the app is out. */
.status--link { transition: color 0.2s ease; }
.status--link:hover { color: var(--ink); }

/* ---- Buttons ---------------------------------------------------------- */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.15rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.98rem; font-weight: 590; letter-spacing: -0.01em;
  border-radius: 999px; padding: 0.72rem 1.4rem; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--primary {
  background: var(--accent); color: #08090c;
  box-shadow: 0 10px 26px -12px rgba(91, 139, 255, 0.65);
}
.btn--primary:hover { background: #7ba1ff; box-shadow: 0 14px 32px -12px rgba(91, 139, 255, 0.8); }
.btn--ghost { color: var(--ink-2); border-color: var(--line); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.02fr 0.98fr; align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3rem, 8vw, 7rem);
}
.eyebrow { font-family: var(--serif); font-style: italic; font-size: 1.06rem; color: var(--ink-2); letter-spacing: 0.01em; }
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 600; margin: 0.5em 0 0.55rem; max-width: 15ch;
}
.hero h1 .soft { color: var(--ink-3); }
.lede { font-size: clamp(1.06rem, 1.5vw, 1.24rem); color: var(--ink-2); max-width: 42ch; line-height: 1.55; }
.lede strong { color: var(--ink); font-weight: 600; }

.kbd { display: inline-flex; gap: 6px; margin-top: 2rem; }
.kbd kbd {
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--ink);
  background: linear-gradient(180deg, #20242c, #171a20);
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  min-width: 34px; text-align: center;
}
/* Keys light up in sequence on load — echoes the ⌘⌃V summon. */
.js .kbd kbd { animation: keytap 0.55s var(--ease) both; animation-delay: calc(560ms + var(--k, 0) * 110ms); }
@keyframes keytap {
  0%   { transform: translateY(7px); opacity: 0; border-color: var(--line); }
  55%  { transform: translateY(-2px); opacity: 1; border-color: rgba(91,139,255,0.7); box-shadow: 0 0 0 3px rgba(91,139,255,0.14); }
  100% { transform: none; opacity: 1; }
}

/* Hero product panel — the real Settings window; idle float + pointer tilt + one-time sheen. */
.hero-shot { position: relative; }
.hero-shot img {
  width: 100%; height: auto; display: block; border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: float 9s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.hero-shot::after {
  content: ""; position: absolute; inset: 0; border-radius: 16px; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.13) 46%, transparent 62%);
  transform: translateX(-130%);
}
.js .hero-shot::after { animation: sheen 1.5s ease 0.85s 1 forwards; }
@keyframes sheen { to { transform: translateX(130%); } }

/* ---- 3D pointer tilt (JS sets --rx/--ry; CSS controls --lift on hover) ---- */
.tilt {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform 0.4s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---- In-action video loop -------------------------------------------- */
.demo { padding-bottom: clamp(3rem, 7vw, 6rem); }
.demo-fig { margin: 0; }
.screen {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); background: #0c0d11; box-shadow: var(--shadow-lg);
}
.screen::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.screen-video { display: block; width: 100%; height: auto; }
.demo figcaption { margin-top: 1.1rem; text-align: center; color: var(--ink-3); font-size: 0.92rem; }

/* ---- Showcase --------------------------------------------------------- */
.showcase {
  display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem);
  grid-template-columns: 1fr 1fr; padding-bottom: clamp(3rem, 7vw, 6rem);
}
.shot {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.shot.tilt:hover { --lift: -6px; border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 46px 90px -34px rgba(0, 0, 0, 0.9); }
.shot .frame {
  position: relative; height: clamp(360px, 42vw, 470px); overflow: hidden;
  border-bottom: 1px solid var(--line-soft); background: #0c0d11;
}
.shot .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot--drawer .frame img { object-position: 50% 0%; }
.shot--shelf  .frame img { object-position: 50% 13%; }
.shot .cap { padding: clamp(1.05rem, 2.2vw, 1.4rem) clamp(1.1rem, 2.4vw, 1.5rem); }
.shot .cap h3 { font-size: 1.1rem; letter-spacing: -0.012em; font-weight: 600; margin-bottom: 0.28rem; }
.shot .cap p  { font-size: 0.94rem; color: var(--ink-2); line-height: 1.5; }

/* ---- Meta line -------------------------------------------------------- */
.meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem;
  padding-bottom: clamp(3rem, 7vw, 5.5rem); color: var(--ink-3); font-size: 0.92rem;
}
.meta b { color: var(--ink-2); font-weight: 600; }

/* ---- Footer ----------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line-soft); padding-block: 2rem clamp(2.5rem, 6vw, 4rem);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem;
  color: var(--ink-3); font-size: 0.9rem;
}
.foot a { color: var(--ink-2); border-bottom: 1px solid transparent; transition: border-color 0.2s ease, color 0.2s ease; }
.foot a:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---- Reveal (CSS on load; staggered entrance) ------------------------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise 0.85s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; animation: none; }
  .status .dot, .ambient, .hero-shot img, .js .kbd kbd { animation: none; }
  .btn, .btn .arrow { transition: none; }
  .btn:hover { transform: none; }
  .btn:hover .arrow { transform: none; }
  .js .hero-shot::after { animation: none; opacity: 0; }
  .tilt { transition: none; }
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-shot { order: -1; max-width: 460px; }
  .showcase { grid-template-columns: 1fr; }
}
