/* Automatiz Nation — layout fixes over Kadence (load last) */
/* version 20260725.3 */

/* Kill Kadence layout chrome that fights our full-bleed sections */
body.an-refonte,
body.an-refonte .site,
body.an-refonte #wrapper,
body.an-refonte #inner-wrap,
body.an-refonte .site-container,
body.an-refonte .content-container,
body.an-refonte .content-wrap,
body.an-refonte .site-content,
body.an-refonte .content-area,
body.an-refonte main#main,
body.an-refonte .entry-content-wrap,
body.an-refonte .entry.single-entry,
body.an-refonte .entry.content-bg,
body.an-refonte .content-bg {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
  float: none !important;
}

body.an-refonte .entry-content,
body.an-refonte .entry-content.an-front,
body.an-refonte .an-home,
body.an-refonte .an-page {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

/* Typography: beat Kadence h1/h2 sizes */
body.an-refonte {
  font-family: var(--font-body) !important;
  color: var(--ink) !important;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(15, 155, 142, 0.10), transparent 60%),
    radial-gradient(900px 400px at -10% 20%, rgba(228, 87, 46, 0.06), transparent 55%),
    var(--bg) !important;
  line-height: 1.6 !important;
  font-size: 17px !important;
}
body.an-refonte h1,
body.an-refonte h2,
body.an-refonte h3,
body.an-refonte h4 {
  font-family: var(--font-display) !important;
  color: var(--ink) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  margin: 0 0 0.75rem !important;
}
body.an-refonte h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.35rem) !important;
  font-weight: 700 !important;
}
body.an-refonte h2 {
  font-size: clamp(1.5rem, 2.7vw, 2.05rem) !important;
  font-weight: 650 !important;
}
body.an-refonte h3 {
  font-size: 1.12rem !important;
  font-weight: 650 !important;
}
body.an-refonte p {
  margin: 0 0 1rem !important;
}
body.an-refonte a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Header ours only */
body.an-refonte header.site-header.an-header {
  display: block !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
  background: rgba(246, 241, 232, 0.92) !important;
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(14px);
}
body.an-refonte #masthead,
body.an-refonte .kadence-header,
body.an-refonte .site-header-wrap,
body.an-refonte footer#colophon,
body.an-refonte .site-bottom-footer-wrap,
body.an-refonte .entry-hero {
  display: none !important;
}

/* Footer ours */
body.an-refonte footer.site-footer.an-footer {
  display: block !important;
  margin-top: 2rem !important;
  background: #102033 !important;
  color: rgba(238, 244, 251, 0.78) !important;
}

/* Wider canvas */
body.an-refonte {
  --max: 1220px;
}
body.an-refonte .wrap {
  width: min(var(--max), calc(100% - 2.75rem)) !important;
  margin-inline: auto !important;
}

/* Hero polish */
body.an-refonte .hero {
  padding: 1.75rem 0 0.35rem !important;
}
body.an-refonte .hero-panel {
  display: grid !important;
  grid-template-columns: 1.05fr 0.95fr !important;
  gap: 0 !important;
  align-items: stretch !important;
  border-radius: 26px !important;
  overflow: hidden !important;
  box-shadow: var(--shadow) !important;
  border: 1px solid var(--line) !important;
  background: #fffdf8 !important;
}
body.an-refonte .hero-panel::before {
  width: 4px !important;
}
body.an-refonte .hero-copy {
  padding: clamp(1.4rem, 2.6vw, 2.4rem) !important;
  gap: 0.85rem !important;
}
body.an-refonte .hero-copy h1 {
  max-width: 14ch;
  line-height: 1.08 !important;
  margin-bottom: 0.35rem !important;
}
body.an-refonte .hero-copy h1 em {
  font-style: normal !important;
  color: var(--accent-deep) !important;
  background: none !important;
  box-shadow: inset 0 -0.28em 0 rgba(15, 155, 142, 0.22);
  padding: 0 !important;
}
body.an-refonte .hero-copy .lead {
  margin: 0.15rem 0 0.35rem !important;
  max-width: 42ch !important;
}
body.an-refonte .hero-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.7rem !important;
  margin-top: 0.35rem !important;
}
body.an-refonte .hero-actions br,
body.an-refonte .hero-meta br,
body.an-refonte .flow-card br,
body.an-refonte .flow-step br {
  display: none !important;
}
body.an-refonte .hero-actions .btn {
  min-height: 48px;
}
body.an-refonte .hero-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.55rem 1.1rem !important;
  margin-top: 0.55rem !important;
  align-items: baseline !important;
}
body.an-refonte .hero-meta > span {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 0.3rem;
  white-space: nowrap;
}

/* Right panel tighter */
body.an-refonte .hero-visual {
  min-height: 100% !important;
  padding: 1.1rem !important;
}
body.an-refonte .flow-card {
  gap: 0.7rem !important;
  height: 100% !important;
}
body.an-refonte .flow-steps {
  gap: 0.5rem !important;
}
body.an-refonte .flow-step {
  grid-template-columns: auto 1fr auto !important;
  gap: 0.65rem !important;
  padding: 0.65rem 0.7rem !important;
}
body.an-refonte .flow-step .n {
  flex: 0 0 auto;
}
body.an-refonte .flow-step > div {
  min-width: 0;
}
body.an-refonte .flow-board {
  margin-top: auto !important;
  gap: 0.45rem !important;
}

/* Sections rhythm */
body.an-refonte .section {
  padding: 2.35rem 0 !important;
}
body.an-refonte .section[style*="padding-top:1.25rem"],
body.an-refonte .section[style*="padding-top: 1.25rem"] {
  padding-top: 1.1rem !important;
}
body.an-refonte .section[style*="padding-top:0"],
body.an-refonte .section[style*="padding-top: 0"] {
  padding-top: 0.35rem !important;
}
body.an-refonte .section-head {
  margin-bottom: 1.15rem !important;
  align-items: flex-end !important;
}

/* Grids */
body.an-refonte .grid-4 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.85rem !important;
}
body.an-refonte .grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.9rem !important;
}
body.an-refonte .grid-2 {
  display: grid !important;
  grid-template-columns: 1.1fr 0.9fr !important;
  gap: 1.1rem !important;
}

/* Cards */
body.an-refonte .card {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  padding: 1.15rem 1.1rem !important;
  box-shadow: var(--shadow-sm) !important;
}
body.an-refonte .answer-box {
  border-radius: 22px !important;
  padding: clamp(1.15rem, 2.2vw, 1.7rem) !important;
}
body.an-refonte .kavyro {
  align-items: center !important;
  gap: 1rem !important;
}

/* Buttons beat Kadence .button styles */
body.an-refonte .btn,
body.an-refonte a.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  border-radius: 999px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
}
body.an-refonte .btn-primary,
body.an-refonte a.btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
  border: 1px solid transparent !important;
  box-shadow: 0 10px 24px rgba(15, 155, 142, 0.28) !important;
}
body.an-refonte .btn-secondary,
body.an-refonte a.btn-secondary {
  background: transparent !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
}
body.an-refonte .btn-coral,
body.an-refonte a.btn-coral {
  background: var(--coral) !important;
  color: #fff !important;
  border: 0 !important;
}
body.an-refonte .nav-cta {
  background: var(--ink) !important;
  color: #fff !important;
  border: 0 !important;
  text-decoration: none !important;
}

/* Resources cards as links */
body.an-refonte a.card.resource {
  text-decoration: none !important;
  color: inherit !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem !important;
  min-height: 100%;
}
body.an-refonte a.card.resource h3 {
  margin: 0 !important;
}
body.an-refonte a.card.resource .more {
  margin-top: auto;
}

/* Blog list */
body.an-refonte .blog-list {
  display: grid !important;
  gap: 0.85rem !important;
}
body.an-refonte a.blog-item {
  text-decoration: none !important;
  color: inherit !important;
}

/* Article */
body.an-refonte .article .content p:first-of-type {
  font-size: 1.1rem !important;
  color: var(--ink-soft) !important;
}

/* Contact / Fluent Forms */
body.an-refonte .form-shell {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr !important;
  gap: 1.1rem !important;
  align-items: start !important;
}
body.an-refonte .fluentform,
body.an-refonte .fluentform_wrapper_1,
body.an-refonte .ff-default {
  width: 100% !important;
}
body.an-refonte .fluentform .ff-el-group {
  margin-bottom: 0.85rem !important;
}
body.an-refonte .fluentform .ff-t-container,
body.an-refonte .fluentform .ff-t-cell {
  gap: 0.75rem;
}
body.an-refonte .fluentform input[type="text"],
body.an-refonte .fluentform input[type="email"],
body.an-refonte .fluentform input[type="url"],
body.an-refonte .fluentform textarea,
body.an-refonte .fluentform select,
body.an-refonte .ff-el-form-control {
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 12px !important;
  padding: 0.8rem 0.9rem !important;
  font: inherit !important;
  background: #fff !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  min-height: 46px;
}
body.an-refonte .fluentform textarea {
  min-height: 140px !important;
}
body.an-refonte .fluentform .ff-el-input--label label,
body.an-refonte .fluentform .ff-el-input--label {
  font-weight: 650 !important;
  font-size: 0.9rem !important;
  color: var(--ink) !important;
  margin-bottom: 0.3rem !important;
}
body.an-refonte .fluentform .ff-btn-submit,
body.an-refonte .fluentform button[type="submit"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  padding: 0.85rem 1.3rem !important;
  font-weight: 650 !important;
  background: var(--accent) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(15, 155, 142, 0.28) !important;
  min-height: 48px;
  width: auto !important;
}
/* Hide honeypot / spam catcher fields that leak as "Alternative" */
body.an-refonte .fluentform .ff-el-is-hp,
body.an-refonte .fluentform .ff_excluded,
body.an-refonte .fluentform [name*="__fluent"],
body.an-refonte .fluentform .ff-el-group.ff_blocked,
body.an-refonte .ff-el-form-check.ff_blocked,
body.an-refonte label[for*="alternative"],
body.an-refonte input[name*="alternative"],
body.an-refonte .fluentform .ff-el-group:has(input[name*="alternative"]),
body.an-refonte .fluentform .ff-el-group:has(input[aria-label*="Alternative"]) {
  position: absolute !important;
  left: -10000px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Stray p tags inside our components (if any remain) */
body.an-refonte .hero-panel > p,
body.an-refonte .flow-card > p,
body.an-refonte .flow-steps > p,
body.an-refonte .flow-step > p,
body.an-refonte .hero-actions > p,
body.an-refonte .hero-meta > p,
body.an-refonte .flow-board > p {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Menu toggle */
body.an-refonte .menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong) !important;
  background: #fff !important;
  border-radius: 12px !important;
  padding: 0 !important;
  cursor: pointer;
  color: var(--ink);
}
body.an-refonte .menu-toggle-bars,
body.an-refonte .menu-toggle-bars::before,
body.an-refonte .menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: transform .15s ease;
}
body.an-refonte .menu-toggle-bars::before,
body.an-refonte .menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
body.an-refonte .menu-toggle-bars::before { top: -6px; }
body.an-refonte .menu-toggle-bars::after { top: 6px; }

/* Responsive */
@media (max-width: 980px) {
  body.an-refonte .menu-toggle { display: inline-flex !important; }
  body.an-refonte .hero-panel,
  body.an-refonte .grid-2,
  body.an-refonte .form-shell,
  body.an-refonte .kavyro,
  body.an-refonte .footer-grid {
    grid-template-columns: 1fr !important;
  }
  body.an-refonte .grid-3,
  body.an-refonte .grid-4 {
    grid-template-columns: 1fr 1fr !important;
  }
  body.an-refonte .hero-copy h1 {
    max-width: none;
  }
}
@media (max-width: 640px) {
  body.an-refonte .wrap {
    width: min(var(--max), calc(100% - 1.35rem)) !important;
  }
  body.an-refonte .grid-3,
  body.an-refonte .grid-4,
  body.an-refonte .flow-board {
    grid-template-columns: 1fr !important;
  }
  body.an-refonte .hero {
    padding-top: 1rem !important;
  }
  body.an-refonte .section {
    padding: 1.85rem 0 !important;
  }
  body.an-refonte .hero-meta > span {
    white-space: normal;
  }
}
