:root {
  /* Systems in a Byte tokens — see brand-tokens skill / brand-tokens.md. Do not reuse Systamize purple/yellow here. */
  --green: #AAFF91;
  --blue: #274DEA;
  --blue-light: #9CAFFF;
  --green-tint: #EEFFE9;
  --blue-tint: #D4DBFB;
  --bg: #F6F6F5;      /* grey #AAAA98 @ 10% */
  --card-bg: #F2F2F0; /* grey #AAAA98 @ 15% */
  --dark: #1A1918;
  --mid: #6B6B63;

  --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}

p { margin: 0 0 1rem; color: var(--mid); }

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

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  text-align: left;
  flex: 1 0 auto;
  width: 100%;
}

/* Header / logo */
.site-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3.5rem;
}

.site-header img {
  width: 52px;
  height: 52px;
  display: block;
}

/* Animated logo walk-in — from logo-morph-animation.html. CSS-only (plays once
   on load without JS); JS is only used for the hover-to-replay convenience.
   Falls back to the static SVG via <noscript> if JS is disabled. */
.logo-morph {
  position: relative;
  width: 52px;
  height: 52px;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-morph svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.logo-morph .ground {
  stroke: #0a0a0a;
  stroke-width: 16;
  stroke-linecap: round;
  animation: logoGroundFade 2.3s ease forwards;
}
.logo-morph .cat-rig {
  animation: logoWalkTranslate 2.3s ease forwards;
}
.logo-morph .leg {
  transform-box: fill-box;
  transform-origin: 50% 0%;
}
.logo-morph .leg-a,
.logo-morph .leg-c {
  animation: logoLegSetAC 2.3s ease forwards;
}
.logo-morph .leg-b,
.logo-morph .leg-d {
  animation: logoLegSetBD 2.3s ease forwards;
}
.logo-morph .scene {
  transform-origin: 0px 0px;
  animation: logoSceneZoom 2.3s ease forwards;
}
.logo-morph .logo-full {
  animation: logoFullFadeOut 2.3s ease forwards;
}
.logo-morph .logo-square {
  clip-path: inset(50% 0 50% 0);
  animation: logoSquareReveal 2.3s ease forwards;
}

@keyframes logoWalkTranslate {
  0%    { transform: translate(-320px, 0px); }
  5.5%  { transform: translate(-280px, -5px); }
  11%   { transform: translate(-240px, 0px); }
  16.5% { transform: translate(-200px, -5px); }
  22%   { transform: translate(-160px, 0px); }
  27.5% { transform: translate(-120px, -5px); }
  33%   { transform: translate(-80px, 0px); }
  38.5% { transform: translate(-40px, -5px); }
  44%   { transform: translate(0px, 0px); }
  100%  { transform: translate(0px, 0px); }
}
@keyframes logoLegSetAC {
  0%    { transform: rotate(0deg); }
  5.5%  { transform: rotate(16deg); }
  11%   { transform: rotate(0deg); }
  16.5% { transform: rotate(-16deg); }
  22%   { transform: rotate(0deg); }
  27.5% { transform: rotate(16deg); }
  33%   { transform: rotate(0deg); }
  38.5% { transform: rotate(-16deg); }
  44%   { transform: rotate(0deg); }
  100%  { transform: rotate(0deg); }
}
@keyframes logoLegSetBD {
  0%    { transform: rotate(0deg); }
  5.5%  { transform: rotate(-16deg); }
  11%   { transform: rotate(0deg); }
  16.5% { transform: rotate(16deg); }
  22%   { transform: rotate(0deg); }
  27.5% { transform: rotate(-16deg); }
  33%   { transform: rotate(0deg); }
  38.5% { transform: rotate(16deg); }
  44%   { transform: rotate(0deg); }
  100%  { transform: rotate(0deg); }
}
@keyframes logoGroundFade {
  0%, 44%   { opacity: 1; }
  62%, 100% { opacity: 0; }
}
@keyframes logoSceneZoom {
  0%, 48%  { transform: translate(0px, 0px) scale(1); }
  66%, 100% { transform: translate(-949.7px, -343.3px) scale(2.096); }
}
@keyframes logoFullFadeOut {
  0%, 71%  { opacity: 1; }
  82%, 100% { opacity: 0; }
}
@keyframes logoSquareReveal {
  0%, 66%  { clip-path: inset(50% 0 50% 0); }
  70%, 100% { clip-path: inset(0% 0 0% 0); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-morph * { animation: none !important; }
  .logo-morph .logo-full { opacity: 0; }
  .logo-morph .ground { opacity: 0; }
  .logo-morph .logo-square { opacity: 1; }
}

.bg-optin { background: #F2F2F0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
  background: var(--green);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

/* Big, bold, agency-style headline */
h1 {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-weight: 900;
  max-width: 11ch;
}

/* Wraps the line containing an enlarged <mark> so its box-model height matches
   a normal line, regardless of the bigger font's ascent/descent. The oversized
   text overflows visually without pushing sibling lines apart. */
h1 .tight-line {
  display: inline-flex;
  align-items: center;
  height: 1.02em;
  overflow: visible;
  width: 100%;
}

h1 mark {
  background-color: transparent;
  background-image: linear-gradient(var(--green), var(--green));
  background-repeat: no-repeat;
  background-size: 100% 0.72em;
  background-position: 0 74%;
  color: var(--dark);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.12em;
  padding: 0 0.15em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.standfirst {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--dark);
  max-width: 46ch;
  margin: 1.75rem 0 0;
  font-weight: 500;
}

.card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.75rem 1.75rem 1.75rem 0;
  margin-top: 2.5rem;
  max-width: 460px;
}

/* Kit embed — restyled to match the brand (green/dark, rounded, Inter body) */
.kit-embed {
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.25rem 1rem;
  background: var(--green-tint);
}

.kit-embed .formkit-form { max-width: none !important; }

.kit-embed .formkit-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 !important;
}

.kit-embed .formkit-field,
.kit-embed .formkit-submit {
  flex: none !important;
  margin: 0 !important;
}

.kit-embed .formkit-input {
  height: 44px;
  width: 100%;
  border-radius: 8px !important;
  border: 1.5px solid transparent !important;
  background: #fff !important;
  color: var(--dark) !important;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400 !important;
  padding: 0 0.9rem;
}

.kit-embed .formkit-input:focus {
  border-color: var(--blue) !important;
  outline: none;
}

.kit-embed .formkit-input::placeholder {
  color: var(--mid) !important;
  opacity: 1;
}

.kit-embed .formkit-submit {
  height: 44px;
  width: 100%;
  border-radius: 8px !important;
  background: var(--green) !important;
  color: var(--dark) !important;
  font-family: var(--font-heading);
  font-weight: 700 !important;
  font-size: 0.95rem;
  border: none;
}

.kit-embed .formkit-submit > span {
  padding: 0 !important;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kit-embed .formkit-alert-error {
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 0 0 0.75rem !important;
}

.kit-embed .formkit-alert-success {
  font-size: 0.95rem;
  font-weight: 700 !important;
  color: var(--dark) !important;
  background: none !important;
  border: none !important;
  margin: 0 !important;
}

.kit-embed .formkit-powered-by-convertkit-container { margin: 0.75rem 0 0 !important; }

.kit-embed .formkit-powered-by-convertkit {
  font-size: 0.75rem !important;
  color: #EEFFE9 !important;
  text-decoration: none !important;
  background: none !important;
  width: auto !important;
  height: auto !important;
}

.consent {
  font-size: 0.8rem;
  color: var(--mid);
  margin-top: 1rem;
}

.consent a { color: var(--mid); text-decoration: underline; }

footer {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  font-size: 0.8rem;
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand-credit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-credit img {
  width: 20px;
  height: 20px;
  display: block;
}

.brand-credit a {
  color: var(--mid);
  font-size: 0.8rem;
  text-decoration: none;
}

.brand-credit a:hover { text-decoration: underline; }

/* Hub */
#resources { margin-top: 2.5rem; }

.resource-group { margin-top: 2.5rem; }
.resource-group h2 {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.85rem;
  text-decoration: none;
  color: var(--dark);
  border: 1.5px solid var(--card-bg);
  box-shadow: 0 1px 2px rgba(26, 25, 24, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.resource-link:hover {
  border-color: var(--green);
  box-shadow: 0 6px 16px rgba(26, 25, 24, 0.09);
  transform: translateY(-1px);
}

.resource-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.resource-icon svg {
  width: 100%;
  height: 100%;
}

.resource-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.resource-link .title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  display: block;
  margin-bottom: 0.2rem;
}

.resource-link .desc {
  font-size: 0.9rem;
  color: var(--mid);
}

.resource-link .arrow {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--blue);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.resource-link:hover .arrow { transform: translateX(4px); }

.state-message {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--green-tint);
  font-size: 0.9rem;
  color: var(--dark);
  max-width: 460px;
}

.state-message.error { background: #FDEBEA; color: #7A2E27; }

/* Privacy page headings, dialed down from hero scale */
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); max-width: none; margin-bottom: 0.5rem; }
.doc h3 { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; margin: 2rem 0 0.5rem; }

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mid);
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.back-link:hover { color: var(--blue); }

.doc > .back-link:last-of-type { margin-top: 2rem; margin-bottom: 0; }
