/*
Theme Name: Theme B
Theme URI: https://archipelagointeractive.com/
Author: Archipelago Interactive
Author URI: https://archipelagointeractive.com/
Description: Marketing theme for Archipelago Interactive — featuring the ArchiTide AI-powered asset and inventory management platform. Includes Home, Product, About, and Contact page templates with a navy + cyan brand palette on a warm cream background.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: archipelago-interactive
Tags: business, technology, custom-menu, custom-logo, featured-images, full-width-template, sticky-post, threaded-comments
*/

/* =========================================================
   1. CSS Variables — brand tokens
   ========================================================= */
:root {
  --ai-navy: #0a2540;
  --ai-navy-700: #0d2f53;
  --ai-navy-600: #15406d;
  --ai-cyan: #00b8d4;
  --ai-cyan-600: #0095ad;
  --ai-cyan-100: #e6f7fa;
  --ai-cyan-50:  #f2fbfd;
  --ai-text: #0f172a;
  --ai-text-muted: #475569;
  --ai-text-subtle: #64748b;
  --ai-bg: #faf6ea;          /* warm ivory body */
  --ai-card: #fdfbf2;        /* slightly lighter than body — cards/forms */
  --ai-surface: #f1e9d4;     /* warmer beige for alt sections */
  --ai-surface-2: #e6dabd;   /* warm accent */
  --ai-border: #e6dcc4;      /* warm border, paired with cream */
  --ai-success: #10b981;
  --ai-warning: #f59e0b;
  --ai-danger:  #ef4444;
  --ai-radius: 10px;
  --ai-radius-lg: 16px;
  --ai-shadow-sm: 0 1px 2px rgba(10, 37, 64, .05), 0 1px 3px rgba(10, 37, 64, .08);
  --ai-shadow:    0 4px 12px rgba(10, 37, 64, .08), 0 1px 3px rgba(10, 37, 64, .06);
  --ai-shadow-lg: 0 24px 48px -12px rgba(10, 37, 64, .18);
  --ai-container: 1200px;
  --ai-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ai-font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =========================================================
   2. Reset / Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ai-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ai-text);
  background: var(--ai-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ai-cyan-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ai-navy); }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ai-font-display);
  font-weight: 700;
  color: var(--ai-navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

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

.ai-eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ai-cyan-600);
  margin-bottom: 1rem;
}

.ai-section { padding: 96px 0; }
.ai-section--tight { padding: 64px 0; }
.ai-section--surface { background: var(--ai-surface); }
.ai-section--navy {
  background: linear-gradient(135deg, var(--ai-navy) 0%, var(--ai-navy-700) 100%);
  color: #fff;
}
.ai-section--navy h1, .ai-section--navy h2, .ai-section--navy h3 { color: #fff; }
.ai-section--navy .ai-eyebrow { color: var(--ai-cyan); }

/* =========================================================
   3. Buttons
   ========================================================= */
.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--ai-radius);
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--ai-font);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.ai-btn:hover { transform: translateY(-1px); }
.ai-btn--primary {
  background: var(--ai-cyan);
  color: var(--ai-navy);
  box-shadow: 0 6px 16px rgba(0, 184, 212, .3);
}
.ai-btn--primary:hover {
  background: #1cc8e0;
  color: var(--ai-navy);
  box-shadow: 0 10px 22px rgba(0, 184, 212, .4);
}
.ai-btn--ghost {
  background: transparent;
  color: var(--ai-navy);
  border-color: var(--ai-navy);
}
.ai-btn--ghost:hover { background: var(--ai-navy); color: #fff; }
.ai-btn--ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
}
.ai-btn--ghost-light:hover { background: #fff; color: var(--ai-navy); }

/* =========================================================
   4. Header
   ========================================================= */
.ai-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 234, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--ai-border);
}
.ai-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  max-width: var(--ai-container);
  margin: 0 auto;
}
.ai-logo {
  display: flex;
  align-items: center;
}
.ai-logo img { height: 36px; width: auto; }
.ai-logo--text {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ai-navy);
}
.ai-logo--text em { color: var(--ai-cyan); font-style: normal; }

.ai-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.ai-nav a {
  display: inline-block;
  padding: 10px 16px;
  color: var(--ai-text);
  font-weight: 500;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.ai-nav a:hover, .ai-nav .current-menu-item > a, .ai-nav .current_page_item > a {
  color: var(--ai-navy);
  background: var(--ai-surface);
}
.ai-nav-cta { margin-left: 12px; }

.ai-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--ai-border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}
.ai-mobile-toggle svg { width: 22px; height: 22px; color: var(--ai-navy); }

/* =========================================================
   5. Hero (home + page heros)
   ========================================================= */
.ai-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0, 184, 212, .18), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(0, 184, 212, .12), transparent 60%),
    linear-gradient(180deg, var(--ai-navy) 0%, var(--ai-navy-700) 100%);
  color: #fff;
}
.ai-hero h1 { color: #fff; }
.ai-hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.ai-hero__lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
  max-width: 36em;
  margin-bottom: 1.6rem;
}
.ai-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.ai-hero__visual {
  position: relative;
  border-radius: var(--ai-radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .4s ease;
}
.ai-hero__visual:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.ai-hero__visual img { width: 100%; display: block; }

.ai-page-hero {
  padding: 80px 0 64px;
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(0, 184, 212, .15), transparent 60%),
    linear-gradient(180deg, var(--ai-navy) 0%, var(--ai-navy-700) 100%);
  color: #fff;
  text-align: center;
}
.ai-page-hero h1 { color: #fff; max-width: 18ch; margin-left: auto; margin-right: auto; }
.ai-page-hero__lede { color: rgba(255, 255, 255, .82); font-size: 1.15rem; max-width: 56ch; margin: 12px auto 0; }

/* =========================================================
   6. Marquee / trust strip
   ========================================================= */
.ai-trust {
  padding: 32px 0;
  border-bottom: 1px solid var(--ai-border);
  background: var(--ai-bg);
}
.ai-trust__label {
  text-align: center;
  color: var(--ai-text-subtle);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.ai-trust__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 36px;
  opacity: .75;
}
.ai-trust__row span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ai-text-muted);
  letter-spacing: -0.01em;
}

/* =========================================================
   7. Feature grid
   ========================================================= */
.ai-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.ai-feature {
  background: var(--ai-card);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-lg);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ai-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--ai-shadow-lg);
  border-color: rgba(0, 184, 212, .35);
}
.ai-feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ai-cyan-100);
  color: var(--ai-cyan-600);
  margin-bottom: 16px;
}
.ai-feature__icon svg { width: 26px; height: 26px; }
.ai-feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.ai-feature p { color: var(--ai-text-muted); margin: 0; }

/* =========================================================
   8. Stats
   ========================================================= */
.ai-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.ai-stat {
  text-align: center;
  padding: 32px 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--ai-radius-lg);
}
.ai-stat__value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--ai-cyan);
  line-height: 1;
  margin-bottom: 8px;
}
.ai-stat__label { color: rgba(255, 255, 255, .72); font-size: .95rem; }

/* =========================================================
   9. Product showcase (screenshots)
   ========================================================= */
.ai-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin: 48px 0;
}
.ai-showcase--reverse .ai-showcase__copy { order: 2; }
.ai-showcase__shot {
  border-radius: var(--ai-radius-lg);
  overflow: hidden;
  box-shadow: var(--ai-shadow-lg);
  border: 1px solid var(--ai-border);
  background: var(--ai-navy);
}
.ai-showcase__shot img { width: 100%; display: block; }
.ai-showcase__copy h3 { font-size: 1.6rem; }
.ai-showcase__copy ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.ai-showcase__copy ul li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ai-text-muted);
}
.ai-showcase__copy ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ai-cyan-100) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2300b8d4'><path fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-7 7a1 1 0 01-1.4 0l-3-3a1 1 0 011.4-1.4L9 11.6l6.3-6.3a1 1 0 011.4 0z' clip-rule='evenodd'/></svg>") center/12px no-repeat;
}

/* =========================================================
   10. Module gallery (multi-screenshot grid)
   ========================================================= */
.ai-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.ai-gallery__item {
  background: var(--ai-card);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-lg);
  overflow: hidden;
  box-shadow: var(--ai-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ai-gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--ai-shadow-lg);
}
.ai-gallery__item figure { margin: 0; }
.ai-gallery__item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top left; }
.ai-gallery__item figcaption { padding: 16px 20px; }
.ai-gallery__item figcaption strong { color: var(--ai-navy); display: block; font-size: 1.05rem; margin-bottom: 4px; }
.ai-gallery__item figcaption span { color: var(--ai-text-muted); font-size: .9rem; }

/* =========================================================
   11. Modules table
   ========================================================= */
.ai-modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.ai-module {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--ai-card);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ai-module:hover {
  border-color: rgba(0, 184, 212, .4);
  box-shadow: var(--ai-shadow);
}
.ai-module__bullet {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ai-navy);
  color: var(--ai-cyan);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}
.ai-module strong { color: var(--ai-navy); display: block; margin-bottom: 4px; }
.ai-module p { margin: 0; color: var(--ai-text-muted); font-size: .92rem; }

/* =========================================================
   12. Contact / forms
   ========================================================= */
.ai-contact {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}
.ai-contact-info p { color: var(--ai-text-muted); }
.ai-contact-info ul { list-style: none; margin: 24px 0 0; padding: 0; }
.ai-contact-info li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ai-text);
}
.ai-contact-info li svg { width: 22px; height: 22px; color: var(--ai-cyan-600); flex-shrink: 0; }
.ai-form {
  background: var(--ai-card);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-lg);
  padding: 36px;
  box-shadow: var(--ai-shadow);
}
.ai-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.ai-form__field { margin-bottom: 16px; }
.ai-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: .92rem;
  color: var(--ai-navy);
}
.ai-form input[type="text"],
.ai-form input[type="email"],
.ai-form input[type="tel"],
.ai-form select,
.ai-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ai-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ai-text);
  background: var(--ai-bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ai-form input:focus,
.ai-form select:focus,
.ai-form textarea:focus {
  outline: none;
  border-color: var(--ai-cyan);
  box-shadow: 0 0 0 3px rgba(0, 184, 212, .18);
}
.ai-form textarea { min-height: 140px; resize: vertical; }
.ai-form__notice {
  margin-top: 16px;
  font-size: .85rem;
  color: var(--ai-text-subtle);
}
.ai-form__success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.ai-form__error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* =========================================================
   13. About: timeline / values
   ========================================================= */
.ai-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.ai-value {
  padding: 28px;
  border-radius: var(--ai-radius-lg);
  background: linear-gradient(180deg, var(--ai-card), var(--ai-cyan-50));
  border: 1px solid var(--ai-border);
}
.ai-value h3 { font-size: 1.15rem; }
.ai-value p { color: var(--ai-text-muted); margin: 0; }

.ai-cta-band {
  margin: 96px 0 0;
  padding: 64px 24px;
  border-radius: var(--ai-radius-lg);
  background: linear-gradient(135deg, var(--ai-navy), var(--ai-cyan-600));
  color: #fff;
  text-align: center;
}
.ai-cta-band h2 { color: #fff; margin-bottom: 12px; }
.ai-cta-band p { color: rgba(255, 255, 255, .82); max-width: 56ch; margin: 0 auto 24px; }

/* =========================================================
   14. Footer
   ========================================================= */
.ai-site-footer {
  background: var(--ai-navy);
  color: rgba(255, 255, 255, .8);
  padding: 64px 0 24px;
}
.ai-site-footer h4 {
  color: #fff;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.ai-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.ai-footer-grid .ai-logo--text { color: #fff; }
.ai-footer-grid .ai-logo--text em { color: var(--ai-cyan); }
.ai-footer-grid p { color: rgba(255, 255, 255, .65); }
.ai-footer-grid ul { list-style: none; padding: 0; margin: 0; }
.ai-footer-grid li { margin-bottom: 8px; }
.ai-footer-grid a { color: rgba(255, 255, 255, .75); }
.ai-footer-grid a:hover { color: var(--ai-cyan); }

.ai-footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .9rem;
  color: rgba(255, 255, 255, .6);
}

/* =========================================================
   14b. Documentation / API / Status / Security helpers
   ========================================================= */
.ai-doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}
.ai-toc {
  position: sticky;
  top: 96px;
  font-size: .92rem;
}
.ai-toc h4 {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ai-text-subtle);
  margin-bottom: 12px;
}
.ai-toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--ai-border); }
.ai-toc li { margin: 0; }
.ai-toc a {
  display: block;
  padding: 6px 14px;
  color: var(--ai-text-muted);
  margin-left: -2px;
  border-left: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.ai-toc a:hover, .ai-toc a.is-active {
  color: var(--ai-navy);
  border-left-color: var(--ai-cyan);
  font-weight: 600;
}

.ai-doc-body h2 { margin-top: 48px; padding-top: 8px; }
.ai-doc-body h2:first-child { margin-top: 0; }
.ai-doc-body h3 { margin-top: 28px; }
.ai-doc-body p, .ai-doc-body ul, .ai-doc-body ol { color: var(--ai-text-muted); }
.ai-doc-body ul, .ai-doc-body ol { padding-left: 22px; }
.ai-doc-body li { margin-bottom: 6px; }
.ai-doc-body code:not(pre code) {
  background: var(--ai-surface-2);
  color: var(--ai-navy);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .9em;
}

.ai-code {
  background: var(--ai-navy);
  color: #e6f1ff;
  border-radius: var(--ai-radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88rem;
  line-height: 1.55;
  margin: 16px 0 24px;
  border: 1px solid rgba(255, 255, 255, .08);
}
.ai-code .c-key { color: #7dd3fc; }
.ai-code .c-str { color: #a7f3d0; }
.ai-code .c-num { color: #fcd34d; }
.ai-code .c-cmt { color: #94a3b8; font-style: italic; }
.ai-code .c-fn  { color: var(--ai-cyan); }

.ai-method-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  margin-bottom: 10px;
  background: var(--ai-card);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .92rem;
}
.ai-method {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  text-align: center;
}
.ai-method--get    { background: #e0f2fe; color: #075985; }
.ai-method--post   { background: #dcfce7; color: #14532d; }
.ai-method--patch  { background: #fef3c7; color: #92400e; }
.ai-method--delete { background: #fee2e2; color: #991b1b; }
.ai-method-row span.path { color: var(--ai-navy); font-weight: 600; }
.ai-method-row small { color: var(--ai-text-muted); font-family: var(--ai-font); margin-left: auto; }

.ai-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
}
.ai-status-pill--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.ai-status-pill--warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.ai-status-pill--down {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.ai-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.ai-status-dot--ok   { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }
.ai-status-dot--warn { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.ai-status-dot--down { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .18); }

.ai-status-table {
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-lg);
  overflow: hidden;
  background: var(--ai-card);
  margin-top: 32px;
}
.ai-status-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 220px;
  gap: 16px;
  padding: 18px 24px;
  align-items: center;
  border-bottom: 1px solid var(--ai-border);
}
.ai-status-row:last-child { border-bottom: 0; }
.ai-status-row strong { color: var(--ai-navy); }
.ai-status-row p { margin: 0; color: var(--ai-text-muted); font-size: .92rem; }
.ai-status-row .ai-uptime {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: var(--ai-text-muted);
  font-size: .88rem;
}
.ai-bars {
  display: flex;
  gap: 2px;
  height: 28px;
  align-items: stretch;
}
.ai-bars span {
  flex: 1;
  border-radius: 3px;
  background: #10b981;
}
.ai-bars span.warn { background: #f59e0b; }
.ai-bars span.down { background: #ef4444; }

.ai-incident {
  padding: 18px 20px;
  border-left: 4px solid var(--ai-cyan);
  background: var(--ai-card);
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: var(--ai-shadow-sm);
}
.ai-incident time {
  font-size: .82rem;
  color: var(--ai-text-subtle);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ai-incident strong { display: block; margin: 4px 0; color: var(--ai-navy); }
.ai-incident p { margin: 0; color: var(--ai-text-muted); font-size: .94rem; }

.ai-callout {
  padding: 18px 20px;
  background: var(--ai-cyan-50);
  border: 1px solid rgba(0, 184, 212, .25);
  border-radius: var(--ai-radius);
  color: var(--ai-text);
  margin: 16px 0;
}
.ai-callout strong { color: var(--ai-navy); }

@media (max-width: 1024px) {
  .ai-doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .ai-toc { position: static; }
  .ai-status-row { grid-template-columns: 1fr; }
  .ai-method-row { grid-template-columns: 90px 1fr; }
}

/* =========================================================
   14c. Lightbox / image zoom
   ========================================================= */
.ai-showcase__shot img,
.ai-gallery__item img,
.ai-hero__visual img {
  cursor: zoom-in;
}

.ai-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(10, 37, 64, .92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s ease;
}
.ai-lightbox.is-open {
  display: flex;
  opacity: 1;
}
.ai-lightbox__inner {
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ai-lightbox__img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  background: var(--ai-navy-700);
  cursor: zoom-out;
}
.ai-lightbox__caption {
  margin-top: 14px;
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  text-align: center;
  max-width: 60ch;
}
.ai-lightbox__caption strong { color: #fff; display: block; }
.ai-lightbox__close,
.ai-lightbox__nav {
  position: absolute;
  top: -56px;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.ai-lightbox__close:hover,
.ai-lightbox__nav:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .35);
}
.ai-lightbox__close:active,
.ai-lightbox__nav:active { transform: scale(.96); }
.ai-lightbox__close svg,
.ai-lightbox__nav svg { width: 22px; height: 22px; }
.ai-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}
.ai-lightbox__nav:active { transform: translateY(-50%) scale(.96); }
.ai-lightbox__nav--prev { left: -68px; right: auto; }
.ai-lightbox__nav--next { right: -68px; }
.ai-lightbox__counter {
  position: absolute;
  top: -56px;
  left: 0;
  color: rgba(255, 255, 255, .65);
  font-size: .9rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  padding-top: 12px;
}

@media (max-width: 768px) {
  .ai-lightbox { padding: 12px; }
  .ai-lightbox__close { top: 8px; right: 8px; }
  .ai-lightbox__counter { top: 16px; left: 16px; }
  .ai-lightbox__nav--prev { left: 8px; }
  .ai-lightbox__nav--next { right: 8px; }
  .ai-lightbox__img { max-height: 78vh; }
}

body.ai-lightbox-open { overflow: hidden; }

/* =========================================================
   15. Misc
   ========================================================= */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

.ai-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

/* =========================================================
   16. Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .ai-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .ai-hero__visual { transform: none; }
  .ai-features { grid-template-columns: repeat(2, 1fr); }
  .ai-stats { grid-template-columns: repeat(2, 1fr); }
  .ai-modules { grid-template-columns: 1fr; }
  .ai-values { grid-template-columns: 1fr; }
  .ai-footer-grid { grid-template-columns: 1fr 1fr; }
  .ai-grid-2 { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  .ai-section { padding: 64px 0; }
  .ai-hero { padding: 64px 0 48px; }
  .ai-features { grid-template-columns: 1fr; }
  .ai-showcase { grid-template-columns: 1fr; gap: 24px; }
  .ai-showcase--reverse .ai-showcase__copy { order: 0; }
  .ai-contact { grid-template-columns: 1fr; gap: 32px; }
  .ai-form__row { grid-template-columns: 1fr; }
  .ai-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .ai-footer-bottom { flex-direction: column; }
  .ai-nav ul { display: none; }
  .ai-nav-cta { display: none; }
  .ai-mobile-toggle { display: inline-flex; }
  .ai-nav.is-open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ai-bg);
    padding: 12px 16px;
    border-bottom: 1px solid var(--ai-border);
    box-shadow: var(--ai-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
