/* ============================================
   MIDWEST AI SOLUTIONS — Landing Page Styles
   Navy + warm amber, local-service credible
   ============================================ */

/* --- Design Tokens --- */
:root,
[data-theme='light'] {
  /* Colors — Custom palette: Navy authority + warm amber */
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-surface-2: #f5f5f3;
  --color-surface-offset: #f0efeb;
  --color-divider: #e5e3de;
  --color-border: #d8d5ce;

  --color-text: #1a1f2e;
  --color-text-muted: #5c6373;
  --color-text-faint: #9ba0ad;
  --color-text-inverse: #ffffff;

  /* Primary — Deep Navy */
  --color-primary: #1a2744;
  --color-primary-hover: #0f1a30;
  --color-primary-active: #0a1224;
  --color-primary-highlight: #e8eaf0;

  /* Accent — Warm Amber */
  --color-accent: #e8a838;
  --color-accent-hover: #d4941f;
  --color-accent-active: #b88018;
  --color-accent-highlight: #fdf5e6;

  /* Success */
  --color-success: #2d7a3e;
  --color-success-highlight: #e0f0e3;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 39, 68, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 16px 48px rgba(26, 39, 68, 0.12);

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Content widths */
  --content-narrow: 680px;
  --content-default: 1080px;
  --content-wide: 1280px;

  /* Fonts */
  --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
}

[data-theme='dark'] {
  --color-bg: #111521;
  --color-surface: #181d2e;
  --color-surface-2: #1e2436;
  --color-surface-offset: #1c2130;
  --color-divider: #2a3045;
  --color-border: #353d55;

  --color-text: #e0e2ea;
  --color-text-muted: #9298ad;
  --color-text-faint: #5c6175;
  --color-text-inverse: #1a1f2e;

  --color-primary: #5b7cb8;
  --color-primary-hover: #7598d4;
  --color-primary-active: #8db0e0;
  --color-primary-highlight: #2a3450;

  --color-accent: #f0b956;
  --color-accent-hover: #f5cb7c;
  --color-accent-active: #f8da98;
  --color-accent-highlight: #3d3520;

  --color-success: #5cb872;
  --color-success-highlight: #1e3a28;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* --- Base Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
  line-height: 1.2;
  font-weight: 700;
}

p,
li {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: var(--color-accent);
  color: var(--color-primary);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a,
button,
input,
textarea,
select {
  transition: color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--content-narrow);
}

.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-muted);
}

.btn--sm {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
}

.btn--full {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-right: auto;
}

.logo__text {
  letter-spacing: -0.02em;
}

.logo__icon {
  color: var(--color-primary);
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: var(--space-6);
}

.nav__link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
}

.nav__link:hover {
  color: var(--color-text);
}

.header__cta {
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .header__cta {
    display: none;
  }
}

/* --- Hero --- */
.hero {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  text-align: center;
}

.hero__badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent-hover);
  background: var(--color-accent-highlight);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: var(--space-5);
  letter-spacing: -0.03em;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-16);
}

.hero__stats {
  display: flex;
  gap: var(--space-12);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  max-width: 180px;
}

.hero__stat-num {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-accent-hover);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .hero__stats {
    flex-direction: column;
    gap: var(--space-6);
  }
  .hero__stat {
    max-width: 100%;
  }
}

/* --- Section Headings --- */
.section__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.section__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 64ch;
  margin-bottom: var(--space-12);
}

/* --- Pain Points --- */
.section--pain {
  background: var(--color-surface);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

.pain-card {
  padding: var(--space-8);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
}

.pain-card__icon {
  color: var(--color-accent-hover);
  margin-bottom: var(--space-4);
}

.pain-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.pain-card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* --- Services --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.service-card {
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
  position: relative;
  overflow: hidden;
}

.service-card__num {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.service-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.service-card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-4);
}

.service-card__detail {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 500;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}

/* --- Who It's For --- */
.section--who {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.section--who .section__title {
  color: var(--color-text-inverse);
}

.section--who .section__subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.trades-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}

.trade-chip {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-5);
  background: rgba(232, 168, 56, 0.15);
  color: var(--color-accent);
  border: 1px solid rgba(232, 168, 56, 0.3);
  border-radius: var(--radius-full);
}

.who-note {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.who-note p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.who-note strong {
  color: var(--color-accent);
}

/* --- Process --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-8);
}

.process-step {
  position: relative;
}

.process-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: var(--text-base);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.process-step__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.process-step__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* --- Trust --- */
.section--trust {
  background: var(--color-surface);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-8);
}

.trust-item__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.trust-item__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item__q {
  display: block;
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q::after {
  content: '+';
  float: right;
  color: var(--color-accent-hover);
  font-size: var(--text-lg);
  font-weight: 700;
  transition: transform var(--transition-interactive);
}

.faq-item[open] .faq-item__q::after {
  transform: rotate(45deg);
}

.faq-item__a {
  padding: 0 var(--space-6) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- CTA / Contact --- */
.section--cta {
  background: var(--color-bg);
}

.cta-box {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  text-align: center;
}

.cta-box__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text-inverse);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.cta-box__text {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.75);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.55;
}

.contact-form {
  text-align: left;
  max-width: 480px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-form__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-form__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-form__input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  font-family: var(--font-body);
}

.contact-form__input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.12);
}

.contact-form__select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e8a838' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

.contact-form__select option {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.contact-form__textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-body);
}

.contact-form__note {
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--space-2);
}

.contact-form__note a {
  color: var(--color-accent);
  text-decoration: none;
}

.contact-form__note a:hover {
  text-decoration: underline;
}

/* --- Footer --- */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.6);
  padding-block: var(--space-12) var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__inner {
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.footer__brand .logo__icon {
  color: var(--color-accent);
}

.footer__text {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-4);
  line-height: 1.55;
}

.footer__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.footer__link:hover {
  text-decoration: underline;
}

.footer__sep {
  color: rgba(255, 255, 255, 0.2);
}

.footer__location {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}

.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.3);
}

.footer__veteran {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
