/*
  AIIntegrationExplained.com
  Publisher: WRS Web Solutions Inc.
  Main site stylesheet
*/

:root {
  --wrap: 1680px;
  --content: 1120px;

  --bg: #f6f8fb;
  --bg-soft: #eef4f7;
  --card: #ffffff;
  --card-soft: #f8fbfc;

  --text: #17212b;
  --muted: #5d6b78;
  --light: #748291;

  --line: #dce5ea;
  --line-strong: #c5d3dc;

  --brand: #123241;
  --brand-2: #1b5e69;
  --accent: #168ca3;
  --accent-soft: #e4f6f9;
  --green: #2f7d5c;
  --green-soft: #e9f6ef;
  --warning: #8a5b12;
  --warning-soft: #fff6df;
  --danger: #9d2f2f;
  --danger-soft: #fff0f0;

  --shadow: 0 18px 45px rgba(18, 50, 65, 0.08);
  --shadow-soft: 0 10px 28px rgba(18, 50, 65, 0.06);

  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 32px;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(22, 140, 163, 0.13), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 38%, #ffffff 100%);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-2);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.content-wrap {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 1000;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
}

.skip-link:focus {
  left: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: var(--shadow-soft);
  flex: 0 0 auto;
}

.site-mark span {
  font-size: 0.9rem;
  font-weight: 900;
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-title {
  font-size: 1.05rem;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 999px;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--brand-2);
}

/* Hero and sections */

.hero {
  padding: 72px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr);
  gap: 32px;
  align-items: stretch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--brand-2);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  color: var(--brand);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 5rem);
  max-width: 13ch;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 3vw, 3rem);
}

h3 {
  margin: 0 0 10px;
  font-size: clamp(1.22rem, 2vw, 1.65rem);
}

h4 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.lede {
  margin: 22px 0 0;
  max-width: 78ch;
  color: #30404d;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--green));
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 17px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid transparent;
}

.button.primary {
  background: var(--brand);
  color: #fff;
}

.button.secondary {
  background: #fff;
  color: var(--brand);
  border-color: var(--line-strong);
}

.button:hover {
  transform: translateY(-1px);
}

.section {
  padding: 54px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(238, 244, 247, 0.72), rgba(255, 255, 255, 0));
}

.section-heading {
  max-width: 880px;
  margin-bottom: 26px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

/* Cards and grids */

.grid {
  display: grid;
  gap: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.card.soft {
  background: var(--card-soft);
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  border-color: var(--accent);
}

.topic-card {
  min-height: 100%;
}

.topic-card .label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 850;
}

.meta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.93rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

/* Article layout */

.breadcrumbs {
  margin: 26px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.article-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 46px);
}

.article-main h1 {
  max-width: 16ch;
}

.article-main p,
.article-main li {
  color: #2d3c48;
}

.article-main section {
  margin-top: 34px;
}

.article-main section:first-of-type {
  margin-top: 26px;
}

.article-main a {
  font-weight: 700;
}

.article-sidebar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 18px;
}

.toc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.toc strong {
  display: block;
  color: var(--brand);
  margin-bottom: 10px;
}

.toc ol,
.toc ul {
  margin: 0;
  padding-left: 18px;
}

.toc li + li {
  margin-top: 8px;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

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

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 34px;
}

.author-initials {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 900;
}

.updated {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 12px;
}

/* Useful content blocks */

.key-takeaways {
  background: var(--accent-soft);
  border: 1px solid #bfe9ef;
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 28px;
}

.key-takeaways h2,
.key-takeaways h3 {
  margin-top: 0;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.checklist li {
  position: relative;
  padding-left: 34px;
  margin: 12px 0;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
  line-height: 1;
}

.callout {
  margin: 24px 0;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card-soft);
}

.callout strong {
  color: var(--brand);
}

.callout.integration {
  background: var(--accent-soft);
  border-color: #bfe9ef;
}

.callout.security {
  background: var(--warning-soft);
  border-color: #f2d99d;
}

.callout.data {
  background: var(--green-soft);
  border-color: #badfc9;
}

.callout.caution {
  background: var(--danger-soft);
  border-color: #f0b7b7;
}

.code-note {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #102533;
  color: #e8f7fb;
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  font-size: 0.94rem;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-soft);
  color: var(--brand);
  font-size: 0.92rem;
}

tr:last-child td {
  border-bottom: 0;
}

/* Diagrams */

.flow {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.flow-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.flow-step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.flow-step span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--brand-2);
  font-size: 0.84rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.diagram-card {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--card-soft));
  padding: 22px;
}

/* Indexes and lists */

.article-list {
  display: grid;
  gap: 14px;
}

.article-list a {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  text-decoration: none;
  color: var(--text);
}

.article-list a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.article-list span {
  color: var(--muted);
  font-size: 0.94rem;
}

.link-list {
  columns: 2;
  column-gap: 32px;
  padding-left: 18px;
}

.link-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

/* Footer */

.site-footer {
  margin-top: 60px;
  background: var(--brand);
  color: #d9e8ee;
}

.footer-inner {
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 28px;
}

.site-footer a {
  color: #ffffff;
}

.footer-links {
  display: flex;
  gap: 12px 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-small {
  color: #b9cbd3;
  font-size: 0.92rem;
}

/* Ad containers: real AdSense units only, no fake placeholder styling */

.ad-wrap {
  margin: 28px 0;
}

/* Forms */

input,
select,
textarea {
  font: inherit;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: #fff;
  color: var(--text);
}

label {
  font-weight: 800;
  color: var(--brand);
}

/* Responsive */

@media (max-width: 1100px) {
  .hero-grid,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .wrap,
  .content-wrap {
    width: min(100% - 28px, var(--wrap));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .article-sidebar,
  .flow-row,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .link-list {
    columns: 1;
  }

  .article-main {
    border-radius: var(--radius);
  }
}

@media print {
  .site-header,
  .article-sidebar,
  .site-footer,
  .hero-actions,
  .ad-wrap {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .article-main,
  .card {
    box-shadow: none;
    border-color: #ccc;
  }

  a {
    color: #000;
  }
}

.grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1300px) {
  .grid.five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .grid.five {
    grid-template-columns: 1fr;
  }
}

