/* Reytech AI landing — judgment that ships */
:root {
  --bg: #0b0e14;
  --bg-soft: #11151f;
  --bg-muted: #f5f6f8;
  --surface: #161b27;
  --ink: #0b0e14;
  --text: #e7ebf3;
  --text-dim: #a4adbf;
  --text-ink: #1a2030;
  --text-ink-dim: #51607a;
  --accent: #5b8cff;
  --accent-2: #38e0c4;
  --line: #232a3a;
  --line-light: #e4e7ee;
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 640px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand__ai { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #4a6fe0);
  color: #fff;
  box-shadow: 0 6px 24px rgba(91, 140, 255, 0.28);
}
.btn--primary:hover { background: linear-gradient(135deg, #6f9bff, #5680f0); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: #fff; }
.btn--block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 90px;
  background:
    radial-gradient(900px 420px at 70% -10%, rgba(91, 140, 255, 0.18), transparent 60%),
    radial-gradient(700px 380px at 10% 10%, rgba(56, 224, 196, 0.10), transparent 55%);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 18px;
}
.eyebrow--center { text-align: center; }
.hero__title {
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 22px;
}
.hero__sub {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 18px;
}
.hero__control {
  font-size: 18px;
  margin-bottom: 34px;
  color: var(--text);
}
.hero__control strong { color: var(--accent-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section--dark { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--muted { background: var(--bg-soft); }
.section__title {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.section__title--center { text-align: center; }
.section__lede {
  text-align: center;
  color: var(--text-dim);
  font-size: 18px;
  max-width: 620px;
  margin: -24px auto 44px;
}
.section__lede--center { text-align: center; }

/* ---------- Grid + cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { font-size: 20px; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--text-dim); }
.card--accent {
  border-color: rgba(91, 140, 255, 0.5);
  background: linear-gradient(160deg, rgba(91, 140, 255, 0.10), var(--surface) 60%);
}
.card--accent p { color: var(--text); }

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.stat {
  text-align: center;
  padding: 26px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat__num {
  display: block;
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__label { color: var(--text-dim); font-size: 14px; }
.proof__note {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 17px;
}
.proof__note strong { color: var(--text); }

/* ---------- Pricing ladder ---------- */
.pricing { display: flex; flex-direction: column; position: relative; }
.pricing__name { font-size: 22px; }
.pricing__price { margin: 6px 0 14px; }
.pricing__amount { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.pricing__unit { font-size: 15px; font-weight: 600; color: var(--text-dim); }
.pricing__desc { margin-bottom: 18px; }
.pricing__list { list-style: none; margin: 0 0 24px; padding: 0; }
.pricing__list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--text-dim);
  font-size: 15px;
}
.pricing__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: 700;
}
.pricing .btn { margin-top: auto; }
.pricing--featured {
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(91, 140, 255, 0.18);
  transform: translateY(-8px);
}
.pricing__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d4ed8; /* darker than --accent so white text meets WCAG AA contrast */
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}

/* ---------- Process ---------- */
.step { text-align: left; }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(91, 140, 255, 0.14);
  border: 1px solid rgba(91, 140, 255, 0.4);
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--text-dim); }

/* ---------- Form ---------- */
.form { margin-top: 12px; }
.form__row { margin-bottom: 18px; display: flex; flex-direction: column; }
.form__row label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.form input, .form textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}
.form textarea { resize: vertical; }
.form__status {
  margin-top: 14px;
  font-size: 15px;
  text-align: center;
  min-height: 22px;
}
.form__status.is-ok { color: var(--accent-2); }
.form__status.is-err { color: #ff8080; }
.form__alt { text-align: center; margin-top: 22px; color: var(--text-dim); }
.form__alt a { color: var(--accent); font-weight: 600; text-decoration: none; }
.form__alt a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 14px;
}
.footer__tag { font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .pricing--featured { transform: none; }
  .nav__links a:not(.btn) { display: none; }
  .hero { padding: 80px 0 60px; }
  .section { padding: 60px 0; }
  /* The animated demo is desktop-only — too cramped at phone widths. */
  .section--demo { display: none; }
}

/* ---------- Product demo animation (RFQ chaos -> structured data) ---------- */
.section--demo { padding-top: 8px; }
.demo {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 18px auto 0;
  aspect-ratio: 16 / 9;
  background: radial-gradient(120% 120% at 50% 0%, rgba(91,140,255,0.06), #0b0e16);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.demo__pdfs { position: absolute; left: 6%; top: 14%; display: flex; gap: 10px; flex-wrap: wrap; width: 42%; z-index: 2; }
.demo__pdf {
  width: 54px; height: 74px; background: #f7f8fa; border: 2px solid #ef4444; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font: 700 11px/1.2 var(--font); color: #dc2626; text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); animation: demoChaos 1.8s infinite ease-in-out;
}
.demo__pdf span { font-size: 8px; font-weight: 600; color: #b91c1c; }
.demo__pdf:nth-child(2) { animation-delay: .15s; }
.demo__pdf:nth-child(3) { animation-delay: .3s; }
.demo__pdf:nth-child(4) { animation-delay: .45s; }
@keyframes demoChaos { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(12px); } }
.demo__cursor { position: absolute; left: 12%; top: 70%; z-index: 6; transition: left 1.2s ease, top 1.2s ease; }
.demo__btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent), #4a6fe0); color: #fff;
  font: 700 16px var(--font); padding: 14px 26px; border: none; border-radius: 14px;
  box-shadow: 0 6px 24px rgba(91, 140, 255, 0.35); z-index: 5; cursor: default;
  transition: transform .25s ease, box-shadow .25s ease;
}
.demo__btn.is-pressed { transform: translate(-50%, -50%) scale(1.12); box-shadow: 0 0 40px 8px rgba(91, 140, 255, 0.6); }
.demo__form, .demo__papers, .demo__db, .demo__keywords, .demo__final { opacity: 0; transition: opacity .5s ease; }
.demo.is-show-form .demo__form,
.demo.is-show-db .demo__db,
.demo.is-show-kw .demo__keywords,
.demo.is-show-final .demo__final { opacity: 1; }
.demo__form {
  position: absolute; right: 6%; top: 14%; width: 38%; background: var(--surface);
  border: 1px solid var(--accent-2); border-radius: 16px; padding: 16px; z-index: 4;
}
.demo__row { display: flex; justify-content: space-between; font: 500 12px var(--font); color: var(--text-dim); padding: 5px 0; }
.demo__ok { color: var(--accent-2); font-weight: 700; }
.demo__papers { position: absolute; right: 18%; bottom: 32%; display: flex; gap: 6px; font-size: 28px; z-index: 3; }
.demo.is-show-papers .demo__papers { opacity: 1; }
.demo.is-fly .demo__papers { animation: demoFly 1.4s forwards ease-in; }
@keyframes demoFly { 0% { transform: translate(0, 0) rotate(0); } 100% { transform: translate(60px, 88px) rotate(180deg); opacity: 0; } }
.demo__db {
  position: absolute; right: 6%; bottom: 7%; width: 200px; background: rgba(56, 224, 196, 0.08);
  border: 2px solid var(--accent-2); border-radius: 16px; padding: 14px; text-align: center; z-index: 4;
}
.demo__db-icon { font-size: 42px; line-height: 1; }
.demo__db-label { font: 700 13px var(--font); letter-spacing: .15em; color: var(--accent-2); margin-top: 4px; }
.demo__db-sub { font: 500 11px var(--font); color: var(--text-dim); margin-top: 6px; }
.demo__keywords { position: absolute; left: 6%; bottom: 8%; display: flex; flex-wrap: wrap; gap: 8px; max-width: 45%; z-index: 4; }
.demo__keywords span { background: rgba(56, 224, 196, 0.12); color: var(--accent-2); font: 600 11px var(--font); padding: 6px 14px; border-radius: 999px; }
.demo__final {
  position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%);
  font: 800 clamp(22px, 4vw, 38px) var(--font); color: var(--text); white-space: nowrap; z-index: 7;
}
@media (prefers-reduced-motion: reduce) {
  .demo__pdfs, .demo__cursor, .demo__btn, .demo__papers, .demo__final { display: none; }
  .demo__form, .demo__db, .demo__keywords { opacity: 1; }
}
