/* =========================================================
   ARCHANGELS — brand tokens & type system
   Derived from Interim Brand Guidelines v1
   ========================================================= */

@font-face {
  font-family: "Relative";
  src: url("../fonts/relative-book.woff2") format("woff2"),
       url("../fonts/relative-book.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Relative";
  src: url("../fonts/relative-bold.woff2") format("woff2"),
       url("../fonts/relative-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand core */
  --day-blue: #C3D9DC;
  --night-blue: #131736;
  --day-blue-deep: #A9C5C9;  /* derived, for hover/borders on day bg */
  --night-blue-soft: #1e2346; /* derived, for subtle depth on night bg */

  /* paper tones derived from Day Blue */
  --paper: #E6EEF0;
  --paper-warm: #F1EDE7;   /* Colorplan Cool Blue vibe, warmer */
  --ink: #131736;
  --ink-60: rgba(19, 23, 54, 0.6);
  --ink-40: rgba(19, 23, 54, 0.4);
  --ink-20: rgba(19, 23, 54, 0.2);
  --ink-12: rgba(19, 23, 54, 0.12);
  --ink-08: rgba(19, 23, 54, 0.08);

  /* signal (for intensity data only — not decoration) */
  --signal-clear: #C3D9DC;   /* clear */
  --signal-yellow: #F1AE4B;  /* yellow */
  --signal-red: #EA3744;     /* red */

  /* scale (based on 100% = body = 16px; matches BG rules) */
  --step-small: 0.75rem;     /* 12px — captions */
  --step-body: 1rem;          /* 16px — body */
  --step-head: 2rem;          /* 32px — headline */
  --step-statement: 4rem;    /* 64px — statement */
  --step-display: 6.5rem;    /* 104px — hero */

  /* layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--day-blue);
  color: var(--ink);
  font-family: "Relative", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ===== type roles ===== */
.t-display {
  font-weight: 700;
  font-size: clamp(3rem, 8vw, var(--step-display));
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.t-statement {
  font-weight: 700;
  font-size: clamp(2.25rem, 5.2vw, var(--step-statement));
  line-height: 1;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.t-head {
  font-weight: 400;
  font-size: clamp(1.35rem, 2.4vw, var(--step-head));
  line-height: 1.1;
}
.t-body {
  font-weight: 400;
  font-size: var(--step-body);
  line-height: 1.45;
  text-wrap: pretty;
  max-width: 60ch;
}
.t-caption {
  font-weight: 400;
  font-size: var(--step-small);
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* arrow bullet list per guidelines */
.t-arrows {
  list-style: none;
  padding: 0;
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.35;
}
.t-arrows li {
  padding-left: 1.5em;
  position: relative;
  margin: 0 0 0.35em 0;
}
.t-arrows li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
}

/* ===== surfaces ===== */
.surface-day   { background: var(--day-blue); color: var(--ink); }
.surface-night { background: var(--night-blue); color: var(--day-blue); }
.surface-paper { background: var(--paper); color: var(--ink); }
.surface-warm  { background: var(--paper-warm); color: var(--ink); }

.surface-night .t-caption { color: rgba(195,217,220,0.7); }

/* ===== container ===== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===== section ===== */
section {
  padding: clamp(64px, 9vw, 140px) 0;
}

/* ===== buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1.1em 1.6em;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary-night {
  background: var(--night-blue);
  color: var(--day-blue);
  border-color: var(--night-blue);
}
.btn-primary-night:hover { background: #000; border-color: #000; }
.btn-primary-day {
  background: var(--day-blue);
  color: var(--night-blue);
  border-color: var(--day-blue);
}
.btn-primary-day:hover { background: #fff; border-color: #fff; }
.btn-ghost-night { color: var(--night-blue); border-color: var(--night-blue); }
.btn-ghost-night:hover { background: var(--night-blue); color: var(--day-blue); }
.btn-ghost-day { color: var(--day-blue); border-color: var(--day-blue); }
.btn-ghost-day:hover { background: var(--day-blue); color: var(--night-blue); }

.btn .arrow { display: inline-block; transition: transform 180ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ===== nav (logo-right layout, brand-aligned) ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--day-blue);
  border-bottom: 1px solid var(--ink-20);
}
.nav.surface-night {
  background: var(--night-blue);
  border-bottom: 1px solid rgba(195,217,220,0.20);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 26px;
  justify-self: start;
}
.nav-primary a {
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--night-blue);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 150ms ease;
}
.nav.surface-night .nav-primary a { color: var(--day-blue); }
.nav-primary a:hover, .nav-primary a.active { border-bottom-color: currentColor; }

/* primary-nav dropdown */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a { display: inline-flex; align-items: center; gap: 7px; }
.nav-caret { font-size: 0.62em; opacity: 0.65; transition: transform 160ms ease; transform: translateY(1px); }
.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret { transform: translateY(1px) rotate(180deg); opacity: 1; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -14px;
  min-width: 246px;
  margin-top: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--paper);
  border: 1px solid var(--ink-12);
  border-radius: 5px;
  box-shadow: 0 20px 48px rgba(19,23,54,0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 170ms ease, transform 170ms ease, visibility 170ms;
  z-index: 30;
}
/* invisible bridge so the menu doesn't close in the gap */
.nav-dropdown::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a {
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--night-blue) !important;
  padding: 12px 14px;
  border-radius: 3px;
  border-bottom: 0 !important;
  white-space: nowrap;
  transition: background 150ms ease;
}
.nav-dropdown a:hover { background: var(--day-blue); }

.nav-ctas { display: flex; gap: 10px; justify-self: end; align-items: center; }
.nav-ctas .btn { padding: 0.7em 1.1em; font-size: 0.75rem; }

.nav-logo {
  display: flex;
  align-items: center;
  justify-self: center;
}
.nav-logo img { width: clamp(150px, 12vw, 195px); height: auto; max-width: 100%; display: block; }
.nav.surface-night .nav-logo img { filter: brightness(0) invert(1) sepia(0.05); }

.nav-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid currentColor;
  padding: 0.6em 0.9em;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
}
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 0 var(--gutter) 16px;
  border-top: 1px solid var(--ink-12);
}
.nav.surface-night .nav-drawer { border-top-color: rgba(195,217,220,0.15); }
.nav-drawer.open {
  display: flex;
  max-height: calc(100dvh - 66px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.nav-drawer .drawer-group {
  padding: 9px 0;
  border-bottom: 1px solid var(--ink-12);
}
.nav.surface-night .nav-drawer .drawer-group { border-bottom-color: rgba(195,217,220,0.15); }
.nav-drawer .drawer-head {
  display: block;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 0;
}
.nav-drawer .drawer-head.active { opacity: 0.55; }
.nav-drawer .drawer-sub {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  padding-left: 14px;
  border-left: 2px solid var(--ink-12);
}
.nav.surface-night .nav-drawer .drawer-sub { border-left-color: rgba(195,217,220,0.2); }
.nav-drawer .drawer-sub a {
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  text-transform: none;
  opacity: 0.72;
  padding: 5px 0;
}
.nav-drawer .drawer-sub a:hover { opacity: 1; }
.nav-drawer .drawer-ctas {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  margin: 2px 0 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-12);
}
.nav.surface-night .nav-drawer .drawer-ctas { border-bottom-color: rgba(195,217,220,0.15); }
.nav-drawer .drawer-ctas .btn { flex: 1 1 0; min-width: 0; text-align: center; font-size: 0.7rem; padding: 0.7em 0.9em; }

@media (max-width: 1280px) {
  .nav-inner { gap: 18px; }
  .nav-primary { gap: 18px; }
  .nav-primary a { font-size: 0.625rem; letter-spacing: 0.07em; }
  .nav-ctas { gap: 8px; }
  .nav-ctas .btn { font-size: 0.7rem; padding: 0.6em 0.8em; }
  .nav-logo img { width: clamp(140px, 12vw, 185px); }
}
@media (max-width: 1120px) {
  .nav-inner { grid-template-columns: 1fr auto 1fr; gap: 16px; padding: 16px var(--gutter); }
  .nav-primary, .nav-ctas { display: none; }
  .nav-menu-btn { display: inline-flex; grid-column: 3; justify-self: end; }
  .nav-logo { grid-column: 2; justify-self: center; }
  .nav-logo img { width: min(180px, 48vw); height: auto; }
}

/* ===== footer ===== */
.footer {
  background: var(--night-blue);
  color: var(--day-blue);
  padding: 80px 0 40px;
}
.footer .grid {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 56px;
  align-items: start;
  margin-bottom: 60px;
}
@media (max-width: 760px) {
  .footer { padding: 56px 0 36px; }
  .footer .grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
    margin-bottom: 44px;
  }
  /* intro paragraph + CTAs get their own full-width row */
  .footer .grid > div:first-child { grid-column: 1 / -1; }
}
.footer h5 {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin: 0 0 10px; font-size: 0.95rem; }
.footer ul li a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-top: 32px;
  border-top: 1px solid rgba(195,217,220,0.15);
  font-size: 0.8rem;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  display: block;
  margin: 0 0 40px;
  width: 100%;
  max-width: 270px;
}
.footer-logo img { width: 100%; height: auto; display: block; }

/* ===== Footer socials ===== */
.footer-socials {
  display: flex; gap: 12px; align-items: center;
  margin-top: 28px;
}
.footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--day-blue);
  opacity: 0.7;
  transition: opacity 180ms ease, background 180ms ease, color 180ms ease;
}
.footer-socials a:hover { opacity: 1; background: var(--day-blue); color: var(--night-blue); }
.footer-socials svg { width: 18px; height: 18px; display: block; fill: currentColor; }

/* stack the footer bottom bar cleanly on phones (after base rules so it wins) */
@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-socials { margin-top: 0; order: -1; }
}

/* ===== eyebrow ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

/* ===== rule / divider ===== */
.rule { border: 0; height: 1px; background: currentColor; opacity: 0.15; margin: 0; }

/* ===== card ===== */
.card {
  background: var(--paper);
  padding: 32px;
  border: 1px solid var(--ink-08);
}
.surface-night .card {
  background: var(--night-blue-soft);
  border-color: rgba(195,217,220,0.12);
}

/* ===== utility ===== */
.stack-6 > * + * { margin-top: 6px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-20 > * + * { margin-top: 20px; }
.stack-32 > * + * { margin-top: 32px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-12 { gap: 12px; }
.gap-20 { gap: 20px; }
.gap-40 { gap: 40px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 32px; }
.mt-60 { margin-top: 60px; }
.mt-80 { margin-top: 80px; }

/* ===== placeholder imagery ===== */
.img-ph {
  position: relative;
  background-color: var(--ink-08);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 10px,
    rgba(19,23,54,0.06) 10px 20px
  );
  border: 1px solid var(--ink-12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-ph .label {
  font-family: "Relative", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-60);
  padding: 8px 12px;
  background: rgba(230,238,240,0.85);
  border: 1px solid var(--ink-12);
}
.surface-night .img-ph {
  background-color: rgba(195,217,220,0.05);
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 10px,
    rgba(195,217,220,0.06) 10px 20px
  );
  border-color: rgba(195,217,220,0.15);
}
.surface-night .img-ph .label {
  background: rgba(19,23,54,0.85);
  color: rgba(195,217,220,0.7);
  border-color: rgba(195,217,220,0.2);
}

/* tiny pulse for live data */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ============================================================
   Contact / Demo modal
   ============================================================ */
.aa-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}
.aa-modal.open { pointer-events: auto; opacity: 1; }
.aa-modal-scrim {
  position: absolute; inset: 0;
  background: rgba(13, 16, 49, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.aa-modal-card {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--paper);
  color: var(--night-blue);
  border: 1px solid var(--night-blue);
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(13,16,49,0.35);
  transform: translateY(8px);
  transition: transform 220ms ease;
}
.aa-modal.open .aa-modal-card { transform: translateY(0); }
.aa-modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 36px; height: 36px;
  background: transparent; border: 0;
  font-size: 28px; line-height: 1;
  color: var(--night-blue); opacity: 0.6;
  cursor: pointer;
  z-index: 2;
}
.aa-modal-close:hover { opacity: 1; }
.aa-modal-body { padding: 40px 40px 36px; }
.aa-modal-intro { margin: 0 0 24px; }
.aa-modal-intro h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.1;
  margin: 12px 0 8px;
}
.aa-modal-intro p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.75;
  max-width: 48ch;
}
.aa-form {
  display: flex; flex-direction: column; gap: 14px;
}
.aa-row { display: flex; gap: 14px; }
.aa-row-2 > * { flex: 1; min-width: 0; }
@media (max-width: 540px) { .aa-row-2 { flex-direction: column; } }
.aa-honey {
  position: absolute !important;
  left: -10000px; top: -10000px;
  width: 1px; height: 1px; opacity: 0;
}
.aa-field {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.95rem;
}
.aa-field > span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 500;
}
.aa-field input,
.aa-field select,
.aa-field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--night-blue);
  background: #fff;
  border: 1px solid var(--ink-25, rgba(13,16,49,0.25));
  border-radius: 3px;
  padding: 11px 12px;
  width: 100%;
  outline: none;
  transition: border-color 160ms ease;
}
.aa-field input:focus,
.aa-field select:focus,
.aa-field textarea:focus {
  border-color: var(--night-blue);
}
.aa-field textarea { resize: vertical; min-height: 88px; }
.aa-form-foot {
  display: flex; align-items: center; gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.aa-status {
  font-size: 0.85rem;
  opacity: 0.75;
}
.aa-success { padding: 8px 0 4px; }
.aa-success h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 12px 0 12px;
  line-height: 1.1;
}
.aa-success p { opacity: 0.8; max-width: 46ch; margin: 0 0 22px; }
