/* --------------------------------------------------------------------------
   AI Devices Ltd — design tokens
   Change the :root values below to restyle the site without touching layout.
   -------------------------------------------------------------------------- */

:root {
  --color-brand: #093cf7;
  --color-brand-hover: #062dcc;
  --color-brand-soft: #e8eeff;
  --color-navy: #070f24;
  --color-navy-soft: #121c36;
  --color-ink: #141b28;
  --color-muted: #5b6778;
  --color-paper: #f3f5f9;
  --color-white: #ffffff;
  --color-line: #d9e0ea;
  --color-hero-start: rgba(7, 15, 36, 0.94);
  --color-hero-mid: rgba(7, 15, 36, 0.72);
  --color-hero-end: rgba(7, 15, 36, 0.38);

  --font-sans: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --wrap: 70rem;
  --header-h: 4.5rem;
  --radius: 0.75rem;
  --shadow: 0 12px 40px rgba(7, 15, 36, 0.08);
  --space: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-brand-hover);
}

:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--color-white);
  color: var(--color-ink);
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-brand);
}

.hero .eyebrow,
.cta-band .eyebrow,
.page-hero .eyebrow {
  color: #9db4ff;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 600;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.lede {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 42rem;
}

.hero .lede,
.page-hero .lede,
.cta-band .lede {
  color: #d5dce8;
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--color-navy);
  color: var(--color-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 3.1rem;
  width: auto;
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.4rem;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  color: #e8edf7;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-white);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--color-brand);
}

.site-nav .btn {
  box-shadow: none;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.2rem;
  border-radius: 0.45rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--color-brand);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-brand-hover);
  color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line);
}

.btn-outline:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.prose {
  max-width: 46rem;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* Hero ------------------------------------------------------------------- */

.hero,
.page-hero {
  position: relative;
  color: var(--color-white);
  background-color: var(--color-navy);
  isolation: isolate;
}

.hero {
  min-height: 20rem;
  padding: 2rem 0 2.5rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--color-hero-start) 0%, var(--color-hero-mid) 46%, var(--color-hero-end) 100%),
    linear-gradient(180deg, rgba(7, 15, 36, 0.15), rgba(7, 15, 36, 0.55)),
    url("/images/edge-ai-chip.webp") center right / cover no-repeat;
}

.hero-content {
  max-width: 65rem;
}
.hero-content .lede {
  max-width: 40rem;
}

.page-hero {
  padding: 3.5rem 0 3rem;
  background:
    linear-gradient(90deg, var(--color-navy) 0%, var(--color-navy-soft) 100%);
}

.page-hero p:last-child {
  margin-bottom: 0;
}

/* Sections --------------------------------------------------------------- */

.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  margin: 0;
  color: var(--color-muted);
}

.section-muted {
  background: var(--color-paper);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: start;
}

.split-copy p {
  margin-top: 0;
}

.checklist {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.checklist li {
  position: relative;
  padding-left: 1.7rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--color-brand);
}

.panel {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow);
}

.panel h3 {
  margin-top: 0;
}

.panel ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--color-muted);
}

.panel li + li {
  margin-top: 0.4rem;
}

/* Cards ------------------------------------------------------------------ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 100%;
}

.card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.98rem;
}

.card h3 {
  margin: 0;
}

.card-icon {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--color-brand);
  margin-bottom: 0.35rem;
}

.card-link {
  margin-top: auto;
  padding-top: 0.8rem;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.industry {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-left: 3px solid var(--color-brand);
  border-radius: 0.4rem;
  padding: 0.95rem 1rem;
  font-weight: 600;
  font-size: 0.98rem;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.why-grid li {
  padding-left: 1.6rem;
  position: relative;
}

.why-grid li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-brand);
  font-weight: 700;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  border-top: 1px solid var(--color-line);
  padding-top: 1rem;
}

.stat strong {
  display: block;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Service detail --------------------------------------------------------- */

.service-block + .service-block {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-line);
}

.service-media {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-navy);
  border: 1px solid var(--color-line);
}

.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 16rem;
}

.service-media.contain {
  background: var(--color-white);
}

.service-media.contain img {
  object-fit: contain;
  padding: 1.5rem;
}

.service-media-stack {
  display: grid;
  gap: 0.85rem;
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.platform {
  background: var(--color-paper);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* CTA / footer ----------------------------------------------------------- */

.cta-band {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 4rem 0;
}

.cta-band h2 {
  max-width: 32rem;
}

.site-footer {
  background: #050a18;
  color: #c5cddd;
  padding: 3rem 0 1.5rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.site-footer a {
  color: #dce4f2;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.site-footer h3 {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-links,
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-brand p {
  max-width: 22rem;
}

.footer-logo {
  height: 2.8rem;
  width: auto;
  margin-bottom: 0.85rem;
}

.legal {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #8b97ab;
  font-size: 0.85rem;
}

/* Forms ------------------------------------------------------------------ */

.form-grid {
  display: grid;
  gap: 0.95rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--color-line);
  border-radius: 0.45rem;
  background: var(--color-white);
  color: var(--color-ink);
  width: 100%;
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 60, 247, 0.15);
}

.form-note,
.form-status {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0.3rem 0 0;
}

.form-status[data-state="ok"] {
  color: #0b6b3a;
}

.form-status[data-state="error"] {
  color: #9b1c1c;
}

.contact-details {
  display: grid;
  gap: 1.1rem;
}

.contact-details a {
  font-weight: 600;
  text-decoration: none;
}

/* 404 -------------------------------------------------------------------- */

.empty-state {
  padding: 6rem 0;
  text-align: center;
}

.empty-state h1 {
  margin-bottom: 0.6rem;
}

.empty-state .lede {
  margin-inline: auto;
}

.empty-state .hero-actions {
  justify-content: center;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 960px) {
  .card-grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .industry-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(7, 15, 36, 0.88), rgba(7, 15, 36, 0.78)),
      url("/images/edge-ai-chip.webp") center / cover no-repeat;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 1.5rem));
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-navy-soft);
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav.is-open {
    display: flex;
  }

  .card-grid,
  .split,
  .footer-grid,
  .why-grid,
  .stat-row,
  .industry-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.2rem 0;
  }

  .hero {
    min-height: 0;
    padding: 3.2rem 0 3.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
