/* Automation AI Ltd — blueprint (deep blue + white line hierarchy) */

:root {
  /* Base: pronounced cobalt / blueprint blue */
  --bp-blue: #4169b2;
  --bp-blue-mid: #345590;
  --bp-blue-deep: #21365c;
  /* Gradient stops — slightly brighter top-left like lit blueprint */
  --bp-shine: #517dcc;

  /* White line “inks” — structural (brightest) → dimension (faintest), like a real blueprint */
  --w-struct: rgba(255, 255, 255, 0.92);
  --w-strong: rgba(255, 255, 255, 0.72);
  --w-medium: rgba(255, 255, 255, 0.48);
  --w-soft: rgba(255, 255, 255, 0.32);
  --w-dim: rgba(255, 255, 255, 0.2);
  --w-ghost: rgba(255, 255, 255, 0.12);

  /* Background grid: clearly secondary to drawing lines */
  --bp-grid-fine: rgba(255, 255, 255, 0.04);
  --bp-grid-major: rgba(255, 255, 255, 0.1);

  /* Type on dark blue */
  --text: rgba(255, 255, 255, 0.94);
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-dim: rgba(255, 255, 255, 0.45);

  --accent: #9fd8ff;
  --accent-hover: #ffffff;

  --sheet-fill: rgba(255, 255, 255, 0.045);
  --sheet-inner-line: rgba(255, 255, 255, 0.14);

  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --grid-size: 28px;
  --radius: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bp-blue-deep);
  /* Grids stack above a saturated cobalt wash (grids = faintest whites) */
  background-image:
    linear-gradient(var(--bp-grid-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid-fine) 1px, transparent 1px),
    linear-gradient(var(--bp-grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid-major) 1px, transparent 1px),
    linear-gradient(
      165deg,
      var(--bp-shine) 0%,
      var(--bp-blue) 42%,
      var(--bp-blue-mid) 72%,
      var(--bp-blue-deep) 100%
    );
  background-size:
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size),
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    calc(var(--grid-size) * 5) calc(var(--grid-size) * 5),
    100% 100%;
  background-position:
    -1px -1px,
    -1px -1px,
    -1px -1px,
    -1px -1px,
    0 0;
}

/* Slight depth: darker toward edges like a large sheet */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 95% 80% at 50% 35%,
    transparent 30%,
    rgba(2, 18, 42, 0.5) 100%
  );
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.wrap {
  position: relative;
  z-index: 1;
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
  padding-block: 2rem 4rem;
}

/* —— Drawing primitives: corner brackets & dimension ticks —— */

.sheet {
  position: relative;
  background: var(--sheet-fill);
  /* Outer “pen” stroke — main structural outline */
  border: 1px solid var(--w-strong);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
  /* Inner registration line — lighter, like offset traces */
  box-shadow: inset 0 0 0 1px var(--sheet-inner-line);
}

.sheet::before,
.sheet::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--w-struct);
  border-style: solid;
  pointer-events: none;
}

.sheet::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.sheet::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.sheet--tight {
  padding: 1rem 1.25rem;
}

.dim-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* —— Site header —— */

.site-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2.5rem;
}

.site-header__top {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 720px) {
  .site-header__top {
    grid-template-columns: 1fr auto;
  }
}

/* Separator between logo row and primary navigation */
.nav--primary {
  border-top: 1px solid var(--w-soft);
  box-shadow: 0 -1px 0 0 var(--w-dim);
  margin-top: 1.1rem;
  padding-top: 1.1rem;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.logo {
  display: block;
  width: 72px;
  height: auto;
  flex-shrink: 0;
  /* Read as light “ink” on blueprint blue */
  filter: brightness(0) invert(1)
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.35));
  opacity: 0.95;
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Title block (like a drawing border annotation) */
.title-block {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.4;
  border: 1px solid var(--w-medium);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: min(100%, 220px);
  color: var(--text);
  background: rgba(0, 24, 52, 0.35);
  box-shadow: inset 0 0 0 1px var(--w-dim);
}

.title-block table {
  width: 100%;
  border-collapse: collapse;
}

.title-block th,
.title-block td {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--w-soft);
  text-align: left;
  vertical-align: top;
}

.title-block th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 38%;
  color: var(--text-muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--w-soft);
  padding-bottom: 2px;
}

.nav a:hover {
  border-bottom-style: solid;
  border-color: var(--accent);
  color: var(--accent);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-style: solid;
  border-color: var(--accent);
}

/* —— Hero —— */

.hero {
  position: relative;
  padding-bottom: 0.5rem;
}

.hero h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  max-width: 36ch;
}

.hero p {
  margin: 0;
  max-width: 52ch;
  color: var(--text-muted);
}

.hero-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.hero-line::before,
.hero-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--w-medium),
    var(--w-dim) 45%,
    transparent
  );
}

.hero-line::after {
  background: linear-gradient(
    270deg,
    var(--w-medium),
    var(--w-dim) 45%,
    transparent
  );
}

/* —— Section headings —— */

section {
  margin-bottom: 2.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--w-strong);
}

.section-head .rule {
  flex: 1;
  min-width: 4rem;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--w-soft),
    var(--w-soft) 6px,
    transparent 6px,
    transparent 10px
  );
  opacity: 0.85;
}

.section-id {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* —— Service cards as “detail” callouts —— */

.grid-services {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-services {
    grid-template-columns: repeat(3, 1fr);
  }
}

.detail {
  position: relative;
  border: 1px solid var(--w-medium);
  border-radius: var(--radius);
  padding: 1.1rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  min-height: 100%;
  box-shadow: inset 0 0 0 1px var(--w-dim);
}

.detail::before {
  content: attr(data-ref);
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.detail h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  padding-right: 3rem;
  color: var(--text);
}

.detail p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.detail .corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--w-strong);
  border-style: solid;
  opacity: 0.85;
}

.detail .corner--tl {
  top: 4px;
  left: 4px;
  border-width: 1px 0 0 1px;
}

.detail .corner--br {
  bottom: 4px;
  right: 4px;
  border-width: 0 1px 1px 0;
}

/* —— About —— */

.about-text {
  margin: 0;
  max-width: 65ch;
  color: var(--text-muted);
}

.about-text + .about-text {
  margin-top: 1rem;
}

/* —— Contact —— */

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.contact-row a {
  font-weight: 500;
}

/* —— Footer —— */

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--w-soft);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}

/* —— Migrated home: hero carousel, features, process band, service grid —— */

.wrap--hero {
  width: min(1200px, 100%);
  margin-inline: auto;
  padding-inline: 0;
}

.hero-full {
  position: relative;
  z-index: 1;
  margin-bottom: 2.5rem;
}

.hero-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border: 1px solid var(--w-strong);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--sheet-inner-line);
  -webkit-overflow-scrolling: touch;
}

.hero-scroll::-webkit-scrollbar {
  height: 6px;
}

.hero-scroll::-webkit-scrollbar-thumb {
  background: var(--w-soft);
  border-radius: 3px;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: min(72vw, 420px);
  max-height: 520px;
}

.hero-slide__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.85);
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 28, 58, 0.75) 0%,
    rgba(5, 28, 58, 0.15) 55%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-slide__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem 1.75rem;
  text-align: center;
}

.hero-slide__kicker {
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.hero-slide__sub {
  margin: 0.5rem 0 0;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 42ch;
  margin-inline: auto;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.hero-hint {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
}

.hero-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--w-dim);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.hero-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
  border-color: var(--w-soft);
}

.hero-nav-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Why choose us */
.features-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-block {
  border: 1px solid var(--w-medium);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--w-dim);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-block__icon {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--w-soft);
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.feature-block__text {
  min-width: 0;
}

.feature-block h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  color: var(--w-strong);
}

.feature-block p {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Process strip */
.process-band {
  position: relative;
  border: 1px solid var(--w-strong);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
  margin-bottom: 2.5rem;
  box-shadow: inset 0 0 0 1px var(--sheet-inner-line);
}

.process-band__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.55);
}

.process-band__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(5, 28, 58, 0.88) 0%,
    rgba(5, 28, 58, 0.45) 100%
  );
}

.process-band__inner {
  position: relative;
  z-index: 1;
  padding: 1.75rem 1.25rem;
}

.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}

.process-steps .step-num {
  display: inline-block;
  min-width: 1.6rem;
  text-align: center;
  border: 1px solid var(--w-medium);
  margin-right: 0.35rem;
  color: var(--accent);
}

/* Service grid (integration cards) */
.services-wide {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .services-wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .services-wide {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--w-medium);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--w-dim);
  min-height: 100%;
}

.service-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.25);
}

.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.9);
}

.service-card__body {
  padding: 1rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.service-card__body h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.service-card__body h3 a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--w-soft);
}

.service-card__body h3 a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.service-card__body p {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.service-card__more {
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.section-lead {
  text-align: center;
  max-width: 56ch;
  margin: 0.5rem auto 1.5rem;
  color: var(--text-muted);
}

/* Topic pages (av / networking / development) */
.topic {
  margin-bottom: 2.5rem;
}

.topic-figure {
  border: 1px solid var(--w-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: inset 0 0 0 1px var(--sheet-inner-line);
}

.topic-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.92);
}

.topic-body h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.topic-body p {
  margin: 0;
  color: var(--text-muted);
}

.topic-body p + p {
  margin-top: 0.75rem;
}

/* Contact page */
.contact-map {
  margin-top: 1rem;
  border: 1px solid var(--w-medium);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  box-shadow: inset 0 0 0 1px var(--w-dim);
}

.contact-map iframe {
  display: block;
  width: 100%;
  min-height: 280px;
  border: 0;
  filter: saturate(0.85) contrast(1.05);
}

.contact-blocks {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .contact-blocks {
    grid-template-columns: 1fr 1fr;
  }
}

.info-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.info-list li + li {
  margin-top: 0.5rem;
}

.info-list strong {
  color: var(--w-strong);
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
