/* Alexis Systems.AI site styles.
   Brand values: docs/brand-web-decisions.md and the Brand Identity Specification. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Merriweather";
  src: url("../fonts/merriweather-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Fonts are temporary until the brand typeface is confirmed. Change them here only. */
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: "Merriweather", Georgia, serif;

  --navy: #012169;
  --slate: #425060;
  --mid-gray: #8D969F;
  --light-gray: #D9D9D9;
  --border: #e3e6ea;
  --page: #FAFAF8;
  --panel: #FFFFFF;
  --band: #F4F1EC;
  --band-border: #e6e0d6;
  --footer: #1d2530;
  /* Approved web accent. Light backgrounds only; never in the header or footer. */
  --accent: #8C1515;

  --wrap: 1120px;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--slate);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.65;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  color: var(--navy);
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.22;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0.75rem 0 1rem;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  margin: 0.5rem 0 1.5rem;
}

h3 {
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 36px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* Header (no accent color here) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Clear space: at least one center-dot diameter (36/230 of logo height). */
.site-header .brand {
  display: block;
  padding: 8px;
  line-height: 0;
}

.site-header .brand img {
  height: 46px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
}

.site-nav a {
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.site-header .site-nav .btn-primary {
  color: #fff;
}

.site-header .site-nav .btn-primary:hover {
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
}

.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
  position: absolute;
  left: 11px;
  width: 20px;
  height: 2px;
  background: var(--navy);
  content: "";
}

.menu-toggle-bar {
  top: 20px;
}

.menu-toggle-bar::before {
  left: 0;
  top: -6px;
}

.menu-toggle-bar::after {
  left: 0;
  top: 6px;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-text);
}

.btn-small {
  padding: 8px 14px;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: #00174d;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #6f1010;
}

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}

.btn-outline:hover {
  background: var(--panel);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.5rem;
}

/* Shared section parts */

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-band {
  background: var(--band);
  border-top: 1px solid var(--band-border);
  border-bottom: 1px solid var(--band-border);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.intro {
  max-width: 760px;
}

.lead {
  font-size: 1.05rem;
}

/* Hero */

.hero {
  padding: 72px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-mark {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.hero-mark img {
  width: 170px;
}

/* Platforms */

.columns-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 1.75rem;
}

.rule-heading {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.9;
}

/* Cards */

.cards {
  display: grid;
  gap: 18px;
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cards-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  font-size: 0.93rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
}

.card-accent {
  border-top: 3px solid var(--accent);
}

/* Training */

.topics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 1.75rem;
}

.topic {
  border-top: 3px solid var(--accent);
  padding-top: 12px;
  font-size: 0.93rem;
}

.topic h3 {
  margin-bottom: 0.35rem;
}

.topic p {
  margin: 0;
}

.arrow-link {
  font-weight: 600;
  text-decoration: none;
}

.arrow-link:hover {
  text-decoration: underline;
}

.arrow {
  color: var(--accent);
}

/* Contact */

.contact-email {
  font-weight: 600;
}

.contact-form {
  display: grid;
  gap: 4px;
}

.field label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.optional {
  font-weight: 400;
  color: var(--slate);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--slate);
  background: var(--panel);
  border: 1px solid var(--mid-gray);
  border-radius: 6px;
  padding: 10px 12px;
}

.field [aria-invalid="true"] {
  border-color: var(--accent);
}

.field-error {
  min-height: 1.3em;
  margin: 2px 0 8px;
  font-size: 0.85rem;
  color: var(--accent);
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 12px;
  font-weight: 600;
}

.form-status.is-success {
  color: var(--navy);
}

.form-status.is-error {
  color: var(--accent);
}

/* Footer (no accent color here) */

.site-footer {
  background: var(--footer);
  color: var(--light-gray);
  padding: 48px 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.site-footer a {
  color: var(--light-gray);
  display: block;
  margin-bottom: 6px;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer a:focus-visible {
  outline-color: #fff;
}

.footer-logo {
  display: inline-block;
  background: var(--panel);
  padding: 10px 14px;
  border-radius: 6px;
  line-height: 0;
  margin-bottom: 14px;
}

/* Full Signature at about 290px wide so the tagline stays readable. */
.footer-logo img {
  height: 90px;
  width: auto;
}

.footer-heading {
  color: #fff;
  font-weight: 700;
  margin-bottom: 8px;
}

.copyright {
  color: var(--light-gray);
  margin: 0;
}

/* Small screens */

@media (max-width: 960px) {
  .cards-4,
  .topics {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 10px 0;
    width: 100%;
  }

  .site-nav .btn-small {
    width: auto;
    margin-top: 8px;
    padding: 10px 16px;
  }

  .hero,
  .section {
    padding: 48px 0;
  }

  .hero-inner,
  .split,
  .columns-2,
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-mark {
    min-height: 200px;
  }

  .cards-3,
  .cards-4,
  .topics {
    grid-template-columns: 1fr;
  }
}

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

/* Privacy page */

.prose-page {
  max-width: 760px;
}

.prose-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.5rem;
}

.updated {
  color: var(--slate);
  font-size: 0.9rem;
}
