/* MSI Foundry — stand-alone site. Structure mirrors cluely.com
   (docs/CLUELY_MIRROR_SPEC_V1.md): hero, hairline-separated sections, FAQ,
   white -> #DDE2EE CTA, #DDE2EE footer. Navy hero only; no image at the bottom. */
:root {
  --ink: #19191d; --ink-soft: #626275; --ink-muted: #77777e; --body: #8c929d;
  --line: #e3e3e4; --mist: #dde2ee; --mist-deep: #bbc5dd; --navy: #0c2340; --navy-hi: #174578;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Newsreader", Georgia, serif; --brand: "Libre Franklin", var(--sans); --mono: "Geist Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 16px/1.6 var(--sans); }
a { color: inherit; }
code { font: 500 13px/1.4 var(--mono); }

.nav { position: absolute; z-index: 10; inset: 0 0 auto; display: flex; align-items: center; gap: 32px; padding: 20px 112px; color: #fff; }
.nav nav { display: flex; gap: 32px; margin-right: auto; }
.nav nav a { text-decoration: none; font: 500 14px/20px var(--sans); color: rgba(255,255,255,.9); }
.wordmark { font: 600 21px/1 var(--brand); letter-spacing: -.4px; text-decoration: none; color: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: 12px; font: 600 15px/20px var(--sans); text-decoration: none; transition: transform .16s ease-out; }
.btn:hover { transform: scale(1.02); }
.btn-sm { min-height: 40px; padding: 10px 16px; font-size: 14px; }
.btn-primary { color: #fff; background: radial-gradient(101.79% 101.79% at 65.61% 81.79%, rgba(255,255,255,.6) 0, rgba(255,255,255,0) 100%), linear-gradient(90deg, #f18a61 0%, #dd6988 38%, #9b6fc9 70%, #627fe0 100%); box-shadow: 0 12px 24px rgba(98,127,224,.25); }
.btn-light { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.06); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 168px 20px 0;
  background: radial-gradient(87.76% 87.72% at 50% 9.2%, rgba(255,255,255,0) 41.36%, #fff 71.93%), radial-gradient(120% 90% at 50% 0%, var(--navy-hi) 0%, var(--navy) 55%, #08182c 100%) top / 100% 1200px no-repeat; }
.hero-title { margin: 0; max-width: 760px; text-align: center; color: #fff; font: 500 80px/96% var(--display); letter-spacing: -1px; }
.hero-title .w { display: inline-block; overflow: hidden; padding-bottom: .22em; margin-bottom: -.22em; vertical-align: bottom; }
.hero-title .w > span { display: inline-block; animation: word-rise .55s cubic-bezier(.22,1,.36,1) both; }
.hero-title .w:nth-child(2) > span { animation-delay: .1s } .hero-title .w:nth-child(3) > span { animation-delay: .2s }
.hero-title .w:nth-child(4) > span { animation-delay: .3s } .hero-title .w:nth-child(5) > span { animation-delay: .4s } .hero-title .w:nth-child(6) > span { animation-delay: .5s }
.hero-rule { width: 384px; height: 1px; margin: 0; border: 0; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.3) 50%, rgba(255,255,255,0)); animation: fade-up .5s ease-out 1s both; }
.hero-sub { margin: 0; max-width: 600px; text-align: center; color: rgba(255,255,255,.9); font: 500 19px/140% var(--sans); letter-spacing: -.02em; animation: fade-up .5s ease-out 1.2s both; }
.hero-cta { animation: fade-up .5s ease-out 1.35s both; }
.window { width: min(1120px, 100%); margin-top: 24px; border-radius: 18px; overflow: hidden; background: rgba(16,16,22,.92); box-shadow: 0 40px 80px rgba(8,24,44,.35), inset 0 0 0 1px rgba(255,255,255,.12); color: #fff; animation: window-rise .9s cubic-bezier(.22,1,.36,1) 1.1s both; transform-origin: top; }
.window-bar { display: flex; gap: 10px; padding: 12px 16px; background: rgba(255,255,255,.03); font: 500 13px/1 var(--sans); }
.window-bar span { color: rgba(255,255,255,.5); }
.window-body { padding: 24px 32px; }
.window-title { margin: 0 0 8px; font: 600 28px/1.2 var(--brand); }
.ship { display: grid; grid-template-columns: 200px 1fr 260px 220px; gap: 24px; align-items: center; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.08); font: 500 15px/1.4 var(--sans); }
.ship code { color: rgba(255,255,255,.85); } .ship em { font-style: normal; color: rgba(255,255,255,.6); font-size: 14px; } .ship b { font-weight: 500; color: #9bbeff; font-size: 14px; }

.hairline { max-width: 1280px; margin: 128px auto; padding: 0 32px; } .hairline > div { height: 1px; background: var(--line); }
.section { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.kicker { font: 500 12px/16px var(--sans); letter-spacing: 1.4px; color: var(--ink-muted); }
.title { margin: 0 0 32px; max-width: 900px; font: 500 56px/70px var(--sans); letter-spacing: -1.28px; background: linear-gradient(90deg, #19191d 0%, #626275 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-wrap: balance; }
.lede { margin: -16px 0 32px; max-width: 600px; color: var(--body); }
.grid { width: 100%; display: grid; gap: 24px; text-align: left; } .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); }
.card { display: flex; flex-direction: column; gap: 12px; padding: 32px; border-radius: 24px; background: radial-gradient(92.09% 126.39% at 50% 100%, var(--mist) 58.91%, var(--mist-deep) 100%); }
.card h3 { margin: 0; font: 600 22px/28px var(--sans); } .card p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 24px; }
.line { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.85); font: 500 14px/20px var(--sans); color: var(--ink-soft); }
.line code { min-width: 180px; color: var(--ink); }
.number { align-items: center; text-align: center; } .number strong { font: 500 72px/1 var(--display); letter-spacing: -1.6px; } .number span { font: 600 16px/22px var(--sans); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; }
.chips li { padding: 9px 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font: 500 14px/20px var(--sans); }

.faq { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 360px 1fr; gap: 64px; }
.faq-title { margin: 0; font: 500 40px/50px var(--sans); letter-spacing: -1.6px; }
.faq details { border-bottom: 1px solid var(--line); } .faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; cursor: pointer; font: 500 16px/24px var(--sans); }
.faq summary::-webkit-details-marker { display: none; } .faq summary i { font-style: normal; color: var(--ink-muted); transition: transform .2s; }
.faq details[open] summary i { transform: rotate(45deg); } .faq details p { margin: 0 0 20px; color: var(--ink-soft); max-width: 640px; }

.final-cta { margin-top: 0; padding: 220px 20px 210px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; background: linear-gradient(180deg, #fff 0%, var(--mist) 37.04%); }
.final-cta h2 { margin: 0; max-width: 760px; font: 500 56px/60px var(--display); letter-spacing: -1px; } .final-cta p { margin: 0; color: var(--ink-soft); font-size: 18px; }
.footer { display: grid; grid-template-columns: 1fr repeat(2, auto); gap: 64px; padding: 64px 112px 40px; background: var(--mist); }
.footer-brand strong { font: 600 19px/1 var(--brand); } .footer-brand p { margin: 8px 0 0; max-width: 280px; color: var(--ink-soft); font-size: 14px; line-height: 20px; }
.footer nav { display: flex; flex-direction: column; gap: 10px; } .footer h3 { margin: 0; font: 600 15px/20px var(--sans); }
.footer nav a { text-decoration: none; color: var(--ink-soft); font-size: 14px; } .footer-legal { grid-column: 1 / -1; margin: 24px 0 0; color: var(--ink-muted); font-size: 13px; }

/* Reveal once on scroll: opacity 0, 20px (cards 40px) -> in; never re-hides. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.16,1,.3,1); }
.js .reveal-card { transform: translateY(40px); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes word-rise { from { transform: translateY(1.25em); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes window-rise { from { opacity: 0; transform: perspective(1200px) translateY(200px) translateZ(100px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) { .ship { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .nav { padding: 14px 16px; } .nav nav { display: none; } .nav .btn { margin-left: auto; }
  .hero { padding-top: 112px; background: radial-gradient(187.39% 86.87% at 50% 13.13%, #1c4d85 23.39%, rgba(28,77,133,0) 100%); }
  .hero-title { font-size: 44px; max-width: 360px; } .hero-rule { display: none; } .hero-sub { font-size: 15px; }
  .hero-cta { flex-direction: column; width: 100%; } .hero-cta .btn { width: 100%; }
  .window-body { padding: 16px; } .ship { grid-template-columns: 1fr; gap: 2px; } .ship b { display: none; }
  .hairline { margin: 48px auto; padding: 0 20px; } .section, .faq { padding: 0 16px; }
  .title { font-size: 32px; line-height: 38px; margin-bottom: 16px; } .lede { margin: -4px 0 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; } .card { padding: 24px; } .line code { min-width: 120px; }
  .faq { grid-template-columns: 1fr; gap: 24px; } .faq-title { font-size: 30px; line-height: 36px; }
  .final-cta { padding: 128px 16px 96px; } .final-cta h2 { font-size: 38px; line-height: 42px; } .final-cta .cta-row { flex-direction: column; width: 100%; } .final-cta .btn { width: 100%; }
  .footer { grid-template-columns: 1fr; gap: 20px; padding: 40px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title .w > span, .hero-rule, .hero-sub, .hero-cta, .window { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
