/* ==========================================================================
   Deuzex — Premium Tech UI (v3)
   - Metallic graphite background (smooth gradients, no harsh banding)
   - Improved typography contrast (secondary text readable)
   - Subtle hover sheen on cards (premium motion)
   - Keeps compatibility with existing markup/classes
   - Fixes select dropdown contrast
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* Base graphite system */
  --bg0: #0e1117; /* graphite */
  --bg1: #0d1117; /* deeper graphite */

  /* Surfaces */
  --surface: rgba(255, 255, 255, 0.06);
  --surface2: rgba(255, 255, 255, 0.085);

  /* Borders */
  --border: rgba(255, 255, 255, 0.12);
  --border2: rgba(255, 255, 255, 0.18);

  /* Text (contrast tuned) */
  --text: rgba(255, 255, 255, 0.93);
  --muted: rgba(255, 255, 255, 0.76);   /* was 0.68 */
  --muted2: rgba(255, 255, 255, 0.62);  /* was 0.52 */

  /* Accent: cold cyan/steel (kept) */
  --accent: #8bd2ff;
  --accent2: #4fb3ff;
  --accentGlow: rgba(79, 179, 255, 0.22);

  --danger: #ff6b6b;
  --ok: #31d0aa;

  /* Shadows (slightly softer, more premium) */
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.46);
  --shadow-md: 0 18px 46px rgba(0, 0, 0, 0.38);
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.30);

  /* Radius & spacing */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 12px;

  /* Typography */
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease2: cubic-bezier(0.2, 0.9, 0.2, 1);
  --t-fast: 140ms;
  --t: 220ms;
  --t-slow: 420ms;

  /* Layout */
  --container: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);

  /* Metallic graphite background (smooth, no harsh “cuts”) */
  background:
    /* very subtle vignette to keep focus */
    radial-gradient(1200px 600px at 50% 15%, rgba(255, 255, 255, 0.03), transparent 60%),
    radial-gradient(900px 600px at 15% 60%, rgba(255, 255, 255, 0.02), transparent 65%),
    /* diagonal “metal sheen” */
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.055) 0%,
      rgba(255, 255, 255, 0.02) 26%,
      rgba(0, 0, 0, 0.10) 52%,
      rgba(255, 255, 255, 0.012) 76%,
      rgba(255, 255, 255, 0.04) 100%
    ),
    /* base graphite gradient */
    linear-gradient(
      180deg,
      #0e1117 0%,
      #10141b 24%,
      #0f141c 52%,
      #0d1117 100%
    );

  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle tech grid background (we soften it so it won't “cut” cards) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);

  background-size: 64px 64px;
  opacity: 0.075;

  /* soften visibility zones, no sharp masks */
  mask-image: radial-gradient(700px 520px at 20% 15%, rgba(0, 0, 0, 1), transparent 75%),
    radial-gradient(900px 640px at 80% 10%, rgba(0, 0, 0, 1), transparent 78%),
    radial-gradient(1100px 900px at 50% 80%, rgba(0, 0, 0, 1), transparent 85%);

  z-index: 0;
}

/* Premium micro-noise (CSS-only grain) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;

  background-image:
    repeating-radial-gradient(
      circle at 10% 20%,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0) 4px
    ),
    repeating-radial-gradient(
      circle at 70% 40%,
      rgba(0, 0, 0, 0.35) 0,
      rgba(0, 0, 0, 0.35) 1px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0) 5px
    );

  background-size: 220px 220px, 260px 260px;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 56px 0;
}

/* Alternate sections: only a gentle gradient, no “stripe” */
.section--alt {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.012),
    rgba(255, 255, 255, 0.004)
  );
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2);
}

.h1,
h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.h2,
h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 12px 0;
  color: var(--muted);
  line-height: 1.55;
}

.small {
  font-size: 13px;
  color: var(--muted2);
  line-height: 1.5;
}

.hr {
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
  margin: 24px 0;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 20;

  /* more “metallic”, less blue */
  background: rgba(13, 17, 23, 0.72);

  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, rgba(139, 210, 255, 0.9), rgba(79, 179, 255, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
  box-shadow: 0 10px 26px rgba(79, 179, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.nav a:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;

  transition:
    transform var(--t) var(--ease),
    background var(--t) var(--ease),
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    color var(--t) var(--ease);

  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.09);
}

.btn:active {
  transform: translateY(0px) scale(0.99);
}

.btn--primary {
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(139, 210, 255, 0.30), rgba(79, 179, 255, 0.10)),
    rgba(79, 179, 255, 0.12);
  border-color: rgba(79, 179, 255, 0.38);
  box-shadow: 0 14px 38px rgba(79, 179, 255, 0.16);
}

.btn--primary:hover {
  box-shadow: 0 22px 56px rgba(79, 179, 255, 0.20);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(139, 210, 255, 0.38), rgba(79, 179, 255, 0.12)),
    rgba(79, 179, 255, 0.14);
}

.btn[disabled],
.btn.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Cards / Panels
   ========================================================================== */

.card {
  border: 1px solid rgba(255, 255, 255, 0.10);

  /* More “metal/glass” — less contrast jump vs background */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.060), rgba(255, 255, 255, 0.028));

  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Soft internal lighting (reduced so it won't “cut” cards) */
.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(720px 260px at 15% 5%, rgba(255, 255, 255, 0.06), transparent 65%),
    radial-gradient(520px 220px at 92% 28%, rgba(79, 179, 255, 0.08), transparent 68%);
  opacity: 0.9;
  pointer-events: none;
}

/* Hover sheen layer (premium light sweep) */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-30%) translateY(0);
  transition: opacity var(--t) var(--ease), transform var(--t-slow) var(--ease2);

  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 18%,
    rgba(255, 255, 255, 0.12) 28%,
    rgba(255, 255, 255, 0.06) 38%,
    transparent 55%
  );
  mix-blend-mode: overlay;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card--hover {
  transition:
    transform var(--t) var(--ease),
    border-color var(--t) var(--ease),
    background var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}

.card--hover:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.46);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.070), rgba(255, 255, 255, 0.030));
}

.card--hover:hover::after {
  opacity: 1;
  transform: translateX(18%) translateY(0);
}

/* Links as cards */
.card--link {
  cursor: pointer;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.card--link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 54px 0 30px 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 920px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

.hero__lead {
  font-size: 16px;
  color: var(--muted);
}

.hero__cta,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-family: var(--mono);
}

/* ==========================================================================
   Layout grids (features/steps)
   ========================================================================== */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 920px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.step__num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(79, 179, 255, 0.28);
  background: rgba(79, 179, 255, 0.10);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.90);
  box-shadow: 0 12px 30px rgba(79, 179, 255, 0.10);
}

.step__title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 4px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.field__hint {
  font-size: 12px;
  color: var(--muted2);
  margin-top: -4px;
}

.field__input,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.93);
  outline: none;

  transition:
    border-color var(--t) var(--ease),
    box-shadow var(--t) var(--ease),
    background var(--t) var(--ease);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.field__input::placeholder,
input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.field__input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(79, 179, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(79, 179, 255, 0.14), 0 18px 44px rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

input[type="file"] {
  padding: 10px;
  cursor: pointer;
}

/* === SELECT DROPDOWN FIX === */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;

  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 38px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 16px;
  background-repeat: no-repeat;
}

select option {
  background: #0e1117;
  color: rgba(255, 255, 255, 0.94);
}

select option:disabled {
  color: rgba(255, 255, 255, 0.55);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent2);
}

/* Errors */
.form-errors {
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
  border-radius: 14px;
  padding: 12px 12px;
  color: rgba(255, 255, 255, 0.92);
}

.form-errors ul {
  margin: 8px 0 0 18px;
  padding: 0;
  color: rgba(255, 255, 255, 0.88);
}

.is-invalid {
  border-color: rgba(255, 107, 107, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.12) !important;
}

/* ==========================================================================
   FAQ (works with your current JS toggles)
   ========================================================================== */

.faq {
  display: grid;
  gap: 10px;
}

.faq__item {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.faq__q:hover {
  background: rgba(255, 255, 255, 0.05);
}

.faq__a {
  padding: 0 14px 14px 14px;
  color: var(--muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 30px 0 50px 0;
  color: var(--muted2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 17, 23, 0.55);
}

.footer a {
  color: rgba(255, 255, 255, 0.78);
}

.footer a:hover {
  color: var(--accent);
}

/* ==========================================================================
   Scroll reveal (paired with app.js)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Reduced motion accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn,
  .card--hover,
  .reveal {
    transition: none !important;
  }
}

/* ==========================================================================
   Compatibility layer (existing markup support)
   ========================================================================== */

/* old brand markup */
.brand__dot { /* alias of brand__mark */
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: radial-gradient(circle at 30% 30%, rgba(139, 210, 255, 0.9), rgba(79, 179, 255, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
  box-shadow: 0 10px 26px rgba(79, 179, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.brand__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* text helpers used in HTML */
.muted { color: var(--muted); }
.lead { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0 0 18px; }

/* misc blocks used in HTML */
.section__head { margin-bottom: 18px; }
.section__cta { margin-top: 18px; }

/* tags / pills / price etc (present in your landing markup) */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 10px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.84);
  font-size: 12px;
  font-family: var(--mono);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-family: var(--mono);
}

.price { font-size: 14px; color: var(--muted2); margin: 10px 0 12px; }
.price span { color: rgba(255,255,255,.92); font-weight: 700; }

/* button modifiers present in HTML */
.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
}
.btn--lg {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
}

/* existing "panel" blocks in hero */
.panel {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.060), rgba(255, 255, 255, 0.028));
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.panel__title { font-weight: 700; color: rgba(255,255,255,.92); margin-bottom: 10px; }
.panel__divider { height: 1px; background: rgba(255,255,255,.10); margin: 12px 0; }
.panel__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* bullets list used in hero */
.bullets { margin: 10px 0 0 18px; padding: 0; color: rgba(255,255,255,.86); }
.bullets li { margin: 6px 0; }
.bullets--tight li { margin: 4px 0; }

/* footer layout helpers */
.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 920px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer__links { display: grid; gap: 8px; }
.footer__note { display: grid; gap: 10px; }

/* small text blocks */
.note, .disclaimer { color: var(--muted2); line-height: 1.55; }
