/* Enable Apps — corporate landing site
 * Slate & Indigo palette — distinct from Enable Coffee's Espresso & Amber
 * so the parent brand doesn't read as "just another product skin".
 * Shared by every page in /web/. No build step. No framework.
 * Dark mode follows the OS preference automatically.
 */

:root {
  --ea-bg: #F6F7FB;
  --ea-surface: #EBEDF4;
  --ea-text: #1A2130;
  --ea-text-muted: #545F73;
  /* Indigo-700 — ~8:1 contrast against --ea-surface, comfortably passes
   * WCAG 2.1 AA for both normal text and UI components. */
  --ea-accent: #4338CA;
  --ea-accent-strong: #372AA8;
  --ea-border: #DBDFE8;
  --ea-focus: #2563EB;

  --ea-radius: 12px;
  --ea-max-width: 44rem;
}

/* Dark values — applied when (a) user has explicitly chosen dark via the
 * theme toggle (data-theme="dark"), OR (b) no explicit choice and system
 * preference is dark. Explicit data-theme="light" overrides system dark. */
:root[data-theme="dark"] {
  --ea-bg: #15171F;
  --ea-surface: #1E212C;
  --ea-text: #EEF0F4;
  --ea-text-muted: #A6AEBF;
  --ea-accent: #818CF8;
  --ea-accent-strong: #A5B4FC;
  --ea-border: #2C313D;
  --ea-focus: #60A5FA;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ea-bg: #15171F;
    --ea-surface: #1E212C;
    --ea-text: #EEF0F4;
    --ea-text-muted: #A6AEBF;
    --ea-accent: #818CF8;
    --ea-accent-strong: #A5B4FC;
    --ea-border: #2C313D;
    --ea-focus: #60A5FA;
  }
}

* { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ea-text);
  background: var(--ea-bg);
  -webkit-font-smoothing: antialiased;
}

/* Skip link — visible on focus only */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--ea-text);
  color: var(--ea-bg);
  text-decoration: none;
  border-radius: 0 0 var(--ea-radius) var(--ea-radius);
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* Layout */
.site-header {
  border-bottom: 1px solid var(--ea-border);
  background: var(--ea-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.theme-toggle {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--ea-border);
  color: var(--ea-text-muted);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { border-color: var(--ea-accent); color: var(--ea-text); }
.theme-toggle:focus-visible { outline: 2px solid var(--ea-focus); outline-offset: 2px; }
.theme-toggle svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.theme-toggle__icon-sun,
.theme-toggle__icon-moon,
.theme-toggle__icon-auto { display: none; }
.theme-toggle[data-theme-state="auto"] .theme-toggle__icon-auto { display: inline-block; }
.theme-toggle[data-theme-state="light"] .theme-toggle__icon-sun { display: inline-block; }
.theme-toggle[data-theme-state="dark"] .theme-toggle__icon-moon { display: inline-block; }
.theme-toggle:not([data-theme-state]) .theme-toggle__icon-auto { display: inline-block; }

main {
  max-width: var(--ea-max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1, h2, h3 {
  color: var(--ea-text);
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

a { color: var(--ea-accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ea-accent-strong); }
a:focus-visible {
  outline: 2px solid var(--ea-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.site-footer {
  border-top: 1px solid var(--ea-border);
  padding: 1.5rem 1.25rem 2.5rem;
  font-size: 0.9rem;
  color: var(--ea-text-muted);
}
.site-footer .inner {
  max-width: var(--ea-max-width);
  margin: 0 auto;
}

/* ============================================================
 * Landing page
 * ============================================================ */

main.landing { max-width: 50rem; padding-bottom: 1rem; }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.hero .hero-icon {
  width: 4rem;
  height: 4rem;
  color: var(--ea-accent);
  margin-bottom: 1rem;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 0.25rem; }
.hero .tagline {
  font-size: 1.2rem;
  color: var(--ea-text-muted);
  margin-top: 0.25rem;
  margin-bottom: 1.75rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.5rem;
  background: var(--ea-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.1s, background 0.15s;
}
.cta:hover { background: var(--ea-accent-strong); color: #fff; transform: translateY(-1px); }
.cta:focus-visible { outline: 3px solid var(--ea-focus); outline-offset: 2px; }
.cta--secondary {
  background: transparent;
  color: var(--ea-text);
  border: 2px solid var(--ea-border);
}
.cta--secondary:hover { background: var(--ea-surface); color: var(--ea-text); border-color: var(--ea-accent); }

/* Mission band */
.mission {
  background: var(--ea-surface);
  border-radius: var(--ea-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0 3rem;
}
.mission p {
  font-size: 1.1rem;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 36rem;
}
.mission p + p { margin-top: 0.75rem; color: var(--ea-text-muted); font-size: 1rem; }

.landing-section { margin: 3rem 0; }
.landing-section > h2 {
  text-align: center;
  margin-bottom: 0.4rem;
}
.landing-section > .section-sub {
  text-align: center;
  color: var(--ea-text-muted);
  margin-bottom: 2rem;
  font-size: 1.02rem;
}

/* Products grid */
.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  background: var(--ea-surface);
  border: 1px solid var(--ea-border);
  border-radius: var(--ea-radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ea-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.product-card, .product-card * { text-decoration: none; }
a.product-card:hover, a.product-card:focus-visible {
  border-color: var(--ea-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
a.product-card:focus-visible {
  outline: 2px solid var(--ea-focus);
  outline-offset: 4px;
}
.product-card--placeholder { opacity: 0.75; }
.product-card__icon-wrap {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .product-illo {
  width: 3.5rem;
  height: 3.5rem;
  color: var(--ea-accent);
  display: block;
}
.product-card__body { flex: 1 1 auto; min-width: 0; }
.product-card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.product-card p {
  margin: 0 0 0.6rem;
  color: var(--ea-text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.product-card .product-card__cta {
  display: inline-block;
  color: var(--ea-accent);
  font-weight: 600;
  font-size: 0.9rem;
}
a.product-card:hover .product-card__cta { color: var(--ea-accent-strong); }

@media (max-width: 40rem) {
  .products { grid-template-columns: 1fr; }
  .product-card {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem 1.25rem;
  }
}

/* Contact */
.contact { text-align: center; }
.contact .address {
  color: var(--ea-text-muted);
  font-size: 0.95rem;
}

@media (max-width: 30rem) {
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 2rem; }
  main { padding: 2rem 1rem 3rem; }
  .mission { padding: 1.5rem 1.25rem; }
  .mission p { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
