/* ============ SwapAi — Lusion Light prototype ============ */

:root {
  --bg: #eeeeea;
  --ink: #111111;
  --ink-soft: #55554f;
  --accent: #4f46e5;
  --accent-soft: #c7d2fe;
  --card: #ffffff;
  --radius: 24px;
  --font-sans: "Archivo", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 820px; }

/* ---------- typography ---------- */

h1 {
  font-size: clamp(2.9rem, 7.3vw, 4.9rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
  /* keep headline clear of the robot pinned to the right */
  max-width: min(830px, calc(100vw - 470px));
}
h1 em {
  font-style: normal;
  color: var(--accent);
}
h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0) scale(0.99); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); }
.btn-ghost {
  color: var(--ink);
  border: 1px solid #bbbbb4;
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

.arr { display: inline-block; transition: transform 0.25s; }
.btn:hover .arr, .link-arrow:hover .arr { transform: translate(3px, -1px); }

.link-arrow {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 0;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.nav.scrolled {
  background: rgba(238, 238, 234, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.07);
  padding: 10px 0;
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.logo sup { font-size: 0.5em; color: var(--ink-soft); font-weight: 600; }

.nav-links { display: flex; gap: 26px; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.nav-links a:hover::after { transform: scaleX(1); }

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

.hero {
  position: relative;
  padding: 170px 0 0;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; padding-bottom: 90px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  border: 1px solid #ccccc4;
  border-radius: 999px;
  padding: 8px 16px;
  margin-bottom: 34px;
  background: rgba(255, 255, 255, 0.5);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.hero-lead {
  max-width: 560px;
  margin: 30px 0 40px;
  font-size: 1.08rem;
  color: var(--ink-soft);
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* robot */
.robot-wrap {
  position: absolute;
  bottom: 0;
  right: max(24px, calc((100vw - 1180px) / 2 - 30px));
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.robot-wrap::before {
  content: "";
  position: absolute;
  inset: 10% -15% -20% -15%;
  background: radial-gradient(ellipse at 55% 60%, rgba(79, 70, 229, 0.22), rgba(217, 70, 239, 0.10) 45%, transparent 70%);
  animation: glow 5s ease-in-out infinite alternate;
}
@keyframes glow {
  from { opacity: 0.65; }
  to   { opacity: 1; }
}
.robot-box {
  position: relative;
  transform-origin: bottom center;
  animation: robot-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both,
             breathe 6s ease-in-out 1.3s infinite;
}
.robot {
  display: block;
  width: auto;
  height: min(60vh, 520px);
  /* NOTE: no drop-shadow here — combined with the animated ancestor Chrome
     renders the shadow from the image rect (not the alpha silhouette),
     painting a ghost rectangle; ::before glow provides depth instead */
  /* soften the hard right-side crop: fade lower-right into the page */
  -webkit-mask-image: linear-gradient(112deg, #000 70%, transparent 93%);
  mask-image: linear-gradient(112deg, #000 70%, transparent 93%);
}
.robot-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  pointer-events: none;
}
@keyframes robot-in {
  from { opacity: 0; transform: translateY(46px); }
  to   { opacity: 1; transform: none; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.014); }
}

/* keep base orb for CTA section decoration */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

/* marquee */
.marquee {
  position: relative;
  z-index: 3;
  background: var(--ink);
  overflow: hidden;
  padding: 13px 0;
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  flex-shrink: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

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

.section { padding: 110px 0 0; }
.section-head { margin-bottom: 48px; }
.section-more { margin-top: 36px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(17, 17, 17, 0.09);
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--ink-soft); font-size: 0.97rem; }

.card-num {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #ddddd6;
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

/* pricing */
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card h3 a { color: inherit; text-decoration: none; }
.price-card h3 a:hover { color: var(--accent); }
.price {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.price strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.price .mono { font-size: 0.75rem; color: var(--ink-soft); }

.price-card.featured {
  background: var(--accent);
  color: #fff;
  transform: scale(1.03);
}
.price-card.featured:hover { transform: scale(1.03) translateY(-6px); box-shadow: 0 28px 56px rgba(79, 70, 229, 0.35); }
.price-card.featured p { color: var(--accent-soft); }
.price-card.featured h3 a:hover { color: var(--accent-soft); }
.price-card.featured .price .mono { color: var(--accent-soft); }
.tag {
  position: absolute;
  top: 22px; right: 22px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
}

/* dark process cards */
.card-dark { background: var(--ink); color: #fff; }
.card-dark p { color: #a3a39b; }
.card-dark:hover { box-shadow: 0 24px 48px rgba(17, 17, 17, 0.25); }
.step-num {
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 26px;
  background: linear-gradient(135deg, #fff 30%, #6b6b64);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- about / stats ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-text h2 { margin-bottom: 22px; }
.about-text p { color: var(--ink-soft); margin-bottom: 28px; max-width: 460px; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.stat:hover { transform: translateY(-4px); }
.stat strong {
  display: block;
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--accent);
}
.stat .mono {
  font-size: 0.7rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ---------- FAQ ---------- */

.faq details {
  background: var(--card);
  border-radius: 18px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 26px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-icon {
  position: relative;
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform 0.3s;
}
.faq-icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-icon::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq details[open] .faq-icon::after { transform: rotate(90deg); }
.faq details p {
  padding: 0 26px 24px;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ---------- CTA ---------- */

.section-cta { padding-bottom: 0; }
.cta-card {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  border-radius: 32px;
  padding: 90px 60px;
  text-align: center;
}
.cta-card h2 { margin-bottom: 18px; }
.cta-card p { color: #a3a39b; margin-bottom: 36px; }
.orb-cta {
  position: absolute;
  width: 480px; height: 480px;
  bottom: -320px; left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(129, 140, 248, 0.55), rgba(79, 70, 229, 0.15) 60%, transparent 75%);
  pointer-events: none;
}

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

.footer { padding: 70px 0 40px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-inner p { color: var(--ink-soft); font-size: 0.9rem; margin-top: 12px; }
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-align: right;
}
.footer-meta a { color: var(--ink); text-decoration: none; }
.footer-meta a:hover { color: var(--accent); }

/* ---------- reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.grid-3 .reveal:nth-child(2), .stats .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid-3 .reveal:nth-child(3), .stats .reveal:nth-child(3) { transition-delay: 0.2s; }
.stats .reveal:nth-child(4) { transition-delay: 0.3s; }

/* hero load-in */
.hero-badge, .hero h1, .hero-lead, .hero-cta {
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero h1 { animation-delay: 0.08s; }
.hero-lead { animation-delay: 0.18s; }
.hero-cta { animation-delay: 0.28s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .robot-fx { display: none; } /* SMIL ignores CSS animation rules */
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-6px); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .robot { height: 380px; }
  .robot-wrap { right: 0; }
  h1 { max-width: calc(100vw - 330px); }
  .hero-lead { max-width: min(560px, calc(100vw - 330px)); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { padding-top: 130px; }
  .robot-wrap {
    position: static;
    margin: 34px 0 -5px;
    display: flex;
    justify-content: center;
  }
  .robot { height: 300px; }
  .hero-inner { padding-bottom: 0; }
  h1 { max-width: none; }
  .hero-lead { max-width: none; }
  .cta-card { padding: 60px 28px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-meta { text-align: left; }
}

@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr; }
}
