/*
Theme Name: ROSBOTIC — Robotics & AI
Theme URI: https://rosbotic.com/
Author: ROSBOTIC
Description: Robotics research, development and consulting theme covering UGV, UAV, service robots, humanoid robots and AI services. Animated digital-rain hero with a gradient dune silhouette, pill navigation, trusted-by badge and live stats.
Version: 3.1.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: rosbotic
*/

:root {
  --rb-bg: #060506;
  --rb-panel: #121014;
  --rb-text: #F5F3F6;
  --rb-muted: #B7AFB9;
  --rb-accent: #FF6A2B;
  --rb-accent-2: #FFB13D;
  --rb-line: rgba(255,255,255,.12);
  --rb-max: 1280px;
  --rb-dune-1: #cfd0e4;
  --rb-dune-2: #e7b7c6;
  --rb-dune-3: #e79a68;
  --rb-dune-4: #b0563f;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; background:var(--rb-bg); color:var(--rb-text); font-family:'Space Grotesk',Inter,system-ui,sans-serif; }
a { color:inherit; }
img { max-width:100%; height:auto; }
button,input,textarea,select { font:inherit; }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.rb-container { width:min(calc(100% - 40px), var(--rb-max)); margin-inline:auto; }
.rb-pixel { font-family:'Silkscreen', monospace; }

/* ---------- Fade-in utility ---------- */
.rb-fade {
  opacity: 0;
  transform: translate(var(--rb-fade-x, 0px), var(--rb-fade-y, 24px));
  transition: opacity .7s cubic-bezier(.25,.1,.25,1), transform .7s cubic-bezier(.25,.1,.25,1);
}
.rb-fade.is-visible { opacity: 1; transform: translate(0,0); }

/* ================= TOPBAR (utility strip) ================= */
.rb-topbar {
  background: var(--rb-panel);
  border-bottom: 1px solid var(--rb-line);
  font-size: 12.5px;
  padding: 9px 0;
}
.rb-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rb-topbar__contact { display: flex; align-items: center; gap: 20px; }
.rb-topbar__contact a { color: var(--rb-muted); text-decoration: none !important; transition: color .2s ease; }
.rb-topbar__contact a:hover { color: #fff; }
.rb-topbar__social { display: flex; align-items: center; gap: 14px; }
.rb-topbar__social a { color: var(--rb-muted); display: flex; transition: color .2s ease; }
.rb-topbar__social a:hover { color: var(--rb-accent); }
.rb-topbar__social svg { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .rb-topbar__contact a:last-child { display: none; }
}

/* ================= HEADER — STICKY BAR ================= */
.rb-site-header {
  position: sticky; top: 0; left: 0; right: 0; z-index: 90;
  background: linear-gradient(120deg, rgba(28,16,19,.72), rgba(42,23,16,.72));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.rb-site-header.is-scrolled {
  background: rgba(10,8,9,.92);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.rb-header-dust {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .6;
  transition: opacity .3s ease;
}
.rb-site-header.is-scrolled .rb-header-dust { opacity: .25; }
.rb-header-dust svg { width: 100%; height: 100%; display: block; }
.rb-header-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 20px;
  padding: 16px 20px;
  transition: padding .3s ease;
}
.rb-site-header.is-scrolled .rb-header-inner { padding-block: 10px; }
.rb-brand {
  flex: none; display: flex; align-items: center; height: 36px;
  transition: height .3s ease;
}
.rb-site-header.is-scrolled .rb-brand { height: 30px; }
.rb-brand a { display: flex; align-items: center; height: 100%; text-decoration: none; }
.rb-brand img,
.rb-brand .custom-logo {
  height: 100%; width: auto; max-width: none; display: block; object-fit: contain;
}
.rb-nav-links {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 46px);
}
.rb-nav-links ul {
  display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 46px);
  list-style: none; margin: 0; padding: 0;
}
.rb-nav-links li { list-style: none; margin: 0; padding: 0; }
.rb-nav-links a, .rb-nav-links li > a {
  text-decoration: none !important; color: var(--rb-text); font-size: 14px; font-weight: 500;
  opacity: .72; transition: opacity .2s ease;
}
.rb-nav-links a:hover, .rb-nav-links a.is-active,
.rb-nav-links .current-menu-item > a, .rb-nav-links .current_page_item > a { opacity: 1; }
.rb-btn-cta {
  flex: none; text-decoration: none !important; color: #fff; font-size: 14px; font-weight: 700;
  border-radius: 999px; padding: 12px 24px; display: flex; align-items: center;
  background: linear-gradient(120deg, var(--rb-accent) 0%, var(--rb-accent-2) 100%);
  box-shadow: 0 8px 22px rgba(255,106,43,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rb-btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,106,43,.45); }
.rb-menu-toggle { display:none; }

@media (max-width: 780px) {
  .rb-topbar { display: none; }
  .rb-brand { height: 28px; }
  .rb-nav-links { display:none; }
  .rb-nav-links.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 64px; left: 20px; right: 20px; z-index: 5;
    background: rgba(18,16,20,.96);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px; padding: 14px 18px;
  }
  .rb-nav-links.is-open a, .rb-nav-links.is-open li > a { opacity: 1; padding: 8px 0; width: 100%; }
  .rb-nav-links.is-open ul { flex-direction: column; align-items: flex-start; width: 100%; gap: 4px; }
  .rb-nav-links.is-open li { width: 100%; }
  .rb-menu-toggle {
    display:grid; place-items:center; margin-left:auto;
    width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,.1); border:none; color:#fff;
  }
  .rb-btn-cta { padding: 10px 18px; font-size: 13px; }
}

/* ================= HERO ================= */
.rb-hero {
  position: relative;
  min-height: calc(100svh - 70px);
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--rb-bg);
}
.rb-hero__rain {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  display: block;
}
.rb-hero__dune {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
}
.rb-hero__dune svg { width: 100%; height: 100%; display:block; }
.rb-hero__vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6,5,6,0) 0%, rgba(6,5,6,0) 55%, rgba(6,5,6,.9) 88%, #060506 100%);
}

.rb-hero__content {
  position: relative; z-index: 10;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 26px;
  padding: 60px 20px 40px;
}

.rb-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(10,9,11,.55); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
  border-radius: 999px; padding: 6px 18px 6px 8px;
  color: #fff; font-size: 12px; font-weight: 600;
}
.rb-badge__icons { display:flex; }
.rb-badge__icons span {
  width: 24px; height: 24px; border-radius: 50%; background: var(--rb-accent);
  color:#fff; font-size: 11px; font-weight:700; display:grid; place-items:center;
  border: 2px solid rgba(10,9,11,.9); margin-left: -8px;
}
.rb-badge__icons span:first-child { margin-left: 0; }

.rb-hero__heading {
  margin: 0; color: #fff; text-transform: none; line-height: 1.35;
  font-size: clamp(28px, 5.4vw, 62px);
  letter-spacing: .02em;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.rb-hero__heading span { display:block; }

.rb-hero__sub {
  margin: 0; max-width: 560px; color: rgba(255,255,255,.82);
  font-size: clamp(14px, 1.6vw, 17px); line-height: 1.6; font-weight: 400;
}

.rb-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #100d10; text-decoration: none;
  border-radius: 999px; padding: 15px 30px; font-size: 14px; font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.rb-btn-primary:hover { transform: translateY(-2px); }

/* ---------- Stats bar ---------- */
.rb-stats {
  position: relative; z-index: 10;
  border-top: 1px solid rgba(255,255,255,.08);
  background: var(--rb-bg);
}
.rb-stats__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
  padding: 36px 20px;
  max-width: var(--rb-max); margin: 0 auto;
}
@media (min-width: 700px) { .rb-stats__grid { grid-template-columns: repeat(4, 1fr); } }
.rb-stat { text-align: center; display:flex; flex-direction:column; align-items:center; gap:8px; }
.rb-stat__icon { color: var(--rb-accent); width: 22px; height: 22px; }
.rb-stat__value { margin:0; font-weight:700; font-size: clamp(1.4rem, 3vw, 1.9rem); color: #fff; }
.rb-stat__label { margin:0; color: var(--rb-muted); font-size: 12px; text-transform: uppercase; letter-spacing:.06em; }

/* ================= DOMAINS (services) ================= */
.rb-domains { background: var(--rb-bg); padding: 100px 20px; }
.rb-domains__head { max-width: 640px; margin: 0 auto 56px; text-align:center; }
.rb-domains__kicker { color: var(--rb-accent); font-size: 12px; font-weight: 700; letter-spacing:.18em; text-transform: uppercase; margin: 0 0 14px; }
.rb-domains__head h1, .rb-domains__head h2 { margin:0 0 14px; font-size: clamp(30px, 5vw, 48px); font-weight:600; color:#fff; }
.rb-domains__head p { margin:0; color: var(--rb-muted); line-height:1.7; }
.rb-domains__grid {
  max-width: var(--rb-max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
@media (min-width: 700px) { .rb-domains__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rb-domains__grid { grid-template-columns: repeat(3, 1fr); } }
.rb-domain {
  position: relative; overflow: hidden;
  background: var(--rb-panel); border: 1px solid var(--rb-line); border-radius: 24px;
  padding: 30px 26px; display:flex; flex-direction:column; gap: 14px;
  transition: transform .3s ease, border-color .3s ease;
}
.rb-domain:hover { transform: translateY(-6px); border-color: rgba(255,106,43,.5); }
.rb-domain__icon { width: 56px; height: 56px; flex:none; }
.rb-domain__icon img { width:100%; height:100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.4)); }
.rb-domain h3 { margin:0; font-size: 19px; font-weight:600; color:#fff; }
.rb-domain p { margin:0; color: var(--rb-muted); font-size: 14px; line-height:1.65; }
.rb-domain--wide { grid-column: span 1; }
@media (min-width: 1024px) { .rb-domain--wide { grid-column: span 3; flex-direction: row; align-items:center; } }

/* ================= CASE STUDIES ================= */
.rb-cases { background: var(--rb-panel); padding: 100px 20px; }
.rb-domains__head + .rb-cases__grid { margin-top: 0; }
.rb-cases__grid {
  max-width: var(--rb-max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 20px;
}
@media (min-width: 860px) { .rb-cases__grid { grid-template-columns: repeat(3, 1fr); } }
.rb-case {
  background: var(--rb-bg); border: 1px solid var(--rb-line); border-radius: 24px;
  overflow: hidden; display:flex; flex-direction:column;
  transition: transform .3s ease, border-color .3s ease;
}
.rb-case:hover { transform: translateY(-6px); border-color: rgba(255,106,43,.5); }
.rb-case__media { aspect-ratio: 16/11; background: var(--rb-panel); display:grid; place-items:center; padding: 30px; }
.rb-case__media img { max-height: 100%; object-fit: contain; }
.rb-case__body { padding: 22px 24px 26px; display:flex; flex-direction:column; gap:8px; }
.rb-case__tag { color: var(--rb-accent); font-size: 11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.rb-case__body h3 { margin:0; color:#fff; font-size:19px; font-weight:600; }
.rb-case__body p { margin:0; color: var(--rb-muted); font-size:14px; line-height:1.6; }

/* ================= CTA ================= */
.rb-cta {
  background: var(--rb-bg); padding: 100px 20px; text-align:center;
  border-top: 1px solid var(--rb-line);
}
.rb-cta h2 { margin:0 0 16px; font-size: clamp(28px,5vw,46px); color:#fff; font-weight:600; }
.rb-cta p { margin:0 0 30px; color: var(--rb-muted); max-width:520px; margin-inline:auto; line-height:1.7; }

/* ================= FOOTER ================= */
.rb-footer { padding:36px 0; border-top:1px solid var(--rb-line); color: var(--rb-muted); font-size:13px; background:var(--rb-bg); }
.rb-footer-inner { display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; }

@media (max-width:699px) {
  .rb-footer-inner { flex-direction:column; gap: 8px; }
  .rb-domain--wide { flex-direction: column; }
}
