/* ── Reset & tokens ──────────────────────────────────────── */
/* Font metric overrides — minimizan CLS cuando carga la webfont */
@font-face {
  font-family: 'Space Grotesk fallback';
  src: local('Arial');
  size-adjust: 98%;
  ascent-override: 97%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter fallback';
  src: local('Arial');
  size-adjust: 100%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         hsl(220 25% 6%);
  --fg:         hsl(220 15% 95%);
  --muted:      hsl(220 10% 65%);
  --border:     hsl(220 20% 16%);
  --card-bg:    hsl(220 20% 10%);
  --primary:    hsl(220 70% 55%);
  --primary-10: hsl(220 70% 55% / .10);
  --primary-30: hsl(220 70% 55% / .30);
  --radius:     .75rem;
  --font-head:  'Space Grotesk', 'Space Grotesk fallback', system-ui, sans-serif;
  --font-body:  'Inter', 'Inter fallback', system-ui, sans-serif;
  --nav-h:      80px;
  --container:  1200px;
  --container-n:960px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* ── Shared helpers ──────────────────────────────────────── */
.rd-label {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--primary);
  margin-bottom: .5rem;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wordReveal {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}
@keyframes countUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.rd-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
  transition-delay: var(--delay, 0s);
}
.rd-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Page Loader ──────────────────────────────────────────── */
:root { --ldr-duration: 3s; }

.rd-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0d1117;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity .6s ease;
}
.rd-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Fondo: código scrolling */
.rd-loader__code {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.rd-loader__code-scroll {
  font-family: Menlo, Monaco, 'Courier New', monospace;
  font-size: 10px;
  line-height: 1.6;
  color: #6e7681;
  white-space: pre;
  padding: 2rem;
  animation: ldrScroll 8s linear infinite;
}
@keyframes ldrScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-1200px); }
}

/* Gradiente que oscurece abajo */
.rd-loader__fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, #0d1117 100%);
  pointer-events: none;
}

/* Logo centrado */
.rd-loader__logo {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: ldrLogoIn .7s cubic-bezier(.21,.47,.32,.98) both;
}
@keyframes ldrLogoIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

.rd-loader__mark {
  width: 240px;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 20px 60px rgba(59,130,246,.3));
}
.rd-loader__outline {
  fill: none;
  stroke: #2f7cff;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(47,124,255,.8));
  animation: drawR var(--ldr-duration) cubic-bezier(.16,1,.3,1) infinite;
}
.rd-loader__piece {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: fillIn var(--ldr-duration) cubic-bezier(.16,1,.3,1) infinite;
}
.rd-loader__piece--top  { animation-delay: 0s; }
.rd-loader__piece--leg  { animation-delay: .03s; }
.rd-loader__piece--left { animation-delay: .06s; }
.rd-loader__sweep {
  transform: translateX(-190px);
  opacity: 0;
  mix-blend-mode: screen;
  animation: sweep var(--ldr-duration) cubic-bezier(.16,1,.3,1) infinite;
}

.rd-loader__wordmark {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #ffffff;
  opacity: 0;
  animation: ldrWordIn .5s .4s cubic-bezier(.21,.47,.32,.98) forwards;
}
@keyframes ldrWordIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes drawR {
  0%   { opacity: 1; stroke-dashoffset: 720; }
  28%  { opacity: 1; stroke-dashoffset: 0; }
  36%  { opacity: 0; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dashoffset: 0; }
}
@keyframes fillIn {
  0%, 22%    { opacity: 0; transform: scale(.985); }
  34%, 100%  { opacity: 1; transform: scale(1); }
}
@keyframes sweep {
  0%, 32% { opacity: 0; transform: translateX(-190px); }
  40%     { opacity: 1; }
  54%     { opacity: 0; transform: translateX(190px); }
  100%    { opacity: 0; transform: translateX(190px); }
}

@media (max-width: 680px) {
  .rd-loader__mark { width: 160px; }
  .rd-loader__wordmark { font-size: 1.5rem; }
}

/* ── Navigation ──────────────────────────────────────────── */
.rd-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.rd-nav.is-scrolled {
  background: hsl(220 25% 6% / .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 16px hsl(0 0% 0% / .3);
}
.rd-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Logo */
.rd-nav__logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}
.rd-nav__logo-icon {
  height: 2rem;
  width: auto;
}
.rd-nav__logo-wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -.03em;
  color: var(--fg);
}

/* Nav right group (desktop links + CTA) */
.rd-nav__right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.rd-nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.rd-nav__link {
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s;
}
.rd-nav__link:hover { color: var(--fg); }

/* CTA Contacto — estilo mono con punto pulsante */
.rd-nav__cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--primary-30);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .15em;
  padding: 0 1rem;
  height: 2.25rem;
  border-radius: .25rem;
  transition: border-color .2s, background .2s;
  overflow: hidden;
}
.rd-nav__cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: hsl(220 70% 55% / .05);
  transform: translateX(-101%);
  transition: transform .3s ease-out;
}
.rd-nav__cta-btn:hover { border-color: var(--primary); }
.rd-nav__cta-btn:hover::after { transform: translateX(0); }
.rd-nav__cta-dot {
  width: .375rem;
  height: .375rem;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

/* Botón MENU circular */
.rd-nav__menu-btn {
  position: relative;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: hsl(220 25% 8%);
  cursor: pointer;
  color: var(--muted);
  transition: border-color .3s, background .3s, color .3s;
  flex-shrink: 0;
}
.rd-nav__menu-btn:hover,
.rd-nav__menu-btn.is-open {
  border-color: var(--primary-30);
  background: var(--primary-10);
  color: var(--primary);
}
.rd-nav__menu-label {
  position: absolute;
  top: -1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: .5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--muted);
  white-space: nowrap;
  transition: color .3s;
}
.rd-nav__menu-btn:hover .rd-nav__menu-label,
.rd-nav__menu-btn.is-open .rd-nav__menu-label {
  color: var(--primary);
}
.rd-nav__menu-icon {
  transition: transform .3s, color .3s;
}
.rd-nav__menu-btn.is-open .rd-nav__menu-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Mobile overlay */
.rd-nav__overlay {
  position: fixed;
  inset: 0;
  background: hsl(220 25% 5% / .97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .3s cubic-bezier(.4,0,.2,1), transform .3s cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
}
.rd-nav__overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.rd-nav__overlay-links { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 2rem; width: 100%; padding: 0 2rem; box-sizing: border-box; }
.rd-nav__overlay-link {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 700;
  color: var(--fg);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s, transform .4s, color .2s;
}
.rd-nav__overlay.is-open .rd-nav__overlay-link {
  opacity: 1;
  transform: none;
}
.rd-nav__overlay.is-open .rd-nav__overlay-link:nth-child(1) { transition-delay: .1s; }
.rd-nav__overlay.is-open .rd-nav__overlay-link:nth-child(2) { transition-delay: .17s; }
.rd-nav__overlay.is-open .rd-nav__overlay-link:nth-child(3) { transition-delay: .24s; }
.rd-nav__overlay.is-open .rd-nav__overlay-link:nth-child(4) { transition-delay: .31s; }
.rd-nav__overlay.is-open .rd-nav__overlay-link:nth-child(5) { transition-delay: .38s; }
.rd-nav__overlay-link:hover { color: var(--primary); }

/* Scroll to top button */
.rd-scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 80;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: hsl(220 25% 8%);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, border-color .2s, color .2s;
  pointer-events: none;
  will-change: opacity, transform;
}
.rd-scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.rd-scroll-top:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Hero ────────────────────────────────────────────────── */
.rd-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.rd-hero {
  position: relative;
  min-height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
}
/* WorkflowBeam */
.rd-workflow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1rem;
  position: relative;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.rd-workflow__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  position: relative;
  z-index: 2;
}
.rd-workflow__icon {
  width: 56px; height: 56px;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.rd-workflow__label {
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  font-family: var(--font-body);
}
.rd-workflow__line {
  flex: 1;
  height: 1px;
  position: relative;
  overflow: hidden;
  background: rgba(47,124,255,.15);
  z-index: 1;
}
.rd-workflow__beam {
  position: absolute;
  top: 0; left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #2f7cff, #7dd3fc, transparent);
  animation: beamFlow 3s linear infinite;
  transform: translateX(-100%);
}
.rd-workflow__line:nth-child(4) .rd-workflow__beam { animation-delay: 1s; }
.rd-workflow__line:nth-child(6) .rd-workflow__beam { animation-delay: 2s; }
@keyframes beamFlow {
  from { transform: translateX(-100%); }
  to   { transform: translateX(267%); }
}
.rd-workflow__caption {
  font-size: .8125rem;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
@media (max-width: 680px) {
  .rd-workflow { padding: 1.5rem .5rem; }
  .rd-workflow__icon { width: 44px; height: 44px; }
  .rd-workflow__label { font-size: .65rem; }
}

.rd-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsl(220 70% 50% / .08) 1px, transparent 1px),
    linear-gradient(90deg, hsl(220 70% 50% / .08) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.rd-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, hsl(220 25% 6% / .9) 0%, hsl(220 25% 6% / .6) 55%, transparent 100%);
  pointer-events: none;
}
.rd-hero__content {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) 2rem 5rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}
.rd-hero__left { min-width: 0; }
.rd-hero__right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Terminal mockup */
.rd-terminal {
  width: 100%;
  max-width: 480px;
  background: hsl(220 20% 8%);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px hsl(220 20% 15%);
  animation: fadeUp .7s ease .6s both;
}
.rd-terminal__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  background: hsl(220 20% 11%);
  border-bottom: 1px solid var(--border);
}
.rd-terminal__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.rd-terminal__dot--red   { background: #ff5f57; }
.rd-terminal__dot--yellow { background: #febc2e; }
.rd-terminal__dot--green  { background: #28c840; }
.rd-terminal__title {
  margin-left: .5rem;
  font-family: var(--font-mono, monospace);
  font-size: .75rem;
  color: var(--muted);
}
.rd-terminal__body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono, 'JetBrains Mono', 'Fira Code', monospace);
  font-size: .8125rem;
  line-height: 1.7;
  color: hsl(220 15% 65%);
}
.rd-terminal__line { display: flex; gap: .5rem; }
.rd-terminal__prompt { color: var(--primary); user-select: none; }
.rd-terminal__cmd { color: hsl(220 15% 85%); }
.rd-terminal__out { color: hsl(155 60% 55%); padding-left: 1.25rem; }
.rd-terminal__out--dim { color: var(--muted); padding-left: 1.25rem; }
.rd-terminal__cursor {
  display: inline-block;
  width: 9px; height: 1.1em;
  background: var(--primary);
  vertical-align: text-bottom;
  animation: blink .9s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.rd-hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  max-width: 14ch;
}
.rd-hero__line {
  display: flex;
  flex-wrap: wrap;
  gap: .25em;
}
.rd-hero__line--2 { margin-top: .08em; }

.rd-hero__word {
  display: inline-block;
  overflow: hidden;
}
.rd-hero__word span,
.rd-hero__word {
  animation: wordReveal .65s cubic-bezier(.21,.47,.32,.98) forwards;
  animation-delay: calc(var(--i) * .08s + .2s);
}
.rd-hero__word--gradient {
  color: var(--primary);
}

.rd-hero__subtitle {
  margin-top: 2rem;
  max-width: 42ch;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: hsl(220 15% 95% / .75);
  font-weight: 500;
  line-height: 1.6;
  animation: fadeUp .6s ease .4s forwards;
}

.rd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  animation: fadeUp .6s ease .55s forwards;
}

/* Buttons */
.rd-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .9375rem;
  padding: .75rem 1.75rem;
  transition: all .25s;
  cursor: pointer;
  border: none;
  border-radius: 8px;
}
.rd-btn--primary {
  background: var(--primary);
  color: #fff;
}
.rd-btn--primary:hover {
  background: hsl(220 70% 62%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px hsl(220 70% 55% / .35);
}
.rd-btn--ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.rd-btn--ghost:hover {
  border-color: hsl(220 20% 30%);
  background: hsl(220 20% 14%);
}
.rd-btn--lg { font-size: 1.0625rem; padding: 1rem 2.25rem; }

/* Stats */
.rd-hero__stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-top: 4rem;
  animation: fadeUp .6s ease .7s both;
}
.rd-hero__stat {
  display: flex;
  flex-direction: column;
}
.rd-hero__stat-num {
  font-family: var(--font-head);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
}
.rd-hero__stat-plus { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.rd-hero__stat-label { font-size: .8125rem; color: var(--muted); margin-top: .25rem; }
.rd-hero__stat-sep { width: 1px; height: 40px; background: var(--border); }

/* ── Services ────────────────────────────────────────────── */
.rd-services { padding: 7rem 2rem; background: var(--bg); }
.rd-services__inner { max-width: var(--container-n); margin: 0 auto; }
.rd-services__title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--fg);
  margin-top: .75rem;
  max-width: 30ch;
}
.rd-services__desc { margin-top: 1rem; max-width: 55ch; color: var(--muted); font-size: 1.0625rem; line-height: 1.7; }

.rd-services__grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
}

/* Cards */
.rd-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  transition: border-color .25s, transform .25s;
  cursor: pointer;
}
.rd-card:hover {
  border-color: rgba(47,124,255,.35);
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(47,124,255,.12), 0 8px 32px rgba(47,124,255,.1);
}

.rd-card--featured {
  grid-column: span 2;
  min-height: 280px;
}

.rd-card__glow {
  position: absolute;
  top: -80px; left: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: var(--primary-10);
  filter: blur(60px);
  pointer-events: none;
}

.rd-card__top { display: flex; align-items: flex-start; justify-content: space-between; }
.rd-card__icon {
  width: 56px; height: 56px;
  background: var(--primary-10);
  color: var(--primary);
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
}
.rd-card__badge {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-family: var(--font-head);
  color: var(--primary);
  background: var(--primary-10);
  border: 1px solid var(--primary-30);
  padding: .25rem .75rem;
  border-radius: 999px;
}

.rd-card__title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -.02em;
}
.rd-card__desc { font-size: .9375rem; color: var(--muted); line-height: 1.7; flex: 1; }
.rd-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.rd-card__cta { font-size: .875rem; font-weight: 600; color: var(--primary); }
.rd-card__micro { font-size: .8125rem; color: var(--muted); }

/* ── Why us ──────────────────────────────────────────────── */
.rd-why { padding: 7rem 2rem; background: hsl(220 25% 8%); }
.rd-why__inner { max-width: var(--container-n); margin: 0 auto; }
.rd-why__title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--fg);
  margin-top: .75rem;
  max-width: 30ch;
}
.rd-why__grid {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 4rem;
}
.rd-why__num {
  font-family: var(--font-head);
  font-size: .875rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: .75rem;
}
.rd-why__item-title {
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: .5rem;
}
.rd-why__item-desc { font-size: .9375rem; color: var(--muted); line-height: 1.7; }

/* ── CTA ─────────────────────────────────────────────────── */
.rd-cta { padding: 8rem 2rem; background: var(--bg); text-align: center; }
.rd-cta__inner { max-width: 600px; margin: 0 auto; }
.rd-cta__title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--fg);
  margin-top: .75rem;
}
.rd-cta__desc { margin-top: 1.25rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.7; }
.rd-cta__inner .rd-btn { margin-top: 2.5rem; }

/* ── Footer ──────────────────────────────────────────────── */
.rd-footer { background: var(--bg); border-top: 1px solid var(--border); overflow: hidden; }
.rd-footer__inner { max-width: var(--container-n); margin: 0 auto; padding: 0 2rem; }
.rd-footer__main { padding: 5rem 0 4rem; display: flex; flex-direction: column; gap: 2.5rem; }
.rd-footer__label {
  font-size: .75rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .2em;
  color: hsl(220 10% 55% / .5);
}
.rd-footer__row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.rd-footer__email {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  color: var(--fg);
  letter-spacing: -.02em;
  transition: color .25s, transform .25s;
  white-space: nowrap;
}
.rd-footer__email:hover { color: var(--primary); transform: translateX(4px); }
.rd-footer__email svg { opacity: .35; transition: opacity .25s, transform .25s; }
.rd-footer__email:hover svg { opacity: 1; transform: translate(4px, -4px); }

.rd-footer__brand { font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; color: var(--fg); }
.rd-footer__tagline { font-size: .875rem; color: var(--muted); margin-top: .25rem; }
.rd-footer__social { display: flex; gap: 1.25rem; margin-top: .5rem; }
.rd-footer__social-link {
  font-size: .75rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .15em;
  color: hsl(220 10% 55% / .6);
  transition: color .2s;
}
.rd-footer__social-link:hover { color: var(--fg); }

.rd-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.rd-footer__copy {
  font-size: .75rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .15em;
  color: hsl(220 10% 55% / .4);
}
.rd-footer__legal { display: flex; gap: 1.5rem; }
.rd-footer__legal-link {
  font-size: .75rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: hsl(220 10% 55% / .4);
  transition: color .2s;
}
.rd-footer__legal-link:hover { color: var(--muted); }

/* ── Tech Marquee ────────────────────────────────────────── */
.rd-marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 1.25rem 0;
}
.rd-marquee__fade {
  position: absolute;
  top: 0; bottom: 0;
  width: 7rem;
  z-index: 2;
  pointer-events: none;
}
.rd-marquee__fade--left  { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.rd-marquee__fade--right { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.rd-marquee__track { overflow: hidden; }
.rd-marquee__inner {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee 35s linear infinite;
}
.rd-marquee__inner:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.rd-marquee__badge {
  display: flex;
  align-items: center;
  gap: .625rem;
  border: 1px solid hsl(220 20% 16% / .6);
  background: hsl(220 20% 10% / .4);
  backdrop-filter: blur(4px);
  padding: .5rem 1.25rem;
  border-radius: 999px;
  white-space: nowrap;
  user-select: none;
}
.rd-marquee__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rd-marquee__name {
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  color: hsl(220 15% 95% / .6);
}

/* ── Featured Product ────────────────────────────────────── */
.rd-product {
  background: var(--bg);
  overflow: hidden;
}
.rd-product__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6rem 2rem 0;
}
.rd-product__header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.rd-product__title {
  font-family: var(--font-head);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--fg);
  margin-top: .75rem;
}
.rd-product__desc { font-size: 1rem; color: var(--muted); line-height: 1.7; max-width: 36ch; }
.rd-product__link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  margin-top: 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-head);
  transition: opacity .2s;
}
.rd-product__link:hover { opacity: .75; }

/* Browser frame */
.rd-product__browser {
  border: 1px solid hsl(220 15% 95% / .1);
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
  background: hsl(220 15% 95% / .04);
  box-shadow: 0 32px 80px hsl(0 0% 0% / .4);
}
.rd-product__browser-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid hsl(220 15% 95% / .1);
  background: hsl(220 15% 95% / .03);
}
.rd-product__dots { display: flex; gap: .375rem; }
.rd-product__dots span { width: 12px; height: 12px; border-radius: 50%; display: block; }
.rd-product__url {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: hsl(220 15% 95% / .06);
  border-radius: .375rem;
  padding: .375rem 1rem;
  font-family: var(--font-body);
  font-size: .75rem;
  color: hsl(220 15% 95% / .4);
  max-width: 260px;
  margin: 0 auto;
}
.rd-product__url-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #28c840;
  flex-shrink: 0;
}
.rd-product__open {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .75rem;
  color: hsl(220 15% 95% / .4);
  font-family: var(--font-body);
  transition: color .2s;
}
.rd-product__open:hover { color: hsl(220 15% 95% / .7); }
.rd-product__iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}

/* Code comparison */
.rd-product__code {
  padding: 5rem 0;
  max-width: var(--container-n);
  margin: 0 auto;
}
.rd-product__code-header {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}
.rd-product__code-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--fg);
  margin-top: .5rem;
}
.rd-product__code-desc { font-size: 1rem; color: var(--muted); line-height: 1.7; }

.rd-code-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.rd-code-compare__panel { background: hsl(220 20% 8%); }
.rd-code-compare__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: hsl(220 20% 10%);
}
.rd-code-compare__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.rd-code-compare__dot--red    { background: #ff5f57; }
.rd-code-compare__dot--yellow { background: #febc2e; }
.rd-code-compare__dot--green  { background: #28c840; }
.rd-code-compare__filename {
  font-family: var(--font-body);
  font-size: .75rem;
  color: var(--muted);
  margin-left: .5rem;
}
.rd-code-compare__pre {
  margin: 0;
  padding: 1.5rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: .8125rem;
  line-height: 1.7;
  overflow-x: auto;
  color: hsl(220 15% 75%);
}
.rd-code-compare__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
}
.rd-code__comment { color: hsl(220 10% 50%); }
.rd-code__keyword { color: hsl(280 70% 75%); }
.rd-code__fn      { color: hsl(200 80% 70%); }
.rd-code__str     { color: hsl(100 60% 65%); }
.rd-code__type    { color: hsl(40 90% 70%); }

/* ── Why Us (nuevo layout) ───────────────────────────────── */
.rd-why__grid-layout {
  display: grid;
  gap: 4rem 5rem;
  align-items: start;
}
.rd-why__intro {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  color: hsl(220 15% 95% / .8);
  line-height: 1.75;
}
.rd-why__intro--muted { color: var(--muted); margin-top: .75rem; }
.rd-why__right { display: flex; flex-direction: column; gap: 1.5rem; }
.rd-why__item {
  display: flex;
  gap: 1rem;
}
.rd-why__check {
  width: 24px; height: 24px;
  background: var(--primary-10);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .2rem;
}
.rd-why__item-title {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: .375rem;
}
.rd-why__item-desc { font-size: .9375rem; color: var(--muted); line-height: 1.7; }

/* ── Final CTA ───────────────────────────────────────────── */
.rd-final-cta {
  position: relative;
  background: var(--bg);
  overflow: hidden;
  padding: 8rem 2rem;
}
.rd-final-cta__glow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.rd-final-cta__glow::after {
  content: '';
  width: 700px; height: 700px;
  border-radius: 50%;
  background: hsl(220 70% 55% / .12);
  filter: blur(120px);
}
.rd-final-cta__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsl(220 70% 50% / .06) 1px, transparent 1px),
    linear-gradient(90deg, hsl(220 70% 50% / .06) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  opacity: .6;
}
.rd-final-cta__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-n);
  margin: 0 auto;
}
.rd-final-cta__label {
  font-family: var(--font-body);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: hsl(220 70% 55% / .6);
  margin-bottom: 2.5rem;
}
.rd-final-cta__title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .95;
  color: var(--fg);
  margin-bottom: 3rem;
}
.rd-final-cta__title-dim { color: hsl(220 15% 95% / .25); }
.rd-final-cta__desc {
  max-width: 44ch;
  font-size: 1.0625rem;
  color: hsl(220 15% 95% / .55);
  line-height: 1.7;
  margin-bottom: 4rem;
}
.rd-final-cta__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 5rem; }

.rd-final-cta__btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  background: var(--primary);
  color: #fff;
  height: 56px;
  padding: 0 2.5rem;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  overflow: hidden;
  transition: background .25s, transform .25s, box-shadow .25s;
}
.rd-final-cta__btn-primary:hover {
  background: hsl(220 70% 62%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px hsl(220 70% 55% / .4);
}
.rd-final-cta__pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.4)} }

.rd-final-cta__btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 56px;
  padding: 0 2.5rem;
  border: 1px solid hsl(220 15% 95% / .2);
  color: hsl(220 15% 95% / .6);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  transition: border-color .25s, color .25s;
}
.rd-final-cta__btn-ghost:hover {
  border-color: hsl(220 70% 55% / .6);
  color: var(--fg);
}

.rd-final-cta__guarantees {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  border-top: 1px solid hsl(220 15% 95% / .08);
  padding-top: 2rem;
}
.rd-final-cta__guarantee { display: flex; align-items: center; gap: .5rem; }
.rd-final-cta__guarantee-line { width: 16px; height: 1px; background: hsl(220 70% 55% / .4); flex-shrink: 0; }
.rd-final-cta__guarantee-text {
  font-family: var(--font-body);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: hsl(220 15% 95% / .3);
}

/* ── Page (inner pages) ──────────────────────────────────── */
.rd-page { max-width: var(--container-n); margin: 0 auto; padding: calc(var(--nav-h) + 4rem) 2rem 5rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (min-width: 1024px) {
  .rd-why__grid-layout { grid-template-columns: 1fr 1fr; }
  .rd-why__right { padding-top: 4rem; }
  .rd-product__header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .rd-product__header-right { text-align: right; max-width: 28ch; }
  .rd-product__code-header { grid-template-columns: 1fr 1fr; align-items: start; }
  .rd-product__iframe { height: 720px; }
}

@media (max-width: 900px) {
  .rd-services__grid { grid-template-columns: 1fr 1fr; }
  .rd-card--featured { grid-column: span 2; }
  .rd-why__grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .rd-nav__links { display: none; }
  .rd-nav__burger { display: flex; }
  .rd-services__grid { grid-template-columns: 1fr; }
  .rd-card--featured { grid-column: span 1; }
  .rd-hero__stats { flex-wrap: wrap; gap: 1.5rem; }
  .rd-hero__stat-sep { display: none; }
  .rd-footer__row { flex-direction: column; }
  .rd-footer__email { font-size: 1.4rem; white-space: normal; }
  .rd-code-compare { grid-template-columns: 1fr; }
  .rd-code-compare__divider { width: 100%; height: 40px; border-left: none; border-right: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .rd-final-cta__title { font-size: 2.25rem; }
  /* Performance: ocultar canvas en mobile — mejora TBT/FID */
  #rd-hero-canvas { display: none; }
  /* Reducir animaciones del loader en mobile */
  .rd-loader__code { display: none; }
  /* LCP fix: hero text visible inmediatamente en mobile — sin animaciones de entrada */
  .rd-hero__word, .rd-hero__word span,
  .rd-hero__subtitle, .rd-hero__actions, .rd-hero__stats {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (min-width: 900px) {
  .rd-footer__row { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .rd-footer__info { text-align: right; }
  .rd-footer__social { justify-content: flex-end; }
}

/* Hero single-column en tablet/mobile */
@media (max-width: 900px) {
  .rd-hero__content { grid-template-columns: 1fr; gap: 0; }
  .rd-hero__right { display: none; }
}

/* Accesibilidad: sin movimiento */
@media (prefers-reduced-motion: reduce) {
  .rd-hero__word, .rd-hero__word span,
  .rd-hero__subtitle, .rd-hero__actions, .rd-hero__stats,
  .rd-terminal { animation: none !important; opacity: 1 !important; transform: none !important; }
  .rd-workflow__beam { animation: none !important; }
  .rd-loader__code-scroll { animation: none !important; }
  #rd-hero-canvas { display: none; }
}

/* ── Blog list (home.php) ────────────────────────────────── */
.rd-blog-hero { padding: calc(var(--nav-h) + 4rem) 2rem 3rem; text-align: center; }
.rd-blog-hero__inner { max-width: 640px; margin: 0 auto; }
.rd-blog-hero__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; color: hsl(220 70% 65% / .7); margin-bottom: 1rem; }
.rd-blog-hero__title { font-family: var(--font-display); font-size: clamp(2rem,5vw,3.25rem); font-weight: 700; line-height: 1.1; color: var(--text); margin-bottom: 1rem; }
.rd-blog-hero__title-dim { color: var(--muted); }
.rd-blog-hero__desc { font-size: 1rem; color: var(--muted); line-height: 1.6; }

.rd-blog-list { padding: 0 2rem 6rem; }
.rd-blog-list__inner { max-width: var(--container-n); margin: 0 auto; }
.rd-blog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 1.5rem; }
.rd-blog-empty { color: var(--muted); text-align: center; padding: 3rem 0; }

.rd-blog-card { background: hsl(220 25% 8% / .6); border: 1px solid var(--border); border-radius: .75rem; padding: 1.75rem; display: flex; flex-direction: column; gap: .75rem; transition: border-color .2s, transform .2s; }
.rd-blog-card:hover { border-color: hsl(220 70% 55% / .4); transform: translateY(-2px); }
.rd-blog-card__cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: hsl(220 70% 65%); font-weight: 600; }
.rd-blog-card__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text); line-height: 1.3; margin: 0; }
.rd-blog-card__link { color: inherit; text-decoration: none; }
.rd-blog-card__link:hover { color: hsl(220 70% 75%); }
.rd-blog-card__excerpt { font-size: .875rem; color: var(--muted); line-height: 1.6; flex: 1; }
.rd-blog-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.rd-blog-card__meta time { font-size: .75rem; color: hsl(220 15% 95% / .35); }
.rd-blog-card__read { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: hsl(220 70% 65%); text-decoration: none; font-weight: 500; transition: gap .2s; }
.rd-blog-card__read:hover { gap: .55rem; }

/* ── Single post ─────────────────────────────────────────── */
.rd-single-post { max-width: 720px; margin: 0 auto; padding: calc(var(--nav-h) + 3rem) 2rem 6rem; }
.rd-single-post__header { margin-bottom: 3rem; }
.rd-single-post__header-inner { display: flex; flex-direction: column; gap: .75rem; }
.rd-single-post__back, .rd-single-post__back-foot { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.rd-single-post__back:hover, .rd-single-post__back-foot:hover { color: var(--text); }
.rd-single-post__cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: hsl(220 70% 65%); font-weight: 600; }
.rd-single-post__title { font-family: var(--font-display); font-size: clamp(1.75rem,4vw,2.75rem); font-weight: 700; line-height: 1.15; color: var(--text); margin: 0; }
.rd-single-post__meta time { font-size: .8rem; color: hsl(220 15% 95% / .35); }
.rd-single-post__footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* Prose (rich text body) */
.rd-prose { color: hsl(220 15% 85%); line-height: 1.75; font-size: 1.0625rem; }
.rd-prose h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--text); margin: 2.5rem 0 .75rem; }
.rd-prose h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 2rem 0 .5rem; }
.rd-prose p { margin: 0 0 1.25rem; }
.rd-prose strong { color: var(--text); font-weight: 600; }
.rd-prose a { color: hsl(220 70% 70%); text-decoration: underline; text-underline-offset: 3px; }
.rd-prose a:hover { color: hsl(220 70% 85%); }
.rd-prose ul, .rd-prose ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.rd-prose li { margin-bottom: .35rem; }
.rd-prose blockquote { border-left: 3px solid hsl(220 70% 55% / .4); padding-left: 1.25rem; margin: 1.5rem 0; color: var(--muted); font-style: italic; }
.rd-prose code { font-family: monospace; font-size: .875em; background: hsl(220 25% 10%); padding: .15em .4em; border-radius: .25rem; }
.rd-prose pre { background: hsl(220 25% 8%); border: 1px solid var(--border); border-radius: .5rem; padding: 1.25rem; overflow-x: auto; margin: 1.5rem 0; }
.rd-prose pre code { background: none; padding: 0; }

/* ── Contact form ────────────────────────────────────────── */
.rd-contact-form { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 1rem; }
.rd-contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rd-contact-form__field { display: flex; flex-direction: column; gap: .4rem; }
.rd-contact-form__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: hsl(220 15% 95% / .45); font-weight: 500; }
.rd-contact-form__input,
.rd-contact-form__textarea { background: hsl(220 25% 7%); border: 1px solid hsl(220 15% 95% / .12); border-radius: .5rem; padding: .65rem .9rem; font-family: var(--font-body); font-size: .9rem; color: var(--text); transition: border-color .2s; outline: none; width: 100%; box-sizing: border-box; }
.rd-contact-form__input:focus,
.rd-contact-form__textarea:focus { border-color: hsl(220 70% 55% / .5); }
.rd-contact-form__textarea { resize: vertical; min-height: 120px; }
.rd-contact-form__footer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.rd-contact-form__submit { position: relative; display: inline-flex; align-items: center; gap: .6rem; background: var(--primary); color: #fff; border: none; border-radius: .5rem; padding: .75rem 1.5rem; font-family: var(--font-display); font-size: .9rem; font-weight: 600; cursor: pointer; transition: opacity .2s, transform .15s; overflow: hidden; }
.rd-contact-form__submit:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.rd-contact-form__submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rd-contact-form__feedback { margin-top: .5rem; font-size: .85rem; padding: .65rem 1rem; border-radius: .4rem; }
.rd-contact-form__feedback--success { background: hsl(145 60% 20% / .4); border: 1px solid hsl(145 60% 40% / .3); color: hsl(145 60% 75%); }
.rd-contact-form__feedback--error   { background: hsl(0 60% 20% / .4); border: 1px solid hsl(0 60% 40% / .3); color: hsl(0 60% 75%); }

@media (max-width: 640px) {
  .rd-contact-form__row { grid-template-columns: 1fr; }
  .rd-blog-hero { padding-top: calc(var(--nav-h) + 2.5rem); }
  .rd-blog-grid { grid-template-columns: 1fr; }
}

/* ── Blog list (home.php) ────────────────────────────────── */
.rd-blog-hero { padding: calc(var(--nav-h) + 4rem) 2rem 3rem; text-align: center; }
.rd-blog-hero__inner { max-width: 640px; margin: 0 auto; }
.rd-blog-hero__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .15em; color: hsl(220 70% 65% / .7); margin-bottom: 1rem; }
.rd-blog-hero__title { font-family: var(--font-display); font-size: clamp(2rem,5vw,3.25rem); font-weight: 700; line-height: 1.1; color: var(--text); margin-bottom: 1rem; }
.rd-blog-hero__title-dim { color: var(--muted); }
.rd-blog-hero__desc { font-size: 1rem; color: var(--muted); line-height: 1.6; }

.rd-blog-list { padding: 0 2rem 6rem; }
.rd-blog-list__inner { max-width: var(--container-n); margin: 0 auto; }
.rd-blog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 1.5rem; }
.rd-blog-empty { color: var(--muted); text-align: center; padding: 3rem 0; }

.rd-blog-card { background: hsl(220 25% 8% / .6); border: 1px solid var(--border); border-radius: .75rem; padding: 1.75rem; display: flex; flex-direction: column; gap: .75rem; transition: border-color .2s, transform .2s; }
.rd-blog-card:hover { border-color: hsl(220 70% 55% / .4); transform: translateY(-2px); }
.rd-blog-card__cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: hsl(220 70% 65%); font-weight: 600; }
.rd-blog-card__title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text); line-height: 1.3; margin: 0; }
.rd-blog-card__link { color: inherit; text-decoration: none; }
.rd-blog-card__link:hover { color: hsl(220 70% 75%); }
.rd-blog-card__excerpt { font-size: .875rem; color: var(--muted); line-height: 1.6; flex: 1; }
.rd-blog-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.rd-blog-card__meta time { font-size: .75rem; color: hsl(220 15% 95% / .35); }
.rd-blog-card__read { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: hsl(220 70% 65%); text-decoration: none; font-weight: 500; transition: gap .2s; }
.rd-blog-card__read:hover { gap: .55rem; }

/* ── Single post ─────────────────────────────────────────── */
.rd-single-post { max-width: 720px; margin: 0 auto; padding: calc(var(--nav-h) + 3rem) 2rem 6rem; }
.rd-single-post__header { margin-bottom: 3rem; }
.rd-single-post__header-inner { display: flex; flex-direction: column; gap: .75rem; }
.rd-single-post__back, .rd-single-post__back-foot { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.rd-single-post__back:hover, .rd-single-post__back-foot:hover { color: var(--text); }
.rd-single-post__cat { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: hsl(220 70% 65%); font-weight: 600; }
.rd-single-post__title { font-family: var(--font-display); font-size: clamp(1.75rem,4vw,2.75rem); font-weight: 700; line-height: 1.15; color: var(--text); margin: 0; }
.rd-single-post__meta time { font-size: .8rem; color: hsl(220 15% 95% / .35); }
.rd-single-post__footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* Prose (rich text body) */
.rd-prose { color: hsl(220 15% 85%); line-height: 1.75; font-size: 1.0625rem; }
.rd-prose h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--text); margin: 2.5rem 0 .75rem; }
.rd-prose h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text); margin: 2rem 0 .5rem; }
.rd-prose p { margin: 0 0 1.25rem; }
.rd-prose strong { color: var(--text); font-weight: 600; }
.rd-prose a { color: hsl(220 70% 70%); text-decoration: underline; text-underline-offset: 3px; }
.rd-prose a:hover { color: hsl(220 70% 85%); }
.rd-prose ul, .rd-prose ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.rd-prose li { margin-bottom: .35rem; }
.rd-prose blockquote { border-left: 3px solid hsl(220 70% 55% / .4); padding-left: 1.25rem; margin: 1.5rem 0; color: var(--muted); font-style: italic; }
.rd-prose code { font-family: monospace; font-size: .875em; background: hsl(220 25% 10%); padding: .15em .4em; border-radius: .25rem; }
.rd-prose pre { background: hsl(220 25% 8%); border: 1px solid var(--border); border-radius: .5rem; padding: 1.25rem; overflow-x: auto; margin: 1.5rem 0; }
.rd-prose pre code { background: none; padding: 0; }

/* ── Contact form ────────────────────────────────────────── */
.rd-contact-form { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 1rem; }
.rd-contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rd-contact-form__field { display: flex; flex-direction: column; gap: .4rem; }
.rd-contact-form__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: hsl(220 15% 95% / .45); font-weight: 500; }
.rd-contact-form__input,
.rd-contact-form__textarea { background: hsl(220 25% 7%); border: 1px solid hsl(220 15% 95% / .12); border-radius: .5rem; padding: .65rem .9rem; font-family: var(--font-body); font-size: .9rem; color: var(--text); transition: border-color .2s; outline: none; width: 100%; box-sizing: border-box; }
.rd-contact-form__input:focus,
.rd-contact-form__textarea:focus { border-color: hsl(220 70% 55% / .5); }
.rd-contact-form__textarea { resize: vertical; min-height: 120px; }
.rd-contact-form__footer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.rd-contact-form__submit { position: relative; display: inline-flex; align-items: center; gap: .6rem; background: var(--primary); color: #fff; border: none; border-radius: .5rem; padding: .75rem 1.5rem; font-family: var(--font-display); font-size: .9rem; font-weight: 600; cursor: pointer; transition: opacity .2s, transform .15s; overflow: hidden; }
.rd-contact-form__submit:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.rd-contact-form__submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rd-contact-form__feedback { margin-top: .5rem; font-size: .85rem; padding: .65rem 1rem; border-radius: .4rem; }
.rd-contact-form__feedback--success { background: hsl(145 60% 20% / .4); border: 1px solid hsl(145 60% 40% / .3); color: hsl(145 60% 75%); }
.rd-contact-form__feedback--error   { background: hsl(0 60% 20% / .4); border: 1px solid hsl(0 60% 40% / .3); color: hsl(0 60% 75%); }

@media (max-width: 640px) {
  .rd-contact-form__row { grid-template-columns: 1fr; }
  .rd-blog-hero { padding-top: calc(var(--nav-h) + 2.5rem); }
  .rd-blog-grid { grid-template-columns: 1fr; }
}
