/* =========================================================
   The Good Robot — styles
   Brand palette:
   #071E59 dark blue · #C60303 red · #000000 black · #5CE1E6 light blue
   ========================================================= */

:root {
  --background: #040a1c;
  --foreground: #eef2fb;
  --card: #071e59;
  --primary: #c60303;
  --primary-foreground: #ffffff;
  --muted-foreground: #8ea2ce;
  --accent: #5ce1e6;
  --accent-foreground: #04122e;
  --border: rgba(92, 225, 230, 0.14);

  --maxw: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 106px;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: "Economica", "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

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

.text-accent {
  color: var(--accent);
}

/* ------------------------ Buttons ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: "Economica", sans-serif;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  opacity: 0.9;
}

.btn-accent {
  background-color: rgba(92, 225, 230, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-accent:hover {
  background-color: rgba(92, 225, 230, 0.2);
}

.btn-outline {
  border-color: var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ------------------------ Header ------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background-color: rgba(4, 10, 28, 0.85);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}

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

.header-logo img {
  height: 68px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.header-nav a {
  font-family: "Economica", sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--accent);
}

.header-nav a.btn:hover {
  color: var(--primary-foreground);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--foreground);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu[hidden] {
  display: none;
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  padding: 8px 24px 20px;
  background-color: rgba(4, 10, 28, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.mobile-menu a {
  padding: 16px 0;
  font-family: "Economica", sans-serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a.btn {
  margin-top: 16px;
  border-bottom: none;
}

/* ---------------------- Side nav ------------------------ */
.side-nav {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
}
.side-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
}
.side-nav .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(142, 162, 206, 0.5);
  transition: all 0.3s ease;
}
.side-nav .dot-label {
  font-family: "Economica", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted-foreground);
  opacity: 0;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.side-nav a:hover .dot {
  border-color: var(--accent);
}
.side-nav a:hover .dot-label {
  opacity: 1;
}
.side-nav a.active .dot {
  border-color: var(--accent);
  background-color: var(--accent);
}
.side-nav a.active .dot-label {
  opacity: 1;
  color: var(--accent);
}

/* ------------------------- Hero ------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 112px 0 80px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: linear-gradient(to right, #5ce1e6 1px, transparent 1px),
    linear-gradient(to bottom, #5ce1e6 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.glow-right {
  right: -160px;
  top: 25%;
  width: 520px;
  height: 520px;
  background-color: rgba(92, 225, 230, 0.2);
}
.glow-left {
  left: -160px;
  bottom: 0;
  width: 420px;
  height: 420px;
  background-color: rgba(92, 225, 230, 0.1);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: "Economica", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
}

.hero-text h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  text-wrap: balance;
}

.lead {
  margin-top: 24px;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 32rem;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stats dt {
  font-family: "Economica", sans-serif;
  font-size: 2.25rem;
  color: var(--accent);
}
.stats dd {
  margin-top: 4px;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--muted-foreground);
}

.hero-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  max-width: 420px;
  margin-left: auto;
}
.hero-logo img {
  position: relative;
  width: 75%;
  max-width: 20rem;
}
.ring {
  position: absolute;
  border-radius: 50%;
}
.ring-1 {
  inset: 32px;
  border: 1px solid rgba(92, 225, 230, 0.3);
}
.ring-2 {
  inset: 64px;
  border: 1px solid rgba(92, 225, 230, 0.5);
}
.ring-glow {
  position: absolute;
  inset: 96px;
  border-radius: 50%;
  background-color: rgba(92, 225, 230, 0.15);
  filter: blur(40px);
}

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

.section-head {
  max-width: 42rem;
}
.section-eyebrow {
  font-family: "Economica", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
}
.section-head h2,
.why-intro h2,
.contact-content h2 {
  margin-top: 16px;
  font-size: clamp(2rem, 4vw, 3rem);
  text-wrap: balance;
}
.section-sub {
  margin-top: 20px;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

/* ------------------------- Cards ------------------------ */
.card-grid {
  display: grid;
  gap: 24px;
  margin-top: 56px;
}
.services-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.sectors-grid {
  grid-template-columns: repeat(3, 1fr);
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(92, 225, 230, 0.4);
  background-color: rgba(92, 225, 230, 0.1);
  color: var(--accent);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-tile svg {
  width: 24px;
  height: 24px;
}
.icon-tile-solid {
  background-color: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}

.service-card {
  position: relative;
  background-color: var(--background);
  padding: 32px;
  transition: background-color 0.2s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.service-card:hover {
  background-color: var(--card);
}
.service-card:hover::before {
  transform: scaleX(1);
}
.service-card:hover .icon-tile {
  background-color: var(--accent);
  color: var(--accent-foreground);
}
.service-card h3 {
  margin-top: 24px;
  font-size: 1.5rem;
  line-height: 1.15;
}
.service-card p {
  margin-top: 12px;
  color: var(--muted-foreground);
}

/* Services intro notes (two separate rows/bullets) */
.section-notes {
  margin-top: 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section-notes li {
  position: relative;
  padding-left: 22px;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-wrap: pretty;
}
.section-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--accent);
}

/* AI services subsection — visually distinct so it stands out */
.subsection-head {
  max-width: 42rem;
  margin-top: 88px;
}
.subsection-title {
  margin-top: 16px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  text-wrap: balance;
}
.ai-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: rgba(92, 225, 230, 0.35);
  border: 1px solid rgba(92, 225, 230, 0.35);
  border-radius: 12px;
  overflow: hidden;
}
.ai-card {
  background-color: color-mix(in srgb, var(--accent) 7%, var(--background));
}
.ai-card::before {
  background-color: var(--accent);
}
.ai-card:hover {
  background-color: color-mix(in srgb, var(--accent) 12%, var(--background));
}

.sector-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--card);
  transition: border-color 0.2s ease;
}
.sector-card:hover {
  border-color: rgba(92, 225, 230, 0.5);
}
.sector-tag {
  margin-top: 24px;
  font-family: "Economica", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.sector-card h3 {
  margin-top: 4px;
  font-size: 1.5rem;
}
.sector-card p {
  margin-top: 12px;
  color: var(--muted-foreground);
}

/* ------------------------ Why us ------------------------ */
.why-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.why-intro {
  position: sticky;
  top: 112px;
}

.mascot {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}
.mascot img {
  width: 56px;
  height: 56px;
  opacity: 0.7;
  filter: invert(1);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.mascot:hover img {
  transform: rotate(-6deg);
  opacity: 1;
}
.mascot-contact {
  margin-top: 0;
  margin-left: auto;
  align-self: center;
}
.mascot-contact img {
  width: 48px;
  height: 48px;
}

.why-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.why-list li {
  background-color: var(--background);
  padding: 32px;
  border-left: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.why-list li:hover {
  background-color: var(--card);
  border-left-color: var(--accent);
}
.why-list h3 {
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--accent);
}
.why-list p {
  margin-top: 12px;
  color: var(--muted-foreground);
}

/* ------------------------ Contact ----------------------- */
.contact-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(92, 225, 230, 0.25);
  border-radius: 16px;
  background-color: var(--card);
  padding: 80px;
}
.contact-glow-1 {
  right: -96px;
  top: -96px;
  width: 288px;
  height: 288px;
  background-color: rgba(92, 225, 230, 0.25);
}
.contact-glow-2 {
  left: -96px;
  bottom: -96px;
  width: 288px;
  height: 288px;
  background-color: rgba(198, 3, 3, 0.15);
}
.contact-content {
  position: relative;
  max-width: 42rem;
}
.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

/* Contact form */
.contact-form {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.form-row .form-field {
  flex: 1 1 200px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--foreground);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field textarea {
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted-foreground);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(92, 225, 230, 0.2);
}
.contact-form .btn {
  align-self: flex-start;
}
.contact-alt {
  margin-top: 32px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ------------------------ Footer ------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-logo {
  height: 36px;
  width: auto;
}
.footer-tag {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.footer-nav a {
  font-family: "Economica", sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}
.footer-nav a:hover {
  color: var(--foreground);
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ---------------------- Responsive ---------------------- */
@media (max-width: 1024px) {
  .side-nav {
    display: none;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-logo {
    display: none;
  }
  .why-inner {
    grid-template-columns: 1fr;
  }
  .why-intro {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .services-grid,
  .sectors-grid,
  .ai-grid,
  .why-list {
    grid-template-columns: 1fr;
  }
  .contact-card {
    padding: 40px 24px;
  }
  .section {
    padding: 72px 0;
  }
}

/* ------------------- Scroll reveal ------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
