/* ============================================================
   RBTRONIX LLC — site styles
   ============================================================ */

:root {
  --bg: #0a0e14;
  --bg-alt: #0e141d;
  --surface: #131b26;
  --surface-2: #18222f;
  --border: #223041;
  --text: #e8edf4;
  --text-dim: #9aa8ba;
  --text-faint: #64748b;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-grad: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  --radius: 14px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-mark { color: var(--accent); }

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent) !important;
}
.nav-cta:hover { background: rgba(56, 189, 248, 0.12); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background:
    radial-gradient(600px 320px at 30% 20%, rgba(56, 189, 248, 0.14), transparent 65%),
    radial-gradient(700px 380px at 72% 8%, rgba(129, 140, 248, 0.13), transparent 65%);
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero-kicker, .section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 700;
  max-width: 820px;
  margin: 0 auto 22px;
}

.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 1.13rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent-grad);
  color: #06121c;
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(56, 189, 248, 0.32); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 6vw, 80px);
  flex-wrap: wrap;
}
.hero-stats dt {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats dd {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 14px; }
.section-sub { color: var(--text-dim); font-size: 1.05rem; }

/* ---------- 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(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: rgba(56, 189, 248, 0.45); transform: translateY(-3px); }

.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.96rem; }

.card-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }

.card-list {
  list-style: none;
  margin-top: 16px;
  display: grid;
  gap: 7px;
}
.card-list li {
  color: var(--text-dim);
  font-size: 0.88rem;
  padding-left: 20px;
  position: relative;
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent-grad);
  opacity: 0.85;
}

/* ---------- Process steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- Work ---------- */
.work-card { display: flex; flex-direction: column; }
.work-tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.work-card h3 { margin-bottom: 8px; }

/* ---------- Stack ---------- */
.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 34px;
}
.stack-group h3 {
  font-size: 1.02rem;
  margin-bottom: 14px;
  color: var(--text);
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ---------- Why ---------- */
.why-item {
  border-left: 2px solid transparent;
  border-image: var(--accent-grad) 1;
  padding-left: 18px;
}
.why-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.why-item p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-copy h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 14px; }
.contact-copy > p { color: var(--text-dim); margin-bottom: 28px; }

.contact-list { list-style: none; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: baseline; }
.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  min-width: 64px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  display: grid;
  gap: 18px;
}

.field { display: grid; gap: 7px; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}
.field .optional {
  font-weight: 400;
  color: var(--text-faint);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); }

.form-note { font-size: 0.85rem; color: var(--text-faint); }

.contact-form.is-sending .btn { opacity: 0.6; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 54px 0 34px;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.footer-brand p { color: var(--text-faint); font-size: 0.9rem; margin-top: 8px; max-width: 320px; }
.footer-nav { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.footer-nav a { color: var(--text-dim); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--text); text-decoration: none; }

.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-legal p { color: var(--text-faint); font-size: 0.83rem; }

/* ---------- Reveal animation ----------
   Hidden state applies ONLY when JS is on (html.js set by inline head script),
   and main.js force-reveals everything after a safety timeout — content can
   never get stuck invisible. */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .hero { padding: 76px 0 64px; }
  .grid-3, .grid-4, .steps, .stack-groups { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 18px;
    transform: translateY(-130%);
    transition: transform 0.25s ease;
  }
  .site-nav.is-open { transform: none; }
  .site-nav a { padding: 13px 4px; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: 0; margin-top: 10px; text-align: center; }
}
