/*
Theme Name: AA AndyAutomates
Theme URI: https://andyautomates.com
Author: Andy Meisenhelder
Author URI: https://andyautomates.com
Description: Custom classic theme for AndyAutomates homepage and site styling.
Version: 1.0.2
*/

/* ======================================================
   Canvas Background
====================================================== */

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  transition: opacity var(--aa-transition);
}

html.dark-mode #bg-canvas {
  opacity: 0.45;
}

/* ======================================================
   Design Tokens
====================================================== */

:root {
  --aa-max: 1180px;
  --aa-header-height: 72px;

  --aa-space-1: 12px;
  --aa-space-2: 20px;
  --aa-space-3: 32px;
  --aa-space-4: 56px;
  --aa-space-5: 84px;

  --aa-radius: 16px;
  --aa-radius-pill: 999px;

  --aa-border: rgba(13, 24, 38, 0.12);
  --aa-border-strong: rgba(13, 24, 38, 0.2);

  --aa-shadow: 0 10px 28px rgba(13, 24, 38, 0.08);
  --aa-shadow-soft: 0 5px 18px rgba(13, 24, 38, 0.05);

  --aa-bg: #f5f8fb;
  --aa-surface: #ffffff;
  --aa-ink: #0d1826;
  --aa-muted: #40526a;

  --aa-accent: #0f766e;
  --aa-accent-ink: #ffffff;

  --aa-transition: 200ms ease;

  scroll-padding-top: calc(var(--aa-header-height) + 20px);
  scroll-behavior: smooth;
}

/* ======================================================
   Dark Mode Tokens
====================================================== */

html.dark-mode {
  --aa-bg: #0f172a;
  --aa-bg-soft: #1e293b;
  --aa-surface: #1e293b;
  --aa-workflow-bg: transparent;

  --aa-ink: #f8fafc;
  --aa-muted: #94a3b8;

  --aa-accent: #2dd4bf;

  --aa-border: rgba(255, 255, 255, 0.1);
  --aa-border-strong: rgba(255, 255, 255, 0.2);

  --aa-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  --aa-shadow-soft: 0 5px 18px rgba(0, 0, 0, 0.2);
}

/* ======================================================
   Base
====================================================== */

html {
  background-color: var(--aa-bg);
}

body {
  margin: 0;
  background: transparent;
  color: var(--aa-ink);
  font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--aa-header-height);
  overflow-x: hidden;
  transition: background-color var(--aa-transition), color var(--aa-transition);
}

/* Gutenberg wide container alignment */
.wp-site-blocks .alignwide,
.wp-site-blocks .wp-block-group.alignwide {
  max-width: var(--aa-max);
  margin-left: auto;
  margin-right: auto;
}

/* ======================================================
   Header
====================================================== */

.aa-header {
  position: fixed;
  top: 0;              /* adjusted for admin bar below */
  left: 0;
  right: 0;
  height: var(--aa-header-height);
  background: var(--aa-surface-85, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--aa-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background-color var(--aa-transition), border-color var(--aa-transition);
}

html.dark-mode .aa-header {
  background: rgba(15, 23, 42, 0.7);
}

/* WordPress admin bar offset (prevents overlap when logged in) */
body.admin-bar .aa-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .aa-header { top: 46px; }
}

.aa-header-inner {
  max-width: var(--aa-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

.aa-header .aa-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aa-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--aa-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--aa-transition);
}

.aa-logo span {
  color: var(--aa-accent);
}

.aa-header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.aa-nav {
  display: flex;
  gap: 24px;
}

.aa-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--aa-border);
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  color: var(--aa-ink);
}

.aa-nav-toggle-bar {
  width: 16px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
}

.aa-mobile-nav {
  display: none;
}

.aa-nav-link {
  text-decoration: none;
  color: var(--aa-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--aa-transition);
}

.aa-nav-link:hover {
  color: var(--aa-accent);
}

.aa-nav-link.is-cta {
  background: var(--aa-accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--aa-radius-pill);
  margin-left: 8px;
  transition: background-color var(--aa-transition);
}

.aa-nav-link.is-cta:hover {
  background: #0d665f;
  color: #fff;
}

/* ======================================================
   Theme Toggle
====================================================== */

.aa-theme-toggle {
  background: none;
  border: 1px solid var(--aa-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--aa-muted);
  transition: all var(--aa-transition);
}

.aa-theme-toggle:hover {
  border-color: var(--aa-accent);
  color: var(--aa-accent);
}

.aa-theme-toggle .sun-icon { display: none; }
.aa-theme-toggle .moon-icon { display: block; }

/* IMPORTANT: WordPress version toggles html.dark-mode, not body.dark-mode */
html.dark-mode .aa-theme-toggle .sun-icon { display: block; }
html.dark-mode .aa-theme-toggle .moon-icon { display: none; }

/* ======================================================
   Layout Blocks
====================================================== */

.wp-block-columns {
  display: flex;
  gap: 24px;
}

.wp-block-column {
  flex-grow: 1;
}

/* Ensure sections have some background if needed, but keep them mostly transparent to show the canvas */
.aa-section {
  position: relative;
  z-index: 1;
  padding-top: clamp(48px, 7vw, var(--aa-space-5));
  padding-bottom: clamp(48px, 7vw, var(--aa-space-5));
  padding-left: 20px;
  padding-right: 20px;
}

.aa-section > .wp-block-heading:first-child {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2.3rem);
  letter-spacing: -0.012em;
  line-height: 1.12;
}

.aa-section :where(h1, h2, h3, h4) {
  color: var(--aa-ink);
  letter-spacing: -0.012em;
  line-height: 1.15;
  hyphens: none !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-wrap: balance;
}

.aa-section :where(p, li) {
  color: var(--aa-muted);
  max-width: 74ch;
}

.aa-demos > .wp-block-heading,
.aa-build-grid > .wp-block-heading,
.aa-case-grid > .wp-block-heading,
.aa-lab-notes > .wp-block-heading,
.aa-about > .wp-block-heading {
  margin-bottom: 22px;
}

/* ======================================================
   Cards
====================================================== */

.aa-card {
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius);
  padding: clamp(20px, 2.3vw, var(--aa-space-3));
  background: var(--aa-surface);
  box-shadow: var(--aa-shadow);
}

.aa-soft-card {
  border: 1px solid var(--aa-border);
  border-radius: calc(var(--aa-radius) - 2px);
  padding: 18px;
  background: var(--aa-bg-soft, #fbfdff);
  box-shadow: var(--aa-shadow-soft);
  transition: background-color var(--aa-transition), border-color var(--aa-transition), box-shadow var(--aa-transition);
}

.aa-card :where(h1, h2, h3, h4),
.aa-soft-card :where(h1, h2, h3, h4) {
  margin-top: 0;
}

.aa-card :where(p, ul, ol),
.aa-soft-card :where(p, ul, ol) {
  margin-top: 10px;
  margin-bottom: 0;
}

.aa-card :where(ul, ol),
.aa-soft-card :where(ul, ol) {
  padding-left: 1.1rem;
}

/* ======================================================
   Hero Bits
====================================================== */

.aa-kicker {
  margin: 0 0 8px;
  color: var(--aa-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.77rem;
  font-weight: 700;
}

.aa-chip {
  display: inline-block;
  margin: 0 8px 8px 0;
  border: 1px solid var(--aa-border);
  border-radius: var(--aa-radius-pill);
  padding: 6px 12px;
  background: #eef7f6;
  font-size: 0.9rem;
  font-weight: 600;
  color: #31545f;
}

.aa-divider {
  opacity: 0.22;
  max-width: var(--aa-max);
  margin: 0 auto;
}

.aa-list-plain {
  margin: 0;
  padding-left: 1.1rem;
  list-style-type: none;
}

.aa-list-plain li {
  margin-bottom: 7px;
  position: relative;
}

.aa-list-plain li::before {
  content: "•";
  color: var(--aa-accent);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

/* ======================================================
   Buttons
====================================================== */

.wp-block-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wp-block-button {
  min-width: 0;
}

.wp-block-button__link {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  text-decoration: none;
  border-radius: var(--aa-radius-pill);
  padding: 12px 20px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease, color 140ms ease;
  cursor: pointer;
}

.wp-block-button__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(13, 24, 38, 0.12);
}

.wp-block-button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.3);
  outline-offset: 3px;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--aa-accent);
  border-color: var(--aa-accent);
}

.wp-block-button.is-style-fill .wp-block-button__link,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--aa-accent);
  color: var(--aa-accent-ink);
  border-color: var(--aa-accent);
}

/* ======================================================
   Hero Layout
====================================================== */

.aa-hero {
  padding-top: clamp(40px, 7vw, 72px);
}

.aa-hero .wp-block-columns {
  align-items: center;
  gap: clamp(20px, 3.5vw, 48px);
}

.aa-hero h1 {
  margin: 0 0 14px;
  max-width: 16ch;
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.aa-hero .has-large-font-size {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: clamp(1.02rem, 1vw + 0.8rem, 1.24rem) !important;
  line-height: 1.55;
}

.aa-hero .wp-block-buttons {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.aa-hero .wp-block-buttons .wp-block-button:first-child .wp-block-button__link {
  background: var(--aa-accent);
  color: var(--aa-accent-ink);
  border-color: var(--aa-accent);
}

.aa-hero .wp-block-buttons .wp-block-button:nth-child(3) .wp-block-button__link {
  color: var(--aa-muted);
  border-color: var(--aa-border-strong);
}

.aa-hero-preview .wp-block-image {
  margin: 0 0 14px;
}

.aa-hero-preview .wp-block-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--aa-border);
  display: block;
}

/* ======================================================
   Grids / Proof Strip / Cards
====================================================== */

.aa-proof-strip .wp-block-column,
.aa-build-grid .wp-block-column,
.aa-case-grid .wp-block-column {
  display: flex;
}

.aa-proof-strip .aa-soft-card,
.aa-build-grid .aa-card,
.aa-case-grid .aa-card {
  width: 100%;
  height: 100%;
}

.aa-proof-card {
  border-color: rgba(13, 24, 38, 0.1);
}

.aa-build-card,
.aa-case-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.aa-proof-strip .aa-soft-card h4 {
  margin: 0 0 8px;
  font-size: clamp(1rem, 0.38vw + 0.95rem, 1.15rem);
}

.aa-proof-strip .aa-soft-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ======================================================
   Demos
====================================================== */

#aa-demos,
#demos {
  scroll-margin-top: 110px;
}

#demos .aa-demo-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

#demos .aa-demo-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--aa-accent) 0%, rgba(15, 118, 110, 0.2) 100%);
}

#demos .aa-demo-card .wp-block-columns {
  gap: clamp(18px, 3vw, 34px);
}

#demos .aa-card .wp-block-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  border: 1px solid var(--aa-border);
  background: #eaf1f4;
}

#demos .wp-block-buttons {
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

#demos .wp-block-buttons .wp-block-button:first-child .wp-block-button__link {
  background: var(--aa-accent);
  color: var(--aa-accent-ink);
  border-color: var(--aa-accent);
}

/* ======================================================
   Workflow Section
====================================================== */

.aa-workflow {
  background: var(--aa-workflow-bg, linear-gradient(180deg, #ffffff 0%, #f9fcff 100%));
  transition: background var(--aa-transition);
}

.aa-workflow ol {
  margin: 0;
  padding-left: 1.5rem;
}

.aa-workflow li {
  margin-bottom: 12px;
}

.aa-case-actions {
  margin-top: 16px;
}

/* ======================================================
   Lab Notes / About
====================================================== */

.aa-lab-notes .wp-block-list {
  border-left: 2px solid rgba(15, 118, 110, 0.22);
  padding-left: 18px;
  list-style-type: none;
}

.aa-about p {
  max-width: 76ch;
}

.aa-about .wp-block-buttons {
  margin-top: 18px;
  gap: 10px;
}

/* ======================================================
   Footer CTA Card
====================================================== */

.aa-footer-cta {
  background: linear-gradient(130deg, #0f766e 0%, #155e75 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(13, 24, 38, 0.16);
  margin-top: 40px;
}

.aa-footer-cta :where(h1, h2, h3) {
  color: #ffffff !important;
}

.aa-footer-cta p {
  color: rgba(255, 255, 255, 0.92) !important;
}

.aa-footer-cta .wp-block-button.is-style-outline .wp-block-button__link {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
}

/* ======================================================
   Demo placeholder (Coming Soon)
====================================================== */

.aa-demo-link{
  display: block;
  text-decoration: none !important;
  color: inherit;
}

.aa-demo-frame{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--aa-border);
  background:
    radial-gradient(1200px 400px at 20% 10%, rgba(15,23,42,0.08), transparent 60%),
    linear-gradient(135deg, rgba(15,23,42,0.03), rgba(15,23,42,0.015));
}

.aa-demo-frame::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15,23,42,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.25;
  transform: scale(1.02);
}

.aa-demo-frame::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.25));
}

.aa-demo-badge{
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;

  display: inline-flex;
  flex-direction: column;
  gap: 4px;

  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.aa-demo-badge::before{
  content:"";
  position:absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 14px 0 0 14px;
  background: #7CFC90;
}

.aa-demo-badge__top{
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--aa-ink);
  font-size: 1.05rem;
  line-height: 1.1;
}

.aa-demo-badge__sub{
  color: var(--aa-muted);
  font-size: 0.92rem;
  line-height: 1.25;
}

/* ======================================================
   Footer (from the second <style> block in index.html)
====================================================== */

.aa-footer {
  background: var(--aa-surface);
  border-top: 1px solid var(--aa-border);
  padding: 64px 0 32px;
  margin-top: 80px;
  transition: background-color var(--aa-transition), border-color var(--aa-transition);
}

.aa-footer-inner {
  max-width: var(--aa-max);
  margin: 0 auto;
  padding: 0 20px;
}

.aa-footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.aa-footer-brand {
  max-width: 320px;
}

.aa-footer-brand p {
  margin-top: 16px;
  color: var(--aa-muted);
  font-size: 0.95rem;
}

.aa-footer-links {
  display: flex;
  gap: 64px;
}

.aa-footer-col h6 {
  margin: 0 0 20px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aa-ink);
}

.aa-footer-col a {
  display: block;
  text-decoration: none;
  color: var(--aa-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: color 140ms ease;
}

.aa-footer-col a:hover {
  color: var(--aa-accent);
}

.aa-footer-bottom {
  border-top: 1px solid var(--aa-border);
  padding-top: 32px;
  text-align: center;
}

.aa-footer-bottom p {
  font-size: 0.85rem;
  color: var(--aa-muted);
}

@media (min-width: 1121px) {
  .aa-hero .wp-block-columns > .wp-block-column:first-child {
    padding-right: 10px;
  }

  .aa-hero-preview {
    margin-left: auto;
    max-width: 430px;
  }

  .aa-hero .wp-block-button__link {
    min-width: 170px;
  }

  .aa-proof-strip .wp-block-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }

  .aa-proof-strip .wp-block-column {
    margin: 0 !important;
    min-width: 0;
  }

  .aa-build-grid .wp-block-columns {
    align-items: stretch;
  }

  .aa-build-card {
    min-height: 248px;
  }

  .aa-case-grid .wp-block-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .aa-case-card {
    min-height: 212px;
  }

  .aa-case-actions {
    justify-content: flex-start;
  }

  .aa-lab-notes .wp-block-list {
    column-count: 2;
    column-gap: 34px;
  }

  .aa-lab-notes .wp-block-list li {
    break-inside: avoid;
    margin-bottom: 16px;
  }
}

@media (max-width: 1120px) {
  .aa-proof-strip .wp-block-columns,
  .aa-build-grid .wp-block-columns,
  .aa-case-grid .wp-block-columns {
    flex-wrap: wrap;
  }

  .aa-proof-strip .wp-block-column,
  .aa-build-grid .wp-block-column,
  .aa-case-grid .wp-block-column {
    flex-basis: calc(50% - 12px);
  }

  .aa-page-stack {
    gap: 18px;
  }

  .aa-page-split {
    grid-template-columns: 1fr;
  }

  .aa-page-shell .wp-block-button__link {
    padding: 11px 16px;
  }

  .aa-resume-frame {
    height: min(72vh, 860px);
  }
}

@media (max-width: 980px) {
  .aa-section {
    padding-top: clamp(30px, 6vw, 42px);
    padding-bottom: clamp(30px, 6vw, 42px);
  }

  .aa-nav {
    display: none;
  }

  .aa-nav-toggle {
    display: inline-flex;
  }

  .aa-header-actions {
    gap: 10px;
  }

  .aa-mobile-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--aa-border);
    border-radius: 12px;
    background: var(--aa-surface);
    box-shadow: var(--aa-shadow);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--aa-transition), transform var(--aa-transition);
    z-index: 1001;
  }

  .aa-header.is-mobile-nav-open .aa-mobile-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .aa-mobile-nav-link {
    display: block;
    text-decoration: none;
    color: var(--aa-muted);
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
  }

  .aa-mobile-nav-link:hover {
    color: var(--aa-accent);
    border-color: var(--aa-border);
    background: rgba(15, 118, 110, 0.05);
  }

  .aa-mobile-nav-link.is-cta {
    color: var(--aa-accent-ink);
    background: var(--aa-accent);
    border-color: var(--aa-accent);
  }

  .aa-mobile-nav-link.is-cta:hover {
    color: var(--aa-accent-ink);
    filter: brightness(0.96);
  }

  .aa-hero .wp-block-columns,
  #demos .wp-block-columns,
  .aa-build-grid .wp-block-columns,
  .aa-case-grid .wp-block-columns,
  .aa-proof-strip .wp-block-columns {
    flex-direction: column;
  }

  .aa-hero .wp-block-column,
  #demos .wp-block-column,
  .aa-build-grid .wp-block-column,
  .aa-case-grid .wp-block-column,
  .aa-proof-strip .wp-block-column {
    flex-basis: 100% !important;
  }

  .aa-hero h1 {
    max-width: 20ch;
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .aa-hero .wp-block-buttons,
  #demos .wp-block-buttons,
  .aa-about .wp-block-buttons,
  .aa-footer-cta .wp-block-buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .aa-hero .wp-block-button__link,
  #demos .wp-block-button__link,
  .aa-about .wp-block-button__link,
  .aa-footer-cta .wp-block-button__link {
    width: 100%;
    text-align: center;
  }

  .aa-page-shell .wp-block-button__link {
    min-height: 44px;
  }

  .aa-section .wp-block-button__link {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    line-height: 1.35;
    white-space: normal;
    text-wrap: balance;
  }

  body.page-id-100 #wpforms-32 .wpforms-submit-container {
    display: block;
  }

  body.page-id-100 #wpforms-32 .wpforms-field-row {
    display: block;
  }

  body.page-id-100 #wpforms-32 .wpforms-field-row .wpforms-field-row-block {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  body.page-id-100 #wpforms-32 button.wpforms-submit {
    width: 100%;
  }
}

@media (max-width: 782px) {
  .wp-block-columns {
    flex-direction: column;
    gap: 16px;
  }

  .aa-section {
    padding-top: clamp(24px, 7.5vw, 34px);
    padding-bottom: clamp(24px, 7.5vw, 34px);
  }

  .aa-section :where(p, li) {
    max-width: 100%;
  }

  .aa-card,
  .aa-soft-card {
    padding: 18px;
  }

  .aa-hero .wp-block-columns,
  #demos .wp-block-columns,
  .aa-build-grid .wp-block-columns,
  .aa-case-grid .wp-block-columns {
    flex-direction: column;
  }

  .aa-hero .wp-block-column,
  #demos .wp-block-column,
  .aa-build-grid .wp-block-column,
  .aa-case-grid .wp-block-column,
  .aa-proof-strip .wp-block-column {
    flex-basis: 100% !important;
  }

  .aa-hero h1 {
    max-width: 20ch;
    font-size: clamp(2rem, 11vw, 2.9rem);
  }

  .aa-hero .wp-block-buttons,
  #demos .wp-block-buttons,
  .aa-about .wp-block-buttons,
  .aa-footer-cta .wp-block-buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .aa-hero .wp-block-button__link,
  #demos .wp-block-button__link,
  .aa-about .wp-block-button__link,
  .aa-footer-cta .wp-block-button__link {
    width: 100%;
    text-align: center;
  }

  .aa-footer-grid {
    flex-direction: column;
    gap: 40px;
  }

  .aa-footer-links {
    gap: 40px;
  }

  .aa-page-stack {
    gap: 16px;
  }

  .aa-page-shell .wp-block-buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .aa-page-shell .wp-block-button {
    width: 100%;
  }

  .aa-page-shell .wp-block-button__link {
    width: 100%;
    text-align: center;
  }

  .aa-page-hero h1 {
    font-size: clamp(1.65rem, 7vw, 2.25rem);
  }

  .aa-mobile-nav {
    left: 14px;
    right: 14px;
  }
}

@media (max-width: 560px) {
  .aa-proof-strip .wp-block-column,
  .aa-build-grid .wp-block-column,
  .aa-case-grid .wp-block-column {
    flex-basis: 100%;
  }

  .aa-kicker {
    font-size: 0.72rem;
  }

  .aa-header-inner {
    padding: 0 14px;
  }

  .aa-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  #demos .wp-block-buttons,
  .aa-footer-cta .wp-block-buttons {
    gap: 8px;
  }

  #demos .wp-block-button,
  .aa-footer-cta .wp-block-button {
    width: 100%;
  }

  #demos .wp-block-button__link,
  .aa-footer-cta .wp-block-button__link {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.92rem;
    line-height: 1.3;
  }
}

@media (max-width: 430px) {
  :root {
    --aa-header-height: 64px;
  }

  body {
    font-size: 17px;
    line-height: 1.62;
  }

  .aa-header-inner {
    padding: 0 12px;
  }

  .aa-logo {
    font-size: 1.08rem;
  }

  .aa-theme-toggle,
  .aa-nav-toggle {
    width: 38px;
    height: 38px;
  }

  .aa-mobile-nav {
    left: 12px;
    right: 12px;
    padding: 10px;
  }

  .aa-mobile-nav-link {
    padding: 12px;
  }

  .aa-section {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: clamp(22px, 6vw, 30px);
    padding-bottom: clamp(22px, 6vw, 30px);
  }

  .aa-card,
  .aa-soft-card {
    padding: 15px;
  }

  .aa-section :where(p, li) {
    font-size: 0.99rem;
    line-height: 1.6;
  }

  .aa-hero h1 {
    font-size: clamp(1.9rem, 9.5vw, 2.35rem);
  }

  .aa-page-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .wp-block-button__link {
    min-height: 46px;
    font-size: 0.95rem;
    border-radius: 12px;
    padding: 11px 14px;
  }

  .aa-footer {
    padding: 46px 0 24px;
    margin-top: 56px;
  }

  .aa-footer-grid {
    gap: 28px;
    margin-bottom: 30px;
  }

  .aa-footer-links {
    flex-direction: column;
    gap: 20px;
  }

  .aa-footer-col h6 {
    margin-bottom: 12px;
  }

  .aa-footer-col a {
    margin-bottom: 8px;
    padding: 3px 0;
  }

  body.page-id-100 #wpforms-32 :where(input, textarea, select, button, label, legend) {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wp-block-button__link {
    transition: none;
  }
}

/* ======================================================
   Legacy Page Integration
====================================================== */

.aa-page-shell {
  padding-top: clamp(36px, 5vw, 56px);
}

.aa-page-stack {
  display: grid;
  gap: 22px;
}

.aa-page-shell .aa-card {
  overflow: hidden;
}

.aa-page-hero h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: clamp(1.9rem, 2.6vw + 1rem, 3rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
}

.aa-page-hero p {
  margin-bottom: 0;
  max-width: 72ch;
}

.aa-page-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.aa-page-split .wp-block-image {
  margin-top: 0;
}

.aa-page-split h2 {
  margin-top: 10px;
  margin-bottom: 8px;
}

.aa-page-split-main .wpforms-container {
  max-width: 100%;
}

body.page-id-100 #wpforms-32,
body.page-id-100 #wpforms-32 :where(input, textarea, select, button, label, legend) {
  font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body.page-id-100 #wpforms-32 .wpforms-field-container,
body.page-id-100 #wpforms-32 .wpforms-field-medium,
body.page-id-100 #wpforms-32 .wpforms-field-row.wpforms-field-medium {
  max-width: 100%;
}

body.page-id-100 #wpforms-32 :where(input, textarea, select) {
  font-size: 16px;
}

html.dark-mode body.page-id-100 #wpforms-32 {
  --wpforms-field-background-color: rgba(255, 255, 255, 0.04);
  --wpforms-field-border-color: rgba(255, 255, 255, 0.18);
  --wpforms-field-border-color-spare: rgba(255, 255, 255, 0.18);
  --wpforms-field-text-color: #e2e8f0;
  --wpforms-field-menu-color: #0f172a;
  --wpforms-label-color: #f8fafc;
  --wpforms-label-sublabel-color: #94a3b8;
  --wpforms-button-background-color: var(--aa-accent);
  --wpforms-button-border-color: var(--aa-accent);
  --wpforms-button-text-color: var(--aa-accent-ink);
  --wpforms-button-border-radius: 999px;
}

html.dark-mode body.page-id-100 #wpforms-32 input,
html.dark-mode body.page-id-100 #wpforms-32 textarea,
html.dark-mode body.page-id-100 #wpforms-32 select {
  box-shadow: none;
}

html.dark-mode body.page-id-100 #wpforms-32 input:focus,
html.dark-mode body.page-id-100 #wpforms-32 textarea:focus,
html.dark-mode body.page-id-100 #wpforms-32 select:focus {
  border-color: var(--aa-accent);
  outline: 2px solid rgba(45, 212, 191, 0.28);
  outline-offset: 1px;
}

.aa-page-cta {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

html.dark-mode .aa-page-cta {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
}

.aa-fit-call-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--aa-border);
}

.aa-legacy-video {
  max-width: min(100%, 920px);
  margin-inline: auto;
}

.aa-legacy-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--aa-border);
  background: rgba(13, 24, 38, 0.04);
}

html.dark-mode .aa-legacy-video-frame {
  background: rgba(255, 255, 255, 0.04);
}

.aa-legacy-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.aa-legacy-video .wp-block-buttons {
  margin-top: 14px;
  flex-wrap: wrap;
}

.aa-resume-panel {
  max-width: min(100%, 980px);
  margin-inline: auto;
}

.aa-resume-actions {
  margin-bottom: 14px;
}

.aa-resume-frame {
  width: 100%;
  height: min(80vh, 1000px);
  border: 1px solid var(--aa-border);
  border-radius: 12px;
  background: #ffffff;
}

html.dark-mode .aa-resume-frame {
  background: #0f172a;
}

.aa-resume-note {
  margin-top: 14px;
  margin-bottom: 0;
  color: var(--aa-muted);
  font-size: 0.92rem;
}

.aa-prose :where(iframe, video) {
  max-width: 100%;
}

.aa-prose :where(pre, table) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 782px) {
  .aa-page-split {
    grid-template-columns: 1fr;
  }

  .aa-resume-frame {
    height: 68vh;
    border-radius: 10px;
  }

  .aa-resume-actions .wp-block-button {
    width: 100%;
  }

  body.page-id-100 #wpforms-32 .wpforms-field-row {
    display: block;
  }

  body.page-id-100 #wpforms-32 .wpforms-field-row .wpforms-field-row-block {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 430px) {
  .aa-page-hero h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }
}

.aa-prose :where(p, ul, ol) { color: var(--aa-muted); }
.aa-prose a { color: var(--aa-accent); }
.aa-prose h2, .aa-prose h3 { color: var(--aa-ink); }

/* EOF: aa-andyautomates */
