/* ============================================================
   ENGINE DESK — PRE-LAUNCH
   Light SaaS design matching the application UI
============================================================ */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --background: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;

  --text: #111827;
  --text-secondary: #667085;
  --text-muted: #98a2b3;

  --border: #e4e7ec;
  --border-light: #eaecf0;

  --success: #16a34a;
  --success-light: #f0fdf4;

  --warning: #f59e0b;
  --warning-light: #fff7ed;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);

  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.07);

  --shadow-lg: 0 24px 60px rgba(16, 24, 40, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --max-width: 1160px;
}

/* ============================================================
   RESET
============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;

  background: var(--background);
  color: var(--text);

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

/* ============================================================
   LAYOUT
============================================================ */

.container {
  width: min(calc(100% - 48px), var(--max-width));

  margin-inline: auto;
}

/* ============================================================
   HEADER
============================================================ */

.site-header {
  position: relative;
  z-index: 10;

  background: rgba(245, 247, 250, 0.9);

  border-bottom: 1px solid rgba(228, 231, 236, 0.8);

  backdrop-filter: blur(12px);
}

.header-inner {
  height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  flex-shrink: 0;
}

/* Real icon asset (same mark used in the app header), not a CSS-drawn
   placeholder - keeps the mark's gradient shading, which a flat
   background/border approximation couldn't reproduce. */
.brand-mark {
  display: block;

  width: 34px;
  height: 34px;

  object-fit: contain;
}

.brand-name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.5px;

  color: var(--text);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;

  margin-left: auto;
}

.header-nav a {
  color: var(--text-secondary);

  font-size: 14px;
  font-weight: 500;

  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--primary);
}

.lang-switch {
  padding: 4px 9px;

  border: 1px solid var(--border, #e2e2e2);
  border-radius: 6px;

  font-size: 12px !important;
  letter-spacing: 0.04em;
}

/* ============================================================
   BUTTONS
============================================================ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  border: 1px solid var(--primary);

  background: var(--primary);
  color: white;

  border-radius: var(--radius-sm);

  font-weight: 600;

  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);

  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.24);

  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button-small {
  min-height: 40px;
  padding: 0 17px;

  font-size: 14px;
}

.button-large {
  min-height: 50px;
  padding: 0 22px;

  font-size: 15px;
}

.button-submit {
  width: 100%;
  min-height: 50px;

  font-size: 15px;
}

/* ============================================================
   HERO
============================================================ */

.hero {
  position: relative;

  padding: 88px 0 100px;

  overflow: hidden;

  background: radial-gradient(
    circle at 50% 0%,
    rgba(37, 99, 235, 0.09),
    transparent 38%
  );
}

.hero-content {
  max-width: 780px;

  margin: 0 auto;

  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 6px 12px;

  background: var(--primary-light);
  color: var(--primary);

  border: 1px solid var(--primary-border);

  border-radius: 999px;

  font-size: 13px;
  font-weight: 600;
}

.badge-dot {
  position: relative;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--primary);

  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.badge-dot::after {
  content: '';

  position: absolute;
  inset: 0;

  border-radius: 50%;

  background: var(--primary);

  animation: badge-dot-pulse 1s ease-out infinite;
}

@keyframes badge-dot-pulse {
  0% {
    opacity: 0.55;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(3.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .badge-dot::after {
    animation: none;
  }
}

.hero h1 {
  margin: 22px auto 20px;

  max-width: 780px;

  font-size: clamp(44px, 6vw, 68px);

  line-height: 1.04;

  letter-spacing: -3px;

  font-weight: 750;
}

.hero h1 span {
  display: block;

  color: var(--primary);
}

.hero-description {
  max-width: 670px;

  margin: 0 auto;

  color: var(--text-secondary);

  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 22px;

  margin-top: 32px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--text-secondary);

  font-size: 14px;
  font-weight: 600;

  transition: color 0.2s ease;
}

.text-button:hover {
  color: var(--primary);
}

.hero-note {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  margin-top: 18px;

  color: var(--text-muted);

  font-size: 13px;
}

.check-icon {
  display: inline-grid;
  place-items: center;

  width: 17px;
  height: 17px;

  background: var(--success-light);
  color: var(--success);

  border-radius: 50%;

  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   PRODUCT PREVIEW
============================================================ */

.product-preview-wrapper {
  position: relative;

  max-width: 1060px;

  margin: 70px auto 0;
}

.preview-glow {
  position: absolute;

  width: 80%;
  height: 150px;

  left: 10%;
  bottom: -30px;

  background: rgba(37, 99, 235, 0.16);

  filter: blur(70px);

  border-radius: 50%;
}

.product-preview {
  position: relative;
  z-index: 1;

  overflow: hidden;

  background: white;

  border: 1px solid var(--border);

  border-radius: var(--radius-xl);

  box-shadow: var(--shadow-lg);
}

.preview-browser-bar {
  height: 42px;

  display: flex;
  align-items: center;

  gap: 18px;

  padding: 0 16px;

  background: #f8fafc;

  border-bottom: 1px solid var(--border-light);
}

.browser-dots {
  display: flex;
  gap: 5px;
}

.browser-dots span {
  width: 8px;
  height: 8px;

  background: #d0d5dd;

  border-radius: 50%;
}

.browser-address {
  flex: 1;

  max-width: 380px;

  height: 25px;

  display: flex;
  align-items: center;

  padding: 0 10px;

  background: white;

  border: 1px solid var(--border);

  border-radius: 5px;

  color: #98a2b3;

  font-size: 10px;
}

.preview-content {
  display: flex;

  min-height: 470px;

  background: #f5f6f8;
}

.preview-sidebar {
  width: 185px;

  padding: 20px 12px;

  background: #f5f6f8;

  border-right: 1px solid var(--border-light);
}

.preview-logo {
  display: flex;
  align-items: center;

  gap: 7px;

  padding: 0 8px 18px;

  color: #263238;

  font-family: Georgia, serif;

  font-size: 13px;
}

.preview-logo-mark {
  width: 23px;
  height: 23px;

  display: grid;
  place-items: center;

  background: #4f7fe9;
  color: white;

  border-radius: 50%;

  font-family: Arial, sans-serif;
  font-weight: 700;
}

.preview-nav-item {
  display: flex;
  align-items: center;

  gap: 10px;

  height: 42px;

  padding: 0 12px;

  margin-bottom: 4px;

  color: #344054;

  border-radius: 9px;

  font-size: 11px;
}

.preview-nav-item span {
  width: 20px;

  color: var(--primary);

  text-align: center;
}

.preview-nav-item.active {
  background: var(--primary);
  color: white;

  box-shadow: 0 3px 7px rgba(37, 99, 235, 0.2);
}

.preview-nav-item.active span {
  color: white;
}

.preview-main {
  flex: 1;

  min-width: 0;

  padding: 30px;
}

.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.preview-title {
  font-size: 21px;
  font-weight: 600;
  color: #101828;
}

.preview-subtitle {
  margin-top: 2px;

  color: #667085;

  font-size: 10px;
}

.preview-button {
  padding: 9px 14px;

  background: var(--primary);
  color: white;

  border-radius: 6px;

  font-size: 10px;
  font-weight: 600;

  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}

.preview-tabs {
  display: flex;

  gap: 28px;

  margin-top: 27px;

  border-bottom: 1px solid var(--border);
}

.preview-tabs span {
  position: relative;

  padding: 0 0 11px;

  color: #667085;

  font-size: 10px;
}

.preview-tabs span.active {
  color: var(--primary);
}

.preview-tabs span.active::after {
  content: '';

  position: absolute;

  left: 0;
  right: 0;
  bottom: -1px;

  height: 2px;

  background: var(--primary);
}

.preview-search {
  display: flex;
  align-items: center;

  gap: 8px;

  height: 38px;

  margin-top: 17px;

  padding: 0 12px;

  background: white;

  border: 1px solid var(--border);

  border-radius: 7px;

  color: #98a2b3;

  font-size: 9px;
}

.preview-table {
  margin-top: 16px;

  overflow: hidden;

  background: white;

  border: 1px solid var(--border);

  border-radius: 9px;
}

.preview-table-header,
.preview-row {
  display: grid;

  grid-template-columns:
    1fr
    1.4fr
    1.2fr
    1fr;

  gap: 15px;

  align-items: center;

  padding: 12px 14px;
}

.preview-table-header {
  background: #fafafa;

  border-bottom: 1px solid var(--border);

  color: #475467;

  font-size: 7px;
  font-weight: 700;
}

.preview-row {
  min-height: 55px;

  border-bottom: 1px solid #f2f4f7;

  color: #344054;

  font-size: 9px;
}

.preview-row:last-child {
  border-bottom: 0;
}

.preview-row small {
  display: block;

  margin-top: 2px;

  color: #98a2b3;

  font-size: 7px;
}

.preview-row .status {
  display: inline-block;

  padding: 4px 7px;

  border-radius: 999px;

  font-size: 7px;
  font-style: normal;
  font-weight: 500;
}

.status.blue {
  background: #eff8ff;
  color: #1570ef;

  border: 1px solid #b2ddff;
}

.status.orange {
  background: #fff6ed;
  color: #c4320a;

  border: 1px solid #fedf89;
}

/* ============================================================
   INTRO
============================================================ */

.intro-section {
  padding: 100px 0;

  background: white;

  border-top: 1px solid var(--border-light);

  border-bottom: 1px solid var(--border-light);
}

.intro-grid {
  display: grid;

  grid-template-columns:
    1fr
    1fr;

  gap: 100px;

  align-items: center;
}

.section-label {
  display: block;

  margin-bottom: 14px;

  color: var(--primary);

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 1.2px;
}

.intro-grid h2,
.section-heading h2,
.early-access-content h2 {
  margin: 0;

  font-size: clamp(32px, 4vw, 46px);

  line-height: 1.12;

  letter-spacing: -1.7px;
}

.intro-grid h2 span {
  color: var(--primary);
}

.intro-grid p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 17px;

  line-height: 1.8;
}

/* ============================================================
   FEATURES
============================================================ */

.features-section {
  padding: 110px 0;
}

.section-heading {
  max-width: 650px;

  margin-bottom: 48px;
}

.section-heading p {
  margin: 15px 0 0;

  color: var(--text-secondary);

  font-size: 16px;
}

.feature-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 18px;
}

.feature-card {
  min-height: 260px;

  padding: 28px;

  background: white;

  border: 1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);

  border-color: #cbd5e1;

  box-shadow: var(--shadow-md);
}

.feature-card-large {
  grid-column: span 2;

  min-height: 300px;

  display: flex;
  flex-direction: column;
}

.feature-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  margin-bottom: 22px;

  background: var(--primary-light);
  color: var(--primary);

  border-radius: 10px;

  font-size: 18px;
}

.feature-card h3 {
  margin: 0 0 9px;

  color: var(--text);

  font-size: 18px;
}

.feature-card p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 14px;

  line-height: 1.7;
}

.feature-mini-ui {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: auto;
  padding-top: 25px;

  font-size: 11px;
}

.feature-mini-ui span {
  color: #667085;
}

.feature-mini-ui strong {
  color: #344054;
}

.feature-mini-ui em {
  padding: 4px 8px;

  background: var(--primary-light);
  color: var(--primary);

  border-radius: 999px;

  font-style: normal;
  font-size: 10px;
}

/* ============================================================
   EARLY ACCESS
============================================================ */

.early-access-section {
  padding: 110px 0;

  background: white;

  border-top: 1px solid var(--border-light);
}

.early-access-card {
  display: grid;

  grid-template-columns:
    1.05fr
    0.95fr;

  gap: 70px;

  padding: 60px;

  background: linear-gradient(135deg, #f8fbff, #eef5ff);

  border: 1px solid #dbe7fb;

  border-radius: var(--radius-xl);

  box-shadow: 0 15px 45px rgba(37, 99, 235, 0.08);
}

/* Grid items default to `min-width: auto`, which lets a child's intrinsic
   minimum size (e.g. the Turnstile widget enforcing its own ~300px floor
   even in `data-size="flexible"` mode) force this 1fr column wider than
   the available space - a classic grid "blowout" that pushes the whole
   card past the viewport on narrow screens. `min-width: 0` lets the track
   actually shrink to fit; the content inside still wraps/scrolls on its
   own as needed. */
.early-access-content,
.signup-card {
  min-width: 0;
}

.early-access-content h2 span {
  display: block;

  color: var(--primary);
}

.early-access-content > p {
  max-width: 530px;

  margin: 20px 0 26px;

  color: var(--text-secondary);

  font-size: 16px;

  line-height: 1.75;
}

.offer {
  display: flex;

  align-items: center;

  gap: 13px;

  max-width: 480px;

  padding: 14px 16px;

  background: white;

  border: 1px solid var(--border);

  border-radius: var(--radius-md);

  box-shadow: var(--shadow-sm);
}

.offer-icon {
  width: 36px;
  height: 36px;

  flex-shrink: 0;

  display: grid;
  place-items: center;

  background: var(--primary-light);
  color: var(--primary);

  border-radius: 9px;

  font-weight: 700;
}

.offer strong,
.offer span {
  display: block;
}

.offer strong {
  margin-bottom: 2px;

  font-size: 13px;
}

.offer span {
  color: var(--text-secondary);

  font-size: 12px;
}

/* ============================================================
   SIGNUP FORM
============================================================ */

.signup-card {
  padding: 28px;

  background: white;

  border: 1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-md);
}

.form-group label {
  display: block;

  margin-bottom: 7px;

  color: #344054;

  font-size: 13px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  height: 46px;

  padding: 0 13px;

  background: white;

  border: 1px solid #d0d5dd;

  border-radius: 7px;

  outline: none;

  color: var(--text);

  font-size: 14px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-group input::placeholder {
  color: #98a2b3;
}

.form-group input:focus {
  border-color: var(--primary);

  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.turnstile-wrapper {
  width: 100%;
  max-width: 100%;

  margin: 17px 0;

  /* Cloudflare's own `data-size="flexible"` widget still enforces a hard
     ~300px minimum width (documented behavior, not something our CSS can
     override). On the narrowest phones the signup card has less than that
     available even after fixing the grid blowout above, so this is a
     last-resort local scroll rather than letting the widget drag the
     whole page wider again. */
  overflow-x: auto;
}

.consent {
  display: flex;
  align-items: flex-start;

  gap: 9px;

  margin: 16px 0 18px;

  color: var(--text-secondary);

  font-size: 11px;

  line-height: 1.55;

  cursor: pointer;
}

.consent input {
  width: 15px;
  height: 15px;

  flex-shrink: 0;

  margin-top: 1px;

  accent-color: var(--primary);
}

.privacy-note {
  margin: 13px 0 0;

  color: var(--text-muted);

  text-align: center;

  font-size: 11px;
}

.privacy-note a {
  color: var(--primary);

  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-message {
  min-height: 20px;

  margin: 12px 0 0;

  text-align: center;

  font-size: 12px;
}

.form-message.success {
  color: var(--success);
}

.form-message.error {
  color: #d92d20;
}

.honeypot {
  position: absolute;

  width: 1px;
  height: 1px;

  overflow: hidden;

  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   FOOTER
============================================================ */

.site-footer {
  padding: 45px 0;

  background: #ffffff;

  border-top: 1px solid var(--border-light);
}

.footer-inner {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 30px;
}

.footer-brand p {
  margin: 9px 0 0;

  color: var(--text-muted);

  font-size: 12px;
}

.footer-links {
  display: flex;

  gap: 25px;

  color: var(--text-secondary);

  font-size: 12px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copyright {
  color: var(--text-muted);

  font-size: 11px;
}

/* ============================================================
   LEGAL
============================================================ */

.legal-section {
  padding: 70px 0 110px;
}

.legal-content {
  max-width: 720px;

  margin-inline: auto;
}

.legal-content h1 {
  margin: 0 0 8px;

  font-size: 36px;

  letter-spacing: -1px;
}

.legal-updated {
  margin: 0 0 40px;

  color: var(--text-secondary);

  font-size: 14px;
}

.legal-content h2 {
  margin: 40px 0 14px;

  color: var(--text);

  font-size: 20px;
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);

  font-size: 15px;
  line-height: 1.75;
}

.legal-content p {
  margin: 0 0 16px;
}

.legal-content ul {
  margin: 0 0 16px;

  padding-left: 20px;
}

.legal-content strong {
  color: var(--text);
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 900px) {
  .header-nav {
    display: none;
  }

  .hero {
    padding-top: 65px;
  }

  .hero h1 {
    letter-spacing: -2px;
  }

  .intro-grid {
    grid-template-columns: 1fr;

    gap: 25px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card-large {
    grid-column: span 2;
  }

  .early-access-card {
    grid-template-columns: 1fr;

    gap: 40px;

    padding: 40px;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .header-inner {
    height: 68px;
  }

  .header-inner > .button {
    display: none;
  }

  .hero {
    padding: 55px 0 65px;
  }

  .hero h1 {
    font-size: 43px;

    letter-spacing: -2px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;

    gap: 15px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-note {
    align-items: flex-start;

    font-size: 12px;
  }

  .product-preview-wrapper {
    margin-top: 50px;
  }

  .preview-content {
    min-height: 350px;
  }

  .preview-sidebar {
    display: none;
  }

  .preview-main {
    padding: 20px;
  }

  .preview-table-header,
  .preview-row {
    grid-template-columns:
      1fr
      1.5fr
      1fr;
  }

  .preview-table-header span:nth-child(3),
  .preview-row > span:nth-child(3) {
    display: none;
  }

  .intro-section,
  .features-section,
  .early-access-section {
    padding: 75px 0;
  }

  .feature-grid {
    display: flex;
    grid-template-columns: unset;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .feature-grid::-webkit-scrollbar {
    display: none;
  }

  .feature-card,
  .feature-card-large {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .early-access-card {
    padding: 25px;

    gap: 30px;
  }

  .early-access-content h2 {
    font-size: 34px;
  }

  .footer-inner {
    align-items: flex-start;

    flex-direction: column;
  }

  .footer-links {
    order: 3;
  }
}

@media (max-width: 450px) {
  .brand-name {
    font-size: 17px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-badge {
    font-size: 12px;
  }

  .product-preview {
    border-radius: 12px;
  }

  .preview-heading {
    align-items: flex-start;

    flex-direction: column;
  }

  .preview-button {
    display: none;
  }

  .preview-table-header,
  .preview-row {
    grid-template-columns:
      1fr
      1.5fr;
  }

  .preview-table-header span:nth-child(4),
  .preview-row > span:nth-child(4) {
    display: none;
  }

  .signup-card {
    padding: 20px;
  }
}
