/* =====================
   CSS Variables / Tokens
   ===================== */
:root {
  --surface-primary:    #0A0A10;
  --surface-secondary:  #12121A;
  --surface-tertiary:   #1A1A24;
  --surface-hover:      #252535;
  --surface-card:       rgba(255, 255, 255, 0.03);
  --surface-card-hover: rgba(255, 255, 255, 0.05);

  --fg-primary:         #EEEEF0;
  --fg-secondary:       #9898A6;
  --fg-muted:           #65657A;

  --accent:             #8B5CF6;
  --accent-light:       #A78BFA;
  --accent-dark:        #7C3AED;
  --accent-subtle:      rgba(139, 92, 246, 0.125);
  --accent-glow:        rgba(139, 92, 246, 0.35);
  --accent-glow-soft:   rgba(139, 92, 246, 0.18);

  --border:             rgba(255, 255, 255, 0.08);
  --border-light:       rgba(255, 255, 255, 0.14);

  --info:               #60A5FA;
  --info-subtle:        rgba(96, 165, 250, 0.125);
  --success:            #34D399;
  --success-subtle:     rgba(52, 211, 153, 0.125);
  --error:              #F87171;
  --warning:            #FBBF24;

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  --font-display: 'Ubuntu', system-ui, -apple-system, sans-serif;
  --font-body:    'Geologica', system-ui, -apple-system, sans-serif;
  --font-mono:    'Geist Mono', 'Fira Code', monospace;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =====================
   Reset & Base
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--surface-primary);
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Global hero-driven gradient wash (fixed, non-interactive) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 12% -10%, var(--accent-glow), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 5%, rgba(139, 92, 246, 0.12), transparent 60%);
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* =====================
   Eyebrow Label
   ===================== */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 16px;
}

/* =====================
   Chips / Pill Tags
   ===================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  transition: all 200ms var(--ease-out);
}

.chip-accent {
  background-color: var(--accent-subtle);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-light);
}

.chip-neutral {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--fg-secondary);
}

/* =====================
   Buttons
   ===================== */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 200ms var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 8px 24px -10px rgba(139, 92, 246, 0.5);
}

.btn-primary:hover {
  background-color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 12px 32px -8px rgba(139, 92, 246, 0.6);
}

.btn-outline {
  background-color: rgba(255, 255, 255, 0.02);
  border-color: var(--border-light);
  color: var(--fg-primary);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 15px;
  padding: 14px 28px;
}

/* =====================
   Navbar
   ===================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 10, 16, 0.6);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}

.navbar.is-scrolled {
  background-color: rgba(10, 10, 16, 0.82);
  border-bottom-color: var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 80px;
  max-width: 1440px;
  margin: 0 auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 28px;
  height: 28px;
  background: url('https://xrayinspector.dev/assets/logo.svg') center/contain no-repeat;
  flex-shrink: 0;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
}

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

.nav-center a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-secondary);
  transition: color 200ms var(--ease-out);
}

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

/* =====================
   Hero Section
   ===================== */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 120px 80px 80px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--fg-primary);
  max-width: 1000px;
}

.hero-title .accent {
  color: var(--accent-light);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--fg-secondary);
  max-width: 640px;
  margin-top: -4px;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

/* Screenshot frame — premium bezel + purple glow */
.hero-preview {
  width: 100%;
  max-width: 1140px;
  margin-top: 40px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow:
    0 60px 160px -40px rgba(139, 92, 246, 0.4),
    0 30px 80px -40px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hero-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* =====================
   Section Primitives
   ===================== */
.section {
  padding: 120px 80px;
  position: relative;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 72px;
}

.section-header .eyebrow {
  margin-bottom: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg-primary);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg-secondary);
  max-width: 560px;
}

/* Optional per-section radial glow */
.section-glow {
  position: relative;
}

.section-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 40% at var(--glow-x, 90%) var(--glow-y, 10%), var(--accent-glow-soft), transparent 60%);
  z-index: -1;
}

/* =====================
   Features Section
   ===================== */
.features-section {
  --glow-x: 85%;
  --glow-y: 0%;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.feature-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 250ms var(--ease-out);
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--accent-subtle),
    0 20px 40px -20px var(--accent-glow-soft);
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(139, 92, 246, 0.5);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
}

.feature-card p {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg-secondary);
}

/* =====================
   Download Section
   ===================== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.download-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  transition: all 250ms var(--ease-out);
}

.download-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -20px var(--accent-glow-soft);
}

.dl-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  margin-bottom: 4px;
  box-shadow: 0 8px 24px -10px rgba(139, 92, 246, 0.5);
}

.download-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
}

.download-card .req {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-muted);
  margin-top: -6px;
}

.download-card .btn-primary,
.download-card .btn-outline {
  width: 100%;
  margin-top: 8px;
}

/* =====================
   Alpha Section
   ===================== */
.alpha-section {
  --glow-x: 15%;
  --glow-y: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.alpha-form {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  flex-wrap: wrap;
  justify-content: center;
}

.alpha-input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--fg-primary);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  outline: none;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out), background-color 200ms var(--ease-out);
}

.alpha-input::placeholder {
  color: var(--fg-muted);
}

.alpha-input:focus {
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px var(--accent-subtle);
}

.alpha-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alpha-submit {
  flex: 0 0 auto;
  min-width: 170px;
  padding: 14px 28px;
  font-size: 15px;
}

.alpha-submit[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.alpha-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: alpha-spin 0.7s linear infinite;
}

.alpha-form.is-loading .alpha-spinner {
  display: inline-block;
}

.alpha-form.is-loading .alpha-submit-label {
  display: none;
}

@keyframes alpha-spin {
  to { transform: rotate(360deg); }
}

.alpha-status {
  min-height: 1.25em;
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-muted);
  text-align: center;
  max-width: 560px;
}

.alpha-status[data-kind="success"] { color: var(--success); }
.alpha-status[data-kind="error"]   { color: var(--error); }
.alpha-status[data-kind="loading"] { color: var(--fg-muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================
   Docs Section
   ===================== */
.docs-section {
  --glow-x: 10%;
  --glow-y: 90%;
}

.docs-inner {
  display: flex;
  gap: 60px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.docs-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 520px;
}

.docs-left .eyebrow {
  margin-bottom: 0;
}

.docs-left h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg-primary);
}

.docs-left p {
  font-family: var(--font-body);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--fg-secondary);
}

.docs-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Code Block — VS Code Dark+ theme */
.code-block {
  flex: 0 0 540px;
  background-color: #1E1E1E;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 30px 80px -40px var(--accent-glow-soft),
    0 20px 50px -30px rgba(0, 0, 0, 0.8);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #252526;
  border-bottom: 1px solid #1B1B1B;
  padding: 12px 18px;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot.red    { background-color: #FF5F57; }
.code-dot.yellow { background-color: #FEBC2E; }
.code-dot.green  { background-color: #28C840; }

.code-filename {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #CCCCCC;
  margin-left: 6px;
}

.code-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #D4D4D4;
}

.code-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  display: block;
  white-space: pre;
  color: #D4D4D4;
}

/* VS Code Dark+ token palette */
.tok-keyword  { color: #C586C0; }  /* import, export */
.tok-control  { color: #569CD6; }  /* final, await, return, if */
.tok-string   { color: #CE9178; }
.tok-number   { color: #B5CEA8; }
.tok-type     { color: #4EC9B0; }  /* class names, types */
.tok-var      { color: #9CDCFE; }  /* variables, properties */
.tok-fn       { color: #DCDCAA; }  /* function/method names */
.tok-comment  { color: #6A9955; font-style: italic; }
.tok-punct    { color: #D4D4D4; }

/* =====================
   Footer
   ===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.foot-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.foot-logo {
  width: 22px;
  height: 22px;
  background: url('https://xrayinspector.dev/assets/logo.svg') center/contain no-repeat;
  flex-shrink: 0;
}

.foot-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-primary);
}

.foot-copy {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-muted);
}

.foot-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.foot-right a {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-muted);
  transition: color 200ms var(--ease-out);
}

.foot-right a:hover {
  color: var(--fg-primary);
}

/* =====================
   SVG Icons
   ===================== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 1024px) {
  .navbar-inner,
  .hero-section,
  .section,
  footer {
    padding-left: 40px;
    padding-right: 40px;
  }

  .hero-section {
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .section {
    padding-top: 96px;
    padding-bottom: 96px;
  }

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

  .download-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 640px;
  }

  .docs-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .docs-left {
    max-width: none;
  }

  .code-block {
    flex: unset;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .navbar-inner {
    padding: 14px 24px;
  }

  .nav-center {
    display: none;
  }

  .hero-section,
  .section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-section {
    padding-top: 72px;
    padding-bottom: 48px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .section-header {
    margin-bottom: 48px;
  }

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

  .section-subtitle {
    font-size: 15px;
  }

  .features-grid,
  .download-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .alpha-form {
    flex-direction: column;
  }

  .alpha-input {
    flex: 0 0 auto;
    width: 100%;
  }

  .alpha-submit {
    width: 100%;
  }

  footer {
    padding: 28px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .foot-right {
    gap: 20px;
    flex-wrap: wrap;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* =====================
   Cookiethough.dev — xRay branding
   ===================== */
.cookie-though {
  --ct-primary-400: var(--accent);
  --ct-primary-300: var(--accent-light);
  --ct-primary-200: var(--accent-subtle);
  --ct-primary-100: var(--surface-tertiary);

  --ct-text: var(--fg-secondary);
  --ct-white: var(--surface-secondary);

  --ct-button: var(--accent);
  --ct-button-color: #ffffff;
  --ct-button-secondary: rgba(255, 255, 255, 0.05);
  --ct-button-secondary-color: var(--fg-primary);

  --ct-policy-enabled: var(--accent-subtle);
  --ct-policy-text-enabled: var(--fg-primary);
  --ct-policy-text: var(--fg-primary);

  --ct-primary-font: var(--font-body);
  --ct-primary-font-weight: 500;
  --ct-secondary-font: var(--font-display);
  --ct-secondary-font-weight: 500;

  --ct-button-radius: var(--radius-full);
  --ct-button-padding: 10px 18px;
}
