/* =========================================================
   RC Technologies — Landing Page
   ========================================================= */
:root {
  --bg: #05070D;
  --bg-2: #080C17;
  --surface: #0B1020;
  --surface-2: #10172B;
  --line: rgba(148, 170, 220, .12);
  --line-strong: rgba(148, 170, 220, .22);
  --text: #E6EBF5;
  --muted: #8A94A8;
  --cyan: #00E0FF;
  --violet: #7B5CFF;
  --green: #3DFFA8;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet));
  --radius: 18px;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
::selection { background: var(--violet); color: #fff; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--cyan); color: #000; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  height: var(--h); padding: 0 1.5em;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--font);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--sm { --h: 40px; font-size: .9rem; padding: 0 1.1em; }
.btn--primary {
  background: var(--grad); color: #04060C;
  box-shadow: 0 8px 30px -8px rgba(0, 224, 255, .55), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn--primary:hover { box-shadow: 0 14px 40px -8px rgba(123, 92, 255, .7), inset 0 1px 0 rgba(255,255,255,.35); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--cyan); }
.btn--whats { background: #10291F; color: #4BF08F; border-color: rgba(75, 240, 143, .3); margin-top: 8px; }
.btn--whats:hover { background: #133525; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5, 7, 13, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 44px; height: 44px; overflow: visible; }
.brand__name { display: grid; line-height: 1; }
.brand__name b { font-weight: 700; font-size: 1.45rem; letter-spacing: .03em; }
.brand__name small {
  font: 500 .6rem var(--mono); letter-spacing: .32em; color: var(--muted); margin-top: 4px;
  display: inline-flex; align-items: center; gap: 4px;
}
.brand__name small::after { content: ""; width: 5px; height: 9px; background: var(--cyan); animation: blink 1.1s steps(1) infinite; }
.lid { animation: lid 4s ease-in-out infinite; }
.brand:hover .brand__mark { filter: drop-shadow(0 0 10px rgba(0, 224, 255, .45)); }
.caret { animation: blink 1.1s steps(1) infinite; }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { color: var(--muted); font-size: .95rem; position: relative; transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  }
  .nav__toggle span { display: block; width: 20px; height: 2px; background: var(--text); transition: transform .3s; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 72px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 16px 24px; background: rgba(5, 7, 13, .97); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .25s var(--ease);
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 90px; overflow: hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 30%, var(--bg) 78%);
}
.hero__net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow {
  position: absolute; width: 900px; height: 900px; right: -300px; top: -300px; z-index: 0;
  background: radial-gradient(circle, rgba(123, 92, 255, .28), transparent 60%);
  filter: blur(20px); animation: float 12s ease-in-out infinite;
}
.hero__glow::before {
  content: ""; position: absolute; width: 600px; height: 600px; left: -500px; top: 600px;
  background: radial-gradient(circle, rgba(0, 224, 255, .18), transparent 60%);
}
.hero__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
}
.hero__grid > *, .split > *, .contact__box > * { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .8rem var(--mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(11, 16, 32, .6);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 2s infinite; }
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 700; margin: 24px 0 20px; letter-spacing: -.035em;
  min-height: 3.3em; overflow-wrap: anywhere;
}
.hero h1 .grad { display: inline; }
.cursor { color: var(--cyan); animation: blink 1s steps(1) infinite; font-weight: 400; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.lead strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 28px; }
.hero__badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .92rem; color: var(--muted); }
.hero__badges span { color: var(--cyan); margin-right: 4px; }

/* Terminal */
.terminal {
  border-radius: var(--radius); overflow: hidden;
  background: rgba(11, 16, 32, .82);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(0, 224, 255, .06), 0 0 80px -20px rgba(0, 224, 255, .25);
  backdrop-filter: blur(10px);
  transform: perspective(1200px) rotateY(-8deg) rotateX(3deg);
  transition: transform .6s var(--ease);
}
.terminal:hover { transform: none; }
.terminal__bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.terminal__bar i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.terminal__bar i:nth-child(2) { background: #FEBC2E; }
.terminal__bar i:nth-child(3) { background: #28C840; }
.terminal__bar span { margin-left: 10px; font: .78rem var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal__body {
  margin: 0; padding: 20px 22px 26px; min-height: 320px;
  font: .86rem/1.75 var(--mono); color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.terminal__body .p { color: var(--cyan); }
.terminal__body .ok { color: var(--green); }
.terminal__body .dim { color: var(--muted); }
.terminal__body .vi { color: #B9A8FF; }
.terminal__body .c { display: inline-block; width: .6em; background: var(--cyan); animation: blink 1s steps(1) infinite; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; z-index: 2; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 14px;
}
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: scroll 1.8s infinite; }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .terminal { transform: none; }
  .scroll-hint { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line); background: var(--bg-2);
  overflow: hidden; padding: 22px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span {
  font: 500 1rem var(--mono); color: var(--muted); padding: 0 28px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 28px;
}
.marquee__track span::after { content: "◆"; font-size: .55rem; color: var(--violet); }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { max-width: 720px; margin-bottom: 56px; }
.kicker { font: 500 .85rem var(--mono); color: var(--cyan); letter-spacing: .02em; margin-bottom: 14px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card {
  grid-column: span 2;
  display: flex; flex-direction: column;
  position: relative; padding: 32px 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), rgba(11, 16, 32, .5));
  border: 1px solid var(--line);
  overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), border-color .35s;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 224, 255, .12), transparent 45%);
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card--feature { background: linear-gradient(135deg, rgba(0, 224, 255, .08), rgba(123, 92, 255, .12)), var(--surface); }
.card:nth-child(4), .card:nth-child(5) { grid-column: span 3; }
.card p { color: var(--muted); text-align: justify; hyphens: auto; -webkit-hyphens: auto; flex: 1; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(0, 224, 255, .08); border: 1px solid rgba(0, 224, 255, .25);
}
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ticks li { font: .78rem var(--mono); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--text); background: rgba(255,255,255,.02); }
.card__code {
  align-self: flex-start; margin-top: 16px; font: .8rem var(--mono); color: var(--muted);
  padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--line);
}
.card__code::before { content: "$ "; color: var(--green); }

@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: span 1; }
  .card:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .card:nth-child(5) { grid-column: span 1; }
}

/* Split / Editor */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.pillar { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.pillar b { display: block; margin-bottom: 4px; }
.pillar span { font-size: .9rem; color: var(--muted); }

.editor {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong);
  background: #070B16; box-shadow: 0 40px 80px -40px rgba(123, 92, 255, .45);
}
.editor__tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--surface); }
.editor__tabs span { font: .78rem var(--mono); padding: 12px 18px; color: var(--muted); border-right: 1px solid var(--line); }
.editor__tabs .is-active { color: var(--text); background: #070B16; box-shadow: inset 0 2px 0 var(--cyan); }
.editor__code { margin: 0; padding: 22px 0; overflow-x: auto; font: .84rem/1.85 var(--mono); color: #C9D3E8; }
.editor__code code { display: block; padding-right: 22px; }
.editor__code .ln { display: inline-block; width: 44px; padding-right: 16px; text-align: right; color: #3A4560; user-select: none; }
.editor__code .k { color: #C792EA; }
.editor__code .t { color: #FFCB6B; }
.editor__code .f { color: #82AAFF; }
.editor__code .v { color: #F07178; }
.editor__code .s { color: #C3E88D; }
.editor__code .n { color: #F78C6C; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 480px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 28px; left: 28px; right: 28px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), transparent);
  opacity: .5;
}
.step { position: relative; padding-top: 0; }
.step__n {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 22px;
  border-radius: 16px; font: 700 1rem var(--mono); position: relative;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--cyan);
}
.step:hover .step__n { background: var(--grad); color: #04060C; border-color: transparent; }
.step p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .steps::before { display: none; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
}

/* Contact */
.contact__box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  padding: clamp(28px, 5vw, 64px); border-radius: 28px; position: relative; overflow: hidden;
  background:
    radial-gradient(600px circle at 0% 0%, rgba(0, 224, 255, .12), transparent 50%),
    radial-gradient(600px circle at 100% 100%, rgba(123, 92, 255, .18), transparent 50%),
    var(--surface);
  border: 1px solid var(--line-strong);
}
.contact__list { list-style: none; padding: 0; margin: 28px 0 20px; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 14px; }
.contact__list svg { width: 22px; height: 22px; fill: none; stroke: var(--cyan); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.contact__list a { word-break: break-all; transition: color .2s; }
.contact__list a:hover { color: var(--cyan); }

.form { display: grid; gap: 16px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label { font: 500 .8rem var(--mono); color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  font: 1rem var(--font); color: var(--text);
  background: rgba(5, 7, 13, .6); border: 1px solid var(--line-strong);
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--surface); }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 224, 255, .12); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #FF6B81; }
.form__note { margin: 0; font-size: .9rem; min-height: 1.4em; color: var(--green); }
.form__note.is-error { color: #FF6B81; }

@media (max-width: 860px) {
  .contact__box { grid-template-columns: 1fr; gap: 36px; }
}

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer p { margin: 0; }
.footer a:hover { color: var(--cyan); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes lid { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 30px); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
