/* ============================================================
   SEO PAGE — SEO-specific parts. Builds on ai-agent-modern.css,
   qa-modern.css and digital-marketing-modern.css.
   ============================================================ */

/* ── Hero: sample search result + Core Web Vitals ────── */
.seo-visual {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(100%, 520px);
  justify-self: center;
  padding: 20px 0 56px;
}

/* Section-matched AI imagery */
.seo-page .dm-about-media img,
.seo-page .seo-ai-media img {
  display: block;
  width: 100%;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  object-position: center;
}

.seo-page .seo-ai-media {
  align-self: center;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 32px 70px -32px rgba(0, 0, 0, .72);
}

@media (max-width: 900px) {
  .seo-page .dm-about-media,
  .seo-page .seo-ai-media {
    width: min(100%, 680px);
    justify-self: center;
  }
}

/* AI-assisted SEO experience */
.seo-ai-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.seo-ai-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 54%, rgba(37, 99, 235, .19), transparent 30%),
    radial-gradient(circle at 88% 80%, rgba(124, 58, 237, .18), transparent 34%);
}
.seo-ai-layout {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(48px, 6vw, 88px);
  align-items: center;
}
.seo-ai-section .seo-ai-media {
  overflow: visible;
  padding: 10px;
  border: 1px solid rgba(165, 180, 252, .22);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: 0 36px 90px -38px rgba(0,0,0,.9);
}
.seo-ai-section .seo-ai-media img {
  border-radius: 21px;
}
.seo-ai-section .ag-why-badge {
  top: 28px;
  right: -15px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.7);
}
.seo-ai-pipeline {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: -25px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(8, 13, 34, .9);
  box-shadow: 0 18px 42px -24px #000;
  backdrop-filter: blur(16px);
}
.seo-ai-pipeline span {
  padding: 12px 8px;
  color: #dce4f6;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.seo-ai-pipeline span + span { border-left: 1px solid rgba(255,255,255,.12); }
.seo-ai-pipeline b { margin-right: 5px; color: #9faaff; }
.seo-ai-content h2 {
  max-width: 660px;
  font-size: clamp(40px, 4.7vw, 68px);
  line-height: .98;
}
.seo-ai-content > .ag-p {
  max-width: 640px;
  margin-top: 24px !important;
}
.seo-ai-content .dm-ai-label {
  margin-top: 28px !important;
}
.seo-ai-content .dm-ai-list {
  gap: 10px;
}
.seo-ai-content .dm-ai-list li {
  position: relative;
  min-height: 56px;
  align-items: center;
  padding: 13px 15px;
  border-color: rgba(165,180,252,.16);
  background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.seo-ai-content .dm-ai-list li:hover {
  transform: translateY(-2px);
  border-color: rgba(165,180,252,.38);
  background: rgba(255,255,255,.085);
}
.seo-ai-content .dm-ai-list svg {
  box-sizing: content-box;
  padding: 5px;
  border-radius: 8px;
  background: rgba(129, 140, 248, .16);
}
.seo-ai-content .dm-ai-note {
  padding: 16px 18px;
  border-color: rgba(251,191,36,.24);
  background: linear-gradient(90deg, rgba(251,191,36,.1), rgba(251,191,36,.045));
}
@media (max-width: 1100px) {
  .seo-ai-layout { gap: 44px; }
  .seo-ai-content h2 { font-size: clamp(38px, 5vw, 58px); }
}
@media (max-width: 900px) {
  .seo-ai-layout { grid-template-columns: 1fr; gap: 70px; }
  .seo-ai-section .seo-ai-media { width: min(100%, 680px); }
}
@media (max-width: 640px) {
  .seo-ai-section .ag-why-badge { top: 20px; right: 18px; }
  .seo-ai-pipeline { left: 18px; right: 18px; }
  .seo-ai-pipeline span { padding-inline: 4px; font-size: 8.5px; letter-spacing: .035em; }
  .seo-ai-content h2 { font-size: clamp(36px, 12vw, 48px); }
}
.seo-serp {
  padding: 18px;
  border: 1px solid var(--ag-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 40px 80px -30px rgba(79, 70, 229, 0.45);
}
.seo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--ag-line);
  border-radius: 999px;
  background: var(--ag-soft);
  color: var(--ag-ink);
  font-size: 14px;
  font-weight: 600;
}
.seo-bar svg {
  flex: none;
  color: var(--ag-indigo);
}
.seo-typed {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--ag-indigo);
}
.ec-motion .seo-typed {
  width: 0;
  animation:
    seoType 1.6s steps(20, end) 0.6s forwards,
    seoCaret 0.8s step-end infinite;
}
.seo-serp-label {
  display: block;
  margin: 12px 4px 8px;
  color: var(--ag-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.seo-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
}
.seo-result + .seo-result {
  margin-top: 4px;
}
.seo-result--you {
  position: relative;
  border: 1px solid #c7cdfb;
  background: linear-gradient(135deg, #f5f6ff, #f3efff);
  box-shadow: 0 12px 26px -16px rgba(79, 70, 229, 0.5);
}
.ec-motion .seo-result--you {
  animation: seoRise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 2.2s both;
}
.seo-result--you small {
  color: #047857;
  font-size: 12px;
}
.seo-result--you strong {
  display: block;
  margin-top: 2px;
  color: #3730a3;
  font-size: 15px;
  line-height: 1.3;
}
.seo-result--you p {
  margin-top: 4px;
  color: var(--ag-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.seo-up {
  flex: none;
  margin-left: auto;
  color: #10b981;
}
.seo-favicon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ag-grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.seo-favicon--grey {
  background: #e5e8f3;
}
.seo-result:not(.seo-result--you) > div {
  display: grid;
  flex: 1;
  gap: 7px;
  padding-top: 4px;
}
.seo-result:not(.seo-result--you) i {
  display: block;
  height: 8px;
  border-radius: 6px;
  background: #eceef6;
}
.seo-result:not(.seo-result--you) i:first-child {
  width: 70%;
}
.seo-result:not(.seo-result--you) i:last-child {
  width: 92%;
}

.seo-vitals {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #111735, #0b1026);
  color: #fff;
  box-shadow: 0 24px 50px -24px rgba(11, 16, 38, 0.6);
}
.seo-vitals > small {
  margin-right: auto;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.seo-vital {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
}
.seo-vital svg {
  width: 46px;
  height: 46px;
  rotate: -90deg;
}
.seo-vital circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 5;
}
.seo-vital .seo-vital-val {
  stroke: #34d399;
  stroke-linecap: round;
  stroke-dasharray: 113;
  stroke-dashoffset: 113;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.8s + var(--d, 0ms));
}
.seo-visual.is-in .seo-vital-val,
.ag-main:not(.ec-motion) .seo-vital-val {
  stroke-dashoffset: calc(113 - 113 * var(--v) / 100);
}
.seo-vital b {
  position: absolute;
  top: 14px;
  font-size: 11px;
}
.seo-vital span {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
}
.seo-float--index {
  left: -30px;
  bottom: 6px;
  align-items: flex-start;
  animation-delay: -1.5s;
}
.seo-float--index > svg {
  padding: 6px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #dcfce7;
  color: #059669;
}
.seo-float--index strong {
  display: block;
  font-size: 13.5px;
}
.seo-float--index small {
  color: var(--ag-muted);
  font-size: 11.5px;
  font-weight: 500;
}

/* Overview copy with a second paragraph */
.seo-overview-sub {
  margin-top: 14px !important;
  color: var(--ag-muted);
  font-size: 15.5px;
}

/* ── Modern web technologies ─────────────────────────── */
.seo-tech-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.seo-tech h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ag-line);
  font-size: 16.5px;
}
.seo-tech ul {
  display: grid;
  gap: 9px;
  margin-top: 14px !important;
}
.seo-tech li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}
.seo-tech li svg {
  flex: none;
  margin-top: 3px;
  color: #10b981;
}

/* ── Motion ──────────────────────────────────────────── */
@keyframes seoType {
  to {
    width: 20ch;
  }
}
@keyframes seoCaret {
  50% {
    border-color: transparent;
  }
}
@keyframes seoRise {
  from {
    opacity: 0;
    transform: translateY(70px) scale(0.97);
  }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .seo-tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .seo-float--index {
    left: 0;
  }
}

@media (max-width: 640px) {
  .seo-visual {
    padding-bottom: 92px;
  }
  .seo-float--index {
    bottom: 8px;
  }
  .seo-tech-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .seo-vitals {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .seo-vitals > small {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ec-motion .seo-typed {
    width: auto;
    animation: none !important;
    border-right: 0;
  }
  .seo-result--you {
    animation: none !important;
  }
  .seo-vital-val {
    stroke-dashoffset: calc(113 - 113 * var(--v) / 100) !important;
  }
}
