/* =============================================
   Crystal AI — 2026 Landing Page
   Inspired by modern SaaS: true black, bold type,
   bento grids, green/purple accents
   ============================================= */

:root {
  --accent: #7C6AFF;
  --accent2: #9D8FFF;
  --green: #2DD4A8;
  --green2: #5EEDC4;
  --cyan: #00D4FF;
  --bg: #000000;
  --bg2: #0A0A0A;
  --bg3: #111111;
  --card: #0D0D0D;
  --card2: #141414;
  --tx: #999999;
  --tx2: #FFFFFF;
  --txm: #555555;
  --bd: rgba(255,255,255,.08);
  --bd2: rgba(255,255,255,.14);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --mw: 1200px;
  --nav: 64px;
  --r: 16px;
  --r2: 24px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 24px); }
body { font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--tx); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green2); }
ul { list-style: none; }
code { font-family: var(--mono); font-size: .875em; }
::selection { background: rgba(124,106,255,.3); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

.container { max-width: var(--mw); margin: 0 auto; padding: 0 24px; }

/* =========== COMMON TYPOGRAPHY =========== */
.label { display: inline-flex; align-items: center; gap: 8px; font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: 20px; }
.label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); opacity: .6; }
.section-title { font-size: 2.75rem; font-weight: 800; line-height: 1.08; letter-spacing: -.045em; color: var(--tx2); margin-bottom: 20px; }
.section-sub { font-size: 1.0625rem; color: var(--tx); line-height: 1.7; max-width: 540px; }
.section-header { margin-bottom: 64px; }
.section-header--center { text-align: center; }
.section-header--center .section-sub { margin: 0 auto; }
.grad { background: linear-gradient(135deg, var(--accent2), var(--green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font); font-weight: 600; font-size: .875rem; border: none; cursor: pointer; text-decoration: none; white-space: nowrap; border-radius: 10px; transition: all .25s cubic-bezier(.4,0,.2,1); }
.btn--primary { background: var(--tx2); color: var(--bg); padding: 14px 28px; }
.btn--primary:hover { color: var(--bg); background: #e0e0e0; transform: translateY(-1px); box-shadow: 0 8px 32px rgba(255,255,255,.1); }
.btn--ghost { background: transparent; color: var(--tx); border: 1px solid var(--bd2); padding: 13px 27px; }
.btn--ghost:hover { border-color: var(--tx); color: var(--tx2); background: rgba(255,255,255,.03); }
.btn--accent { background: var(--accent); color: #fff; padding: 14px 28px; }
.btn--accent:hover { color: #fff; background: var(--accent2); transform: translateY(-1px); box-shadow: 0 8px 32px rgba(124,106,255,.25); }
.btn--lg { padding: 16px 32px; font-size: .9375rem; }
.btn--sm { padding: 10px 22px; font-size: .8125rem; }
.btn--pill { border-radius: 50px; }

/* =========== NAV =========== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav); background: rgba(0,0,0,.8); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid var(--bd); }
.nav__inner { max-width: var(--mw); margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav__logo svg { flex-shrink: 0; }
.nav__logo span { font-weight: 700; font-size: 1rem; color: var(--tx2); letter-spacing: -.02em; }
.nav__center { display: flex; align-items: center; gap: 32px; }
.nav__center a { color: var(--txm); font-size: .8125rem; font-weight: 500; transition: color .2s; }
.nav__center a:hover { color: var(--tx2); }
.nav__right { display: flex; align-items: center; gap: 12px; }
.nav__gh { display: flex; align-items: center; gap: 6px; color: var(--txm); font-size: .8125rem; font-weight: 500; padding: 8px 14px; border: 1px solid var(--bd); border-radius: 8px; transition: all .2s; }
.nav__gh:hover { color: var(--tx2); border-color: var(--bd2); }
.nav__gh svg { flex-shrink: 0; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav__burger span { display: block; width: 20px; height: 1.5px; background: var(--tx); border-radius: 1px; transition: all .25s; }

@media (max-width: 768px) {
  .nav__center { display: none; position: absolute; top: var(--nav); left: 0; right: 0; background: rgba(0,0,0,.97); backdrop-filter: blur(20px); flex-direction: column; padding: 24px; gap: 20px; border-bottom: 1px solid var(--bd); }
  .nav__center.active { display: flex; }
  .nav__center a { font-size: .9375rem; color: var(--tx); }
  .nav__right .btn { display: none; }
  .nav__gh { display: none; }
  .nav__burger { display: flex; }
  .nav__burger.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px,4.5px); }
  .nav__burger.active span:nth-child(2) { opacity: 0; }
  .nav__burger.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px,-4.5px); }
}

/* =========== HERO =========== */
.hero { padding: calc(var(--nav) + 100px) 0 80px; position: relative; overflow: hidden; }
.hero__glow { position: absolute; width: 900px; height: 600px; border-radius: 50%; top: -200px; left: 50%; transform: translateX(-60%); background: radial-gradient(ellipse, rgba(124,106,255,.12), transparent 70%); pointer-events: none; }
.hero__glow--2 { top: -100px; left: auto; right: -200px; transform: none; width: 600px; height: 500px; background: radial-gradient(ellipse, rgba(45,212,168,.06), transparent 70%); }

.hero__badge { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 600; color: var(--green); background: rgba(45,212,168,.08); border: 1px solid rgba(45,212,168,.2); border-radius: 50px; padding: 6px 16px 6px 10px; margin-bottom: 32px; }
.hero__badge-icon { width: 20px; height: 20px; border-radius: 50%; background: rgba(45,212,168,.15); display: flex; align-items: center; justify-content: center; font-size: .6rem; }

.hero h1 { font-size: 4.5rem; font-weight: 900; line-height: 1.0; letter-spacing: -.06em; color: var(--tx2); margin-bottom: 28px; max-width: 700px; }
.hero h1 .thin { font-weight: 400; color: var(--tx); }
.hero__sub { font-size: 1.125rem; color: var(--tx); line-height: 1.8; max-width: 520px; margin-bottom: 40px; }

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

.hero__install { display: inline-flex; align-items: center; gap: 12px; background: var(--bg3); border: 1px solid var(--bd); border-radius: 10px; padding: 12px 16px; font-family: var(--mono); font-size: .8125rem; }
.hero__install-prompt { color: var(--txm); user-select: none; }
.hero__install code { color: var(--green); }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--bd); border-radius: 6px; color: var(--txm); cursor: pointer; padding: 5px; transition: all .2s; }
.copy-btn:hover { color: var(--tx2); border-color: var(--bd2); }
.copy-btn.copied { color: var(--green); border-color: rgba(45,212,168,.4); }

/* Hero visual */
.hero__grid { display: grid; grid-template-columns: 1fr; gap: 60px; position: relative; z-index: 1; }
.hero__visual { position: relative; }

.code-win { background: var(--bg3); border-radius: var(--r); border: 1px solid var(--bd); overflow: hidden; }
.code-win--hero { box-shadow: 0 24px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04); }
.code-win__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: rgba(255,255,255,.02); border-bottom: 1px solid var(--bd); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.code-win__title { margin-left: 8px; font-family: var(--mono); font-size: .7rem; color: var(--txm); flex: 1; }
.code-win__bar .copy-btn { margin-left: auto; }
.code-win__body { padding: 20px; overflow-x: auto; font-size: .8rem; line-height: 1.8; margin: 0; background: transparent !important; }
.code-win__body code { font-family: var(--mono); font-size: .8rem; background: none !important; text-shadow: none !important; }

@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: center; }
  .hero h1 { font-size: 5rem; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2.75rem; }
  .hero { padding: calc(var(--nav) + 60px) 0 60px; }
}

/* =========== LOGO STRIP =========== */
.logos { padding: 60px 0; border-top: 1px solid var(--bd); border-bottom: 1px solid var(--bd); overflow: hidden; }
.logos__label { text-align: center; font-size: .6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--txm); margin-bottom: 28px; }
.logos__track { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.logos__item { font-size: .9375rem; font-weight: 600; color: var(--txm); letter-spacing: -.01em; transition: color .2s; white-space: nowrap; }
.logos__item:hover { color: var(--tx2); }
@media (max-width: 640px) { .logos__track { gap: 24px; } .logos__item { font-size: .8125rem; } }

/* =========== BENTO SECTION — BUILD & ITERATE =========== */
.bento-section { padding: 120px 0; }

.bento-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.bento-card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r2); padding: 32px; position: relative; overflow: hidden; transition: border-color .3s; }
.bento-card:hover { border-color: var(--bd2); }
.bento-card__label { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--txm); margin-bottom: 12px; }
.bento-card__title { font-size: 1.25rem; font-weight: 700; color: var(--tx2); letter-spacing: -.03em; margin-bottom: 10px; }
.bento-card__desc { font-size: .875rem; color: var(--tx); line-height: 1.65; }

/* Card with code preview */
.bento-card--code { padding: 32px 32px 0; }
.bento-card--code .code-win { margin-top: 20px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: none; }

/* Card with icon grid */
.bento-card--icons .icon-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.bento-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--bd); display: flex; align-items: center; justify-content: center; transition: all .2s; }
.bento-icon:hover { border-color: var(--bd2); background: rgba(255,255,255,.04); }
.bento-icon svg { color: var(--tx); width: 22px; height: 22px; }

/* Card accent border */
.bento-card--accent { border-color: rgba(124,106,255,.2); }
.bento-card--accent:hover { border-color: rgba(124,106,255,.35); }
.bento-card--green { border-color: rgba(45,212,168,.15); }
.bento-card--green:hover { border-color: rgba(45,212,168,.3); }

/* Feature list inside card */
.bento-features { list-style: none; margin-top: 16px; }
.bento-features li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: .875rem; color: var(--tx); }
.bento-features li svg { flex-shrink: 0; color: var(--green); margin-top: 2px; }

/* Visual element in card */
.bento-visual { margin-top: 24px; background: var(--bg); border-radius: 12px; border: 1px solid var(--bd); overflow: hidden; }

@media (min-width: 768px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .bento-grid--hero { grid-template-columns: 1.2fr .8fr; }
  .bento-grid--hero .bento-card:first-child { grid-row: span 2; }
}

/* =========== PROVIDER GRID =========== */
.provider-section { padding: 120px 0; }
.provider-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 900px; margin: 0 auto; }
.provider-card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); padding: 28px; transition: all .3s; }
.provider-card:hover { border-color: var(--bd2); }
.provider-card__name { font-size: 1rem; font-weight: 700; color: var(--tx2); margin-bottom: 12px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.provider-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.provider-card__caps { display: flex; flex-wrap: wrap; gap: 6px; }
.cap { font-size: .6875rem; font-weight: 500; padding: 4px 10px; border-radius: 6px; }
.cap--on { background: rgba(45,212,168,.08); color: var(--green); border: 1px solid rgba(45,212,168,.15); }
.cap--off { background: transparent; color: var(--txm); border: 1px solid var(--bd); text-decoration: line-through; opacity: .5; }
.provider-note { text-align: center; margin-top: 24px; font-size: .875rem; color: var(--txm); }
.provider-note strong { color: var(--tx); font-weight: 600; }

@media (min-width: 640px) { .provider-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .provider-grid { grid-template-columns: repeat(5, 1fr); } }

/* =========== CODE SHOWCASE =========== */
.showcase-section { padding: 120px 0; }
.showcase__tabs { display: inline-flex; background: var(--card); border: 1px solid var(--bd); border-radius: 10px; padding: 4px; margin-bottom: 32px; }
.showcase__tab { font-family: var(--font); font-size: .8rem; font-weight: 500; color: var(--txm); background: none; border: none; border-radius: 8px; padding: 9px 20px; cursor: pointer; transition: all .2s; }
.showcase__tab:hover { color: var(--tx2); }
.showcase__tab.active { color: var(--tx2); background: rgba(255,255,255,.06); }
.showcase__panel { display: none; }
.showcase__panel.active { display: block; }
.code-win--lg { max-width: 760px; margin: 0 auto; }

/* =========== HOW IT WORKS =========== */
.how-section { padding: 120px 0; }
.how-grid { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: 900px; margin: 0 auto; }
.how-card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r2); padding: 36px; display: flex; gap: 20px; align-items: flex-start; transition: border-color .3s; }
.how-card:hover { border-color: var(--bd2); }
.how-num { width: 48px; height: 48px; min-width: 48px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--bd); color: var(--green); font-weight: 800; font-size: 1.125rem; display: flex; align-items: center; justify-content: center; }
.how-body h3 { font-size: 1.125rem; font-weight: 700; color: var(--tx2); margin-bottom: 6px; letter-spacing: -.02em; }
.how-body p { font-size: .9rem; color: var(--tx); line-height: 1.65; margin-bottom: 10px; }
.how-body p code { color: var(--green); background: rgba(45,212,168,.06); padding: 1px 6px; border-radius: 4px; font-size: .8125em; }
.how-code { display: inline-block; font-family: var(--mono); font-size: .75rem; color: var(--green); background: rgba(45,212,168,.06); border: 1px solid rgba(45,212,168,.12); border-radius: 8px; padding: 6px 14px; }
@media (min-width: 768px) { .how-grid { grid-template-columns: repeat(3, 1fr); } .how-card { flex-direction: column; } }

/* =========== USE CASES =========== */
.cases-section { padding: 120px 0; }
.cases-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.case-card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r2); padding: 32px; transition: border-color .3s; }
.case-card:hover { border-color: var(--bd2); }
.case-card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg3); border: 1px solid var(--bd); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.case-card__icon svg { color: var(--accent2); width: 20px; height: 20px; }
.case-card h3 { font-size: 1rem; font-weight: 700; color: var(--tx2); margin-bottom: 8px; letter-spacing: -.02em; }
.case-card p { font-size: .875rem; color: var(--tx); line-height: 1.65; }
@media (min-width: 640px) { .cases-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cases-grid { grid-template-columns: repeat(4, 1fr); } }

/* =========== GETTING STARTED =========== */
.start-section { padding: 120px 0; }
.start-grid { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.start-step { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); overflow: hidden; }
.start-step__head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--bd); font-weight: 600; font-size: .875rem; color: var(--tx2); }
.start-step__num { width: 24px; height: 24px; border-radius: 8px; background: rgba(45,212,168,.1); color: var(--green); font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.start-step__code { position: relative; padding: 16px 20px; }
.start-step__code pre { margin: 0; background: transparent !important; overflow-x: auto; }
.start-step__code code { font-family: var(--mono); font-size: .8rem; line-height: 1.7; color: var(--tx); }
.start-step__code .copy-btn { position: absolute; top: 12px; right: 12px; }
.start-cta { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========== FAQ =========== */
.faq-section { padding: 120px 0; }
.faq-list { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.faq-item { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); overflow: hidden; transition: border-color .25s; }
.faq-item[open] { border-color: var(--bd2); }
.faq-item summary { padding: 18px 22px; font-weight: 600; font-size: .9375rem; color: var(--tx2); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; transition: color .2s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.25rem; font-weight: 300; color: var(--txm); transition: all .2s; }
.faq-item[open] summary::after { content: '\2212'; color: var(--green); }
.faq-answer { padding: 0 22px 18px; }
.faq-answer p { color: var(--tx); font-size: .9rem; line-height: 1.7; }
.faq-answer code { color: var(--green); background: rgba(45,212,168,.06); padding: 1px 6px; border-radius: 4px; font-size: .8125em; }

/* =========== FINAL CTA =========== */
.cta-section { padding: 120px 0 140px; text-align: center; position: relative; overflow: hidden; }
.cta-section__glow { position: absolute; width: 800px; height: 400px; border-radius: 50%; bottom: -200px; left: 50%; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(124,106,255,.08), transparent 70%); pointer-events: none; }
.cta-title { font-size: 3.5rem; font-weight: 900; line-height: 1.05; letter-spacing: -.06em; color: var(--tx2); margin-bottom: 32px; }
.cta-title .thin { font-weight: 400; color: var(--tx); }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
@media (max-width: 768px) { .cta-title { font-size: 2.25rem; } }

/* =========== FOOTER =========== */
.footer { border-top: 1px solid var(--bd); background: var(--bg2); padding: 64px 0 32px; }
.footer__top { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 48px; }
.footer__brand .nav__logo { margin-bottom: 12px; }
.footer__brand p { color: var(--txm); font-size: .8125rem; line-height: 1.65; }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__links h4 { font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--tx2); margin-bottom: 12px; }
.footer__links a { display: block; color: var(--txm); font-size: .8125rem; margin-bottom: 8px; transition: color .2s; }
.footer__links a:hover { color: var(--tx2); }
.footer__bot { border-top: 1px solid var(--bd); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer__bot p { font-size: .75rem; color: var(--txm); }
.footer__fine { font-size: .6875rem !important; color: #333 !important; }
@media (min-width: 768px) { .footer__top { grid-template-columns: 1.5fr 2fr; } }

/* =========== ANIMATIONS =========== */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .5s cubic-bezier(.4,0,.2,1), transform .5s cubic-bezier(.4,0,.2,1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger .fade-in:nth-child(2) { transition-delay: .05s; }
.stagger .fade-in:nth-child(3) { transition-delay: .10s; }
.stagger .fade-in:nth-child(4) { transition-delay: .15s; }
.stagger .fade-in:nth-child(5) { transition-delay: .20s; }
.stagger .fade-in:nth-child(6) { transition-delay: .25s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Performance */
.bento-section, .showcase-section, .how-section, .provider-section, .cases-section, .start-section, .faq-section, .cta-section { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* Prism overrides */
pre[class*="language-"], code[class*="language-"] { background: none !important; text-shadow: none !important; }

@media (min-width: 1024px) { .section-title { font-size: 3.25rem; } }
@media (max-width: 480px) { .section-title { font-size: 2rem; } }
