:root {
  --bg: #15171b;
  --text: #E6EDF3;
  --text-dim: #B6BDC5;
  --text-mute: #8A929B;
  --border: #2a2e36;
  --accent: #E6EDF3;
  --accent-hover: #ffffff;
  --maxw: 1140px;
  --ease: cubic-bezier(.2,.7,.2,1);
  /* RGB chromatic-aberration channels for the A+M logo */
  --ca-red: #ff0000;
  --ca-green: #00ff00;
  --ca-blue: #0000ff;
  --ca-duration: 1.4s;
  --ca-easing: cubic-bezier(0, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { display: flex; flex-direction: column; min-height: 100vh; justify-content: center; }
main { width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 720px) {
  .container { padding: 0 32px; }
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #000; padding: 8px 12px; border-radius: 6px;
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Brand (logo + wordmark) ---------- */
.brand {
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-logo {
  display: inline-block;
  height: 1em;
  width: auto;
  vertical-align: 0;
  margin-right: 12px;
  color: var(--text);
}

/* Hero brand — A+M name, italic, slightly smaller and lighter than baseline */
.brand-hero {
  font-style: italic;
  font-size: 0.9em;
  font-weight: 300;
  position: relative;
  top: -1px;
}
.brand-hero .brand-logo.logo-ca {
  position: relative;
  top: 0.5px;
  display: inline-block;
  height: 0.9em;
  aspect-ratio: 7221 / 3612;
  width: auto;
  vertical-align: 0;
  isolation: isolate;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  --scan-alpha: 0;
}
.brand-hero .brand-logo.logo-ca .ch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: plus-lighter;
  transform-origin: center;
  will-change: transform;
  -webkit-mask-image: repeating-linear-gradient(to bottom, rgba(0,0,0,var(--scan-alpha)) 0 1.5px, #000 1.5px 3px);
          mask-image: repeating-linear-gradient(to bottom, rgba(0,0,0,var(--scan-alpha)) 0 1.5px, #000 1.5px 3px);
}
.brand-hero .brand-logo.logo-ca .ch-r {
  color: var(--ca-red);
  animation: ca-resolve-r var(--ca-duration) var(--ca-easing) 0s both;
}
.brand-hero .brand-logo.logo-ca .ch-g {
  color: var(--ca-green);
  animation: ca-resolve-g var(--ca-duration) var(--ca-easing) 0.08s both;
}
.brand-hero .brand-logo.logo-ca .ch-b {
  color: var(--ca-blue);
  animation: ca-resolve-b var(--ca-duration) var(--ca-easing) 0.16s both;
}

@keyframes ca-resolve-r {
  0%   { transform: scale(1.1) translate(-20px, 0px) rotate(-2deg); }
  100% { transform: scale(1)   translate(-1px, 1px)       rotate(0deg); }
}
@keyframes ca-resolve-g {
  0%   { transform: scale(1.2) translate(0px, 0px)   rotate(0deg); }
  100% { transform: scale(1)   translate(0, 1px)       rotate(0deg); }
}
@keyframes ca-resolve-b {
  0%   { transform: scale(1.1) translate(20px, 0px)  rotate(2deg); }
  100% { transform: scale(1)   translate(1px, 1px)       rotate(0deg); }
}

/* Sub-brand — Blitter link, monochrome */
.brand-sub { color: var(--text); }
.brand-sub:hover { color: var(--text); }
.brand-logo-sm {
  height: 1.173em;
  margin-right: 10px;
  vertical-align: -0.24em;
}

/* ---------- Entrance: drift-in for hero text + Blitter ---------- */
.brand-name,
.tagline-lead,
.brand-sub > span {
  display: inline-block;
}
.brand-name,
.tagline-lead,
.brand-sub .brand-logo-sm,
.brand-sub > span {
  animation-name: drift-in;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}
.brand-name               { animation-delay: 0s;   animation-duration: 1.7s; word-spacing: -0.07em; }
.tagline-lead             { animation-delay: 0.1s; animation-duration: 1.6s; }
.brand-sub .brand-logo-sm { animation-delay: 0.2s; animation-duration: 1.5s; }
.brand-sub > span         { animation-delay: 0.3s; animation-duration: 1.4s; }

@keyframes drift-in {
  0%   { transform: translateX(14px); opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 0;
  text-align: left;
}
.hero-line {
  margin: 0;
  font-size: 40px;
  line-height: 1.4;
}
.tagline-lead {
  font-size: 0.55em;
  font-weight: 300;
  color: #808080;
  margin: 0 14px;
}

@media (max-width: 720px) {
  .hero-line { font-size: 32px; }
  .brand-hero { font-size: 0.945em; }
  .brand-sub  { font-size: 1.05em; }
}
@media (max-width: 480px) {
  .hero-line { font-size: 38px; }
}
@media (max-width: 380px) {
  .hero-line { font-size: 32px; }
}

/* ---------- Footer ---------- */
footer {
  padding: 0; color: var(--text-mute); font-size: 14px;
}
.foot-divider {
  border: 0; border-top: 1.5px solid #999;
  margin: 7px auto 16px; max-width: var(--maxw);
  width: calc(100% - 48px);
}
@media (max-width: 720px) {
  .foot-divider { width: calc(100% - 64px); }
}
.foot-bottom {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.foot-copy { color: #4d4d4d; }
.foot-copy a { color: #4d4d4d; }
.copy-name { color: #b3b3b3; }
.copy-rights { color: #808080; }
.foot-contact {
  display: flex; flex-direction: column;
  gap: 4px;
  text-align: right;
  color: var(--text-mute);
}
.foot-contact a { color: var(--text-mute); }
.foot-contact a:hover { color: var(--text); }
.heart {
  color: #b3b3b3;
  display: inline-block;
  transform-origin: center;
  animation: heartbeat 3.55s ease-in-out 1.1s both;
}
@keyframes heartbeat {
  0%     { transform: scale(1);    color: #b3b3b3; }
  2.5%   { color: #ff2d55; }
  /* heartbeat 1: da-dum */
  3.7%   { transform: scale(1.18); }
  7.5%   { transform: scale(1); }
  10.6%  { transform: scale(1.5); }
  17.3%  { transform: scale(1); }
  /* diastole / pause — hold flat */
  29.7%  { transform: scale(1); }
  /* heartbeat 2: da-dum */
  31%    { transform: scale(1.26); }
  36%    { transform: scale(1); }
  40.3%  { transform: scale(1.5); }
  47.1%  { transform: scale(1); }
  /* diastole / pause — hold flat */
  60.7%  { transform: scale(1); }
  /* heartbeat 3: da-dum */
  62%    { transform: scale(1.26); }
  67%    { transform: scale(1); }
  71.4%  { transform: scale(1.5); }
  78.1%  { transform: scale(1); color: #ff2d55; }
  /* hold red 0.25s longer, then fade back to grey */
  85.2%  { color: #ff2d55; }
  100%   { transform: scale(1);    color: #b3b3b3; }
}
@media (max-width: 540px) {
  body { justify-content: flex-start; }
  main {
    flex: 0 0 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  footer {
    font-size: 18px;
    flex: 0 0 50vh;
    display: flex;
    flex-direction: column;
  }
  .foot-divider { margin-top: 0; }
  .foot-bottom { justify-content: flex-end; text-align: right; }
}

@media (max-width: 480px) {
  .hero { text-align: right; }
  .hero-line {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
  .tagline-lead {
    margin: 0 2px 0 0;
    font-size: 0.586em;
  }
}
