/* CDIT v2 — Second Nature layout + AI automation multi-page site */

:root {
  --navy: #090949;
  --navy-soft: #1a1a5c;
  --orange: #e85d04;
  --orange-deep: #c2410c;
  --amber: #fbbf24;
  --peach: #fff4e8;
  --mist: #fff8f1;
  --ink: #090949;
  --muted: #4b4b6b;
  --line: rgba(9, 9, 73, 0.12);
  --white: #ffffff;
  --hero: linear-gradient(165deg, #9a3412 0%, #ea580c 38%, #f59e0b 72%, #fde68a 100%);
  --radius-lg: 28px;
  --radius-pill: 100px;
  --max: 1120px;
  --font: "Poppins", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(100% - 2.5rem, 46rem);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 9px 22px;
  font-size: 0.88rem;
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

/* Nav */
.topnav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding: 1rem 0;
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
}

.topnav.is-scrolled,
.topnav.on-dark {
  background: var(--navy);
  box-shadow: 0 8px 24px rgba(9, 9, 73, 0.18);
}

.topnav.is-scrolled {
  padding: 0.65rem 0;
}

.topnav-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  line-height: 0;
}

.logo img {
  display: block;
  height: 2.35rem;
  width: auto;
}

.logo-on-light img {
  height: 2.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.35rem;
}

.nav-links > a,
.nav-drop > summary {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  font-size: 0.95rem;
  list-style: none;
  cursor: pointer;
}

.nav-links > a:hover,
.nav-drop > summary:hover,
.nav-links > a.is-active {
  color: var(--white);
}

.nav-drop {
  position: relative;
}

.nav-drop > summary {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-drop > summary::-webkit-details-marker {
  display: none;
}

.nav-drop > summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.85;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 16rem;
  background: var(--white);
  border-radius: 1rem;
  padding: 0.65rem;
  box-shadow: 0 18px 40px rgba(9, 9, 73, 0.18);
  display: grid;
  gap: 0.15rem;
}

.nav-menu a {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 0.65rem;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-menu a:hover {
  background: var(--mist);
  color: var(--orange-deep);
}

.nav-menu .muted {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.btn-nav-cta {
  background: var(--navy);
  color: var(--white);
}

.topnav.is-scrolled .btn-nav-cta,
.topnav.on-dark .btn-nav-cta {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.85);
}

.topnav.is-scrolled .btn-nav-cta:hover,
.topnav.on-dark .btn-nav-cta:hover {
  background: var(--white);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Home hero */
.hero {
  position: relative;
  background: var(--hero);
  color: var(--white);
  padding: 9.5rem 0 0;
  overflow: hidden;
  text-align: center;
}

.hero-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 12% 18%, rgba(255, 255, 255, 0.18), transparent 60%),
    radial-gradient(ellipse 45% 35% at 88% 30%, rgba(251, 191, 36, 0.45), transparent 55%),
    radial-gradient(ellipse 40% 30% at 70% 85%, rgba(194, 65, 12, 0.35), transparent 50%);
  animation: blobPulse 12s ease-in-out infinite alternate;
}

@keyframes blobPulse {
  from {
    opacity: 0.85;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, 50rem);
  margin: 0 auto 2.5rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.pill {
  appearance: none;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  color: var(--white);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--white);
}

.pill.is-active {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--white);
  color: var(--navy);
}

a.pill {
  display: inline-flex;
  align-items: center;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  line-height: 1.22;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  max-width: 42rem;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
}

.hero-stage {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  padding-bottom: 2rem;
}

.stage-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 4px solid var(--navy);
  box-shadow: 0 28px 70px rgba(9, 9, 73, 0.32);
  min-height: min(28rem, 58vw);
}

.hero-wave {
  display: block;
  width: 100%;
  height: clamp(4rem, 10vw, 7rem);
  margin-top: -1px;
  position: relative;
  z-index: 2;
}

/* Abstract AI visual (placeholder for future motion graphics) */
.ai-visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 40%, rgba(232, 93, 4, 0.12), transparent 45%),
    radial-gradient(circle at 70% 55%, rgba(9, 9, 73, 0.08), transparent 40%),
    linear-gradient(145deg, #fff8f1, #ffffff 50%, #ffe8cc);
  overflow: hidden;
}

.ai-visual.dark {
  background:
    radial-gradient(circle at 35% 40%, rgba(232, 93, 4, 0.35), transparent 42%),
    radial-gradient(circle at 70% 60%, rgba(251, 191, 36, 0.2), transparent 45%),
    linear-gradient(160deg, #0b0b3a, #1a1048 55%, #2a1654);
}

.ai-orbit {
  position: absolute;
  border: 1.5px solid rgba(9, 9, 73, 0.12);
  border-radius: 50%;
  animation: spin 28s linear infinite;
}

.ai-visual.dark .ai-orbit {
  border-color: rgba(255, 255, 255, 0.15);
}

.ai-orbit:nth-child(1) {
  width: 42%;
  aspect-ratio: 1;
  animation-duration: 22s;
}

.ai-orbit:nth-child(2) {
  width: 62%;
  aspect-ratio: 1;
  animation-duration: 34s;
  animation-direction: reverse;
}

.ai-orbit:nth-child(3) {
  width: 82%;
  aspect-ratio: 1;
  animation-duration: 48s;
}

.ai-core {
  position: relative;
  z-index: 2;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fbbf24, #e85d04 55%, #9a3412);
  box-shadow: 0 0 40px rgba(232, 93, 4, 0.45);
  animation: pulseCore 3.2s ease-in-out infinite;
}

.ai-node {
  position: absolute;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(232, 93, 4, 0.6);
  animation: nodePulse 2.4s ease-in-out infinite;
}

.ai-visual.dark .ai-node {
  background: #fbbf24;
}

.ai-node:nth-child(5) {
  top: 18%;
  left: 48%;
}
.ai-node:nth-child(6) {
  top: 42%;
  left: 18%;
  animation-delay: 0.4s;
}
.ai-node:nth-child(7) {
  top: 58%;
  right: 16%;
  animation-delay: 0.8s;
}
.ai-node:nth-child(8) {
  bottom: 16%;
  left: 40%;
  animation-delay: 1.2s;
}

.ai-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.55;
  white-space: nowrap;
}

.ai-visual.dark .ai-caption {
  color: rgba(255, 255, 255, 0.65);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseCore {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 40px rgba(232, 93, 4, 0.45);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 60px rgba(232, 93, 4, 0.65);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.35);
  }
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
}

.eyebrow.center {
  text-align: center;
}

.outcomes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.outcome {
  background: var(--mist);
  border-radius: 1.25rem;
  padding: 1.5rem;
}

.outcome h3 {
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
}

.outcome p {
  margin: 0;
  font-size: 0.95rem;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.solution-tile {
  display: grid;
  gap: 0.65rem;
  padding: 1.75rem;
  border-radius: 1.35rem;
  background: var(--mist);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  text-align: left;
}

.solution-tile:hover {
  border-color: rgba(232, 93, 4, 0.35);
  background: #fff0e0;
  transform: translateY(-2px);
}

.solution-tile h3 {
  font-size: 1.3rem;
  margin: 0;
}

.solution-tile p {
  margin: 0;
  font-size: 0.95rem;
}

.solution-tile .more {
  font-weight: 700;
  color: var(--orange-deep);
  font-size: 0.9rem;
}

.section-how {
  position: relative;
  overflow: hidden;
}

.blob {
  position: absolute;
  width: min(28rem, 50vw);
  height: min(28rem, 50vw);
  border-radius: 60% 40% 55% 45%;
  z-index: 0;
  animation: floatBlob 14s ease-in-out infinite alternate;
}

.blob-l {
  left: -10%;
  top: 10%;
  background: radial-gradient(circle, rgba(232, 93, 4, 0.55), rgba(232, 93, 4, 0.05) 70%);
}

.blob-r {
  right: -12%;
  bottom: 5%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.65), rgba(251, 191, 36, 0.05) 70%);
  animation-delay: -4s;
}

@keyframes floatBlob {
  from {
    transform: translate(0, 0) rotate(0deg);
  }
  to {
    transform: translate(2%, -3%) rotate(8deg);
  }
}

.how-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--peach);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.flow-card {
  background: var(--white);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(9, 9, 73, 0.08);
}

.flow-card ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.flow-card li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  font-weight: 500;
  color: var(--navy);
}

.flow-card li strong {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(232, 93, 4, 0.12);
  color: var(--orange-deep);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
}

.flow-card li.on {
  background: rgba(232, 93, 4, 0.1);
}

.check-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  text-align: left;
}

.check-list li {
  padding-left: 1.5rem;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--orange);
}

.how-copy {
  text-align: left;
}

.section-cta-band {
  text-align: center;
  background: var(--mist);
}

/* Inner page heroes */
.page-hero {
  background: var(--hero);
  color: var(--white);
  padding: 8.5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero .hero-blobs {
  opacity: 0.9;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.2vw, 3rem);
  position: relative;
  z-index: 1;
}

.page-hero .lead {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
}

.page-hero .crumbs {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.page-hero .crumbs a:hover {
  text-decoration: underline;
}

.content-block {
  max-width: 46rem;
}

.feature-list {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0;
}

.feature-list article {
  padding: 1.35rem 1.5rem;
  background: var(--mist);
  border-radius: 1.15rem;
}

.feature-list h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--orange-deep);
}

.feature-list p {
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.split .ai-visual {
  min-height: 22rem;
  border-radius: var(--radius-lg);
  border: 3px solid var(--navy);
}

.related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.related a {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  font-weight: 700;
  color: var(--navy);
}

.related a:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
}

.related a span {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Contact form */
.contact-form {
  margin-top: 2rem;
  text-align: left;
  background: var(--mist);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: grid;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--white);
  color: var(--navy);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.form-status {
  min-height: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.form-status.ok {
  color: #166534;
}

.form-status.err {
  color: #b91c1c;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
  background: #faf8f5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-grid h4 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.footer-grid a {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
}

.footer-grid a:hover {
  color: var(--orange-deep);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.35rem;
  }

  .topnav.is-open .nav-links {
    display: flex;
  }

  .nav-drop .nav-menu {
    position: static;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0.25rem 0 0.5rem 0.5rem;
  }

  .nav-menu a {
    color: rgba(255, 255, 255, 0.9);
  }

  .nav-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
  }

  .nav-menu .muted {
    color: rgba(255, 255, 255, 0.55);
  }

  .outcomes,
  .solution-grid,
  .related,
  .footer-grid,
  .form-grid,
  .split,
  .how-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 7.5rem;
  }

  .pill {
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blobs,
  .blob,
  .ai-orbit,
  .ai-core,
  .ai-node {
    animation: none;
  }
}
