/* =========================================================
   ROI Technologies — Site Stylesheet
   Colors derived from brand logo
   ========================================================= */

:root {
  --blue-dark:   #2d5f9a;
  --blue-mid:    #4a8cc7;
  --blue-light:  #d6e8f7;
  --charcoal:    #3a3d4a;
  --text:        #333333;
  --text-light:  #666666;
  --bg-light:    #f4f7fb;
  --white:       #ffffff;
  --border:      #dde5f0;
  --shadow:      0 2px 12px rgba(45, 95, 154, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: var(--white);
}

a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue-mid); }

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

/* ── ANIMATIONS ─────────────────────────────────────────── */

@keyframes navLogoIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes heroLogoIn {
  0%   { opacity: 0; transform: scale(0.75) translateY(-16px); }
  70%  { opacity: 1; transform: scale(1.04) translateY(2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes logoGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 0 rgba(74,140,199,0); }
  50%       { box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 28px 6px rgba(74,140,199,0.28); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes floatA {
  0%   { transform: rotate(var(--rot)) translateY(0px); }
  50%  { transform: rotate(calc(var(--rot) + 7deg)) translateY(-20px); }
  100% { transform: rotate(var(--rot)) translateY(0px); }
}

@keyframes floatB {
  0%   { transform: rotate(var(--rot)) translate(0px, 0px); }
  33%  { transform: rotate(calc(var(--rot) - 5deg)) translate(10px, -16px); }
  66%  { transform: rotate(calc(var(--rot) + 4deg)) translate(-7px, -8px); }
  100% { transform: rotate(var(--rot)) translate(0px, 0px); }
}

/* ── NAVIGATION ─────────────────────────────────────────── */

header {
  background: var(--white);
  border-bottom: 2px solid var(--blue-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Crop the PNG's built-in white padding so only the logo content shows */
.nav-logo {
  display: block;
  overflow: hidden;
  width: 148px;
  height: 80px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 130px;
  width: auto;
  display: block;
  margin-top: -20px;
  margin-left: -14px;
  animation: navLogoIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.nav-logo:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 14px rgba(45, 95, 154, 0.35));
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
}

.nav-links li a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: var(--blue-light);
  color: var(--blue-dark);
}

/* ── HERO ───────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, #1a3e6e 0%, #2d5f9a 55%, #4a8cc7 100%);
  color: var(--white);
  padding: 64px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ── FLOATING SQUARES ───────────────────────────────────── */

.hero-squares {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sq {
  position: absolute;
  border-radius: 8px;
  background: #ffffff;
}

/* Large bg square — top-right */
.sq-1  { --rot: -18deg; width: 72px;  height: 72px;  top:  8%; right: 7%;   opacity: 0.10; animation: floatA  8s  ease-in-out infinite 0s; }
/* Medium — far left mid */
.sq-2  { --rot:  14deg; width: 48px;  height: 48px;  top: 38%; left:  5%;   opacity: 0.13; animation: floatB  11s ease-in-out infinite 1.2s; }
/* Small — lower right */
.sq-3  { --rot: -28deg; width: 32px;  height: 32px;  top: 72%; right: 10%;  opacity: 0.11; animation: floatA  9s  ease-in-out infinite 2s; }
/* Tiny — upper left */
.sq-4  { --rot:  22deg; width: 18px;  height: 18px;  top: 15%; left: 18%;   opacity: 0.17; animation: floatB  7s  ease-in-out infinite 0.5s; }
/* Medium — lower left */
.sq-5  { --rot: -10deg; width: 40px;  height: 40px;  top: 80%; left: 12%;   opacity: 0.09; animation: floatA  13s ease-in-out infinite 3s; }
/* XL ghost square — bottom right */
.sq-6  { --rot:  18deg; width: 110px; height: 110px; top: 55%; right: 2%;   opacity: 0.05; animation: floatB  16s ease-in-out infinite 1s; }
/* Small — upper far right */
.sq-7  { --rot: -22deg; width: 26px;  height: 26px;  top:  5%; right: 22%;  opacity: 0.15; animation: floatA  6s  ease-in-out infinite 2.8s; }
/* Medium — center-right upper */
.sq-8  { --rot:  30deg; width: 36px;  height: 36px;  top: 22%; right: 28%;  opacity: 0.08; animation: floatB  10s ease-in-out infinite 4s; }
/* Tiny — center-left lower */
.sq-9  { --rot: -35deg; width: 14px;  height: 14px;  top: 60%; left: 35%;   opacity: 0.18; animation: floatA  5s  ease-in-out infinite 1.5s; }
/* Medium — top center */
.sq-10 { --rot:  8deg;  width: 44px;  height: 44px;  top:  3%; left: 42%;   opacity: 0.07; animation: floatB  14s ease-in-out infinite 0.3s; }

/* Hero logo card */
.hero-logo-card {
  display: inline-block;
  background: rgba(255,255,255,0.97);
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 44px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  animation: heroLogoIn 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both,
             logoGlow 3.5s ease-in-out 0.75s infinite;
}

/* Crop window — strips the PNG's built-in white padding */
.logo-crop {
  display: block;
  width: 210px;
  height: 115px;
  overflow: hidden;
}

.logo-crop img {
  height: 185px;
  width: auto;
  display: block;
  margin-top: -27px;
  margin-left: -20px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.35s;
}

.hero p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 36px;
  opacity: 0.9;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.5s;
}

.hero .btn {
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.65s;
}


.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--white);
  color: var(--blue-dark);
}

.btn-primary:hover {
  background: var(--blue-light);
  color: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid var(--blue-dark);
  color: var(--blue-dark);
  background: transparent;
}

.btn-outline:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* ── PAGE HEADER (inner pages) ──────────────────────────── */

.page-header {
  background: linear-gradient(135deg, #1a3e6e 0%, #2d5f9a 100%);
  color: var(--white);
  padding: 56px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 240px;
  height: 240px;
  background: url('../images/RT_LOGO_HIGH_RES.png') center/contain no-repeat;
  opacity: 0.08;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
}

.page-header p {
  margin-top: 12px;
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── SECTIONS ───────────────────────────────────────────── */

section {
  padding: 72px 24px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 560px;
  margin-bottom: 48px;
}

.bg-light { background: var(--bg-light); }

/* ── CARDS (home service highlights) ───────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(45, 95, 154, 0.15);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--blue-dark);
}

.card h3 {
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ── TWO-COLUMN LAYOUT ──────────────────────────────────── */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

.two-col img {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ── ABOUT PAGE ─────────────────────────────────────────── */

.about-intro {
  font-size: 1.1rem;
  color: var(--text);
  max-width: 760px;
  line-height: 1.8;
}

.about-intro + .about-intro {
  margin-top: 20px;
}

.stat-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 4px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.team-avatar {
  width: 72px;
  height: 72px;
  background: var(--blue-light);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.team-card h3 {
  font-size: 1.1rem;
  color: var(--charcoal);
}

.team-card .role {
  font-size: 0.9rem;
  color: var(--blue-mid);
  font-weight: 500;
  margin-top: 4px;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* ── SERVICES PAGE ──────────────────────────────────────── */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.service-item {
  background: var(--white);
  border-left: 4px solid var(--blue-dark);
  border-radius: 0 8px 8px 0;
  padding: 28px 28px 28px 24px;
  box-shadow: var(--shadow);
}

.service-item h3 {
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.service-item p {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ── CONTACT PAGE ───────────────────────────────────────── */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.4rem;
  color: var(--charcoal);
  margin-bottom: 24px;
}

.contact-detail {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-detail-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--blue-dark);
}

.contact-detail-text strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 2px;
}

.contact-detail-text span,
.contact-detail-text a {
  font-size: 0.98rem;
  color: var(--text);
}

/* contact form */
.contact-form-wrap {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px;
}

.contact-form-wrap h2 {
  font-size: 1.3rem;
  color: var(--charcoal);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(74, 140, 199, 0.15);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 12px;
}

.req { color: var(--blue-dark); font-weight: 700; }

/* Brand name highlight in body text */
.brand { color: var(--blue-dark); font-weight: 700; }

/* On dark/blue backgrounds the dark blue is invisible — use light blue instead */
.cta-band .brand,
.hero .brand,
.page-header .brand { color: #a8d4f5; font-weight: 700; }

.form-result-success {
  padding: 14px 16px;
  background: #edfaf3;
  border: 1px solid #6fcf97;
  border-radius: 6px;
  color: #1a6636;
  font-size: 0.93rem;
  line-height: 1.5;
}

.form-result-error {
  padding: 14px 16px;
  background: #fff0f0;
  border: 1px solid #e57373;
  border-radius: 6px;
  color: #b71c1c;
  font-size: 0.93rem;
  line-height: 1.5;
}

.form-result-error a { color: #b71c1c; text-decoration: underline; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── HOME CTA BAND ──────────────────────────────────────── */

.cta-band {
  background: linear-gradient(135deg, #1a3e6e 0%, #2d5f9a 100%);
  color: var(--white);
  text-align: center;
  padding: 72px 24px;
}

.cta-band h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 16px;
}

.cta-band p {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 480px;
  margin: 0 auto 32px;
}

.btn-white {
  background: var(--white);
  color: var(--blue-dark);
  font-weight: 600;
}

.btn-white:hover {
  background: var(--blue-light);
  color: var(--blue-dark);
  transform: translateY(-1px);
}

/* ── FOOTER ─────────────────────────────────────────────── */

footer {
  background: var(--charcoal);
  color: #b0b8cc;
  padding: 48px 24px 28px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

/* Footer logo — crop PNG whitespace, invert to white for dark bg */
.footer-logo-wrap {
  display: block;
  overflow: hidden;
  width: 148px;
  height: 66px;
  margin-bottom: 14px;
}

.footer-logo-wrap img {
  height: 110px;
  width: auto;
  display: block;
  margin-top: -18px;
  margin-left: -14px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #b0b8cc;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* ── UTILITY ─────────────────────────────────────────────── */

.text-blue { color: var(--blue-dark); }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }

/* ── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links { display: none; }

  .two-col,
  .contact-layout,
  .footer-inner {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .two-col.reverse { direction: ltr; }

  section { padding: 52px 20px; }

  .hero { padding: 72px 20px; }

  .stat-row { gap: 28px; }
}
