/* ===================================================
   Shared pieces, every width: navigation, pitch, method,
   TrackHub frames and the contact form.
   =================================================== */

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-secondary);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-nav ul,
.mobile-nav ul,
.site-footer ul {
  list-style: none;
}

/* The hero sentence is the page heading; its pieces keep their own type. */
.hero-title,
.why-title,
.mobile-why-title {
  font: inherit;
  font-weight: normal;
}

/* ===== Desktop navigation: the purple block, fixed ===== */
.site-nav {
  position: fixed;
  top: 0;
  right: max(0px, calc((100vw - 1920px) / 2));
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 26px;
  height: 60px;
  padding: 0 24px 0 40px;
  background: var(--color-purple);
  color: var(--color-white);
}

/* The pixel hanging off the block, as in the header art. */
.site-nav-pixel {
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 40px;
  height: 40px;
  background: var(--color-purple);
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav-link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  color: inherit;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}

/* A cyan scan line draws under the link. */
.site-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav-link:hover::after,
.site-nav-link:focus-visible::after { transform: scaleX(1); }

/* "Contato" is a white pixel block with a blinking cyan corner; on hover it
   lifts off its dark-blue pixel shadow. */
.site-nav-link--cta {
  padding: 8px 16px;
  background: var(--color-white);
  color: var(--color-purple);
  box-shadow: 0 0 0 var(--color-darkblue);
  transition: translate 0.2s ease, box-shadow 0.2s ease;
}
.site-nav-link--cta::after { display: none; }
.site-nav-link--cta::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--color-cyan);
  animation: blink 1s step-start infinite;
}
.site-nav-link--cta:hover,
.site-nav-link--cta:focus-visible {
  translate: -3px -3px;
  box-shadow: 3px 3px 0 var(--color-darkblue);
}
.site-nav-link--cta:active {
  translate: 0 0;
  box-shadow: 0 0 0 var(--color-darkblue);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
}
.lang-switch a {
  display: inline-block;
  padding: 6px 6px;
  /* 0.9: still AA on the purple bars. */
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}
.lang-switch a:hover { color: var(--color-white); }
.lang-switch a[aria-current="page"] {
  color: var(--color-white);
  box-shadow: inset 0 -2px 0 var(--color-cyan);
}

/* Languages in the bars: a button with the current one; the others slide
   out beside it (to its left, so the button stays under the finger). */
.lang-menu {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border: 0;
  background: none;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  cursor: pointer;
}
.lang-toggle-pixel {
  width: 8px;
  height: 8px;
  background: var(--color-cyan);
  transition: rotate 0.3s ease, background 0.3s ease;
}
.lang-toggle:hover .lang-toggle-pixel { background: var(--color-white); }
.lang-menu.is-open .lang-toggle-pixel {
  rotate: 45deg;
  background: var(--color-white);
}

.lang-options {
  display: grid;
  grid-template-columns: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-columns 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              visibility 0s linear 0.35s;
}
.lang-options .lang-switch {
  min-width: 0;
  overflow: hidden;
}
/* The current language is on the button already. */
.lang-options li:has(> [aria-current="page"]) { display: none; }
.lang-menu.is-open .lang-options {
  grid-template-columns: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-columns 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease 0.05s,
              visibility 0s;
}

.site-nav a:focus-visible,
.site-nav button:focus-visible,
.mobile-nav a:focus-visible,
.mobile-nav button:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
}

/* ===== Pitch: everything is connected =====
   White, like the end of "Por quê?". Loose blocks drift over a living web
   of pixels and cyan lines, drawn on a canvas by landing.js. Top to bottom
   up to tablets, left to right on desktop. */
.pitch {
  position: relative;
  overflow: hidden;
  padding: 64px 24px 80px;
  background: var(--color-white);
  color: var(--color-dark);
}

.pitch-art span { position: absolute; }
.pitch-line {
  display: none;
  top: 0;
  width: 2px;
  height: 120px;
  background: var(--color-cyan);
}
.pitch-line--80 { left: 80px; }
.pitch-line--278 { left: 284px; }

.pitch-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.pitch-title {
  max-width: 760px;
  font-family: var(--font-primary);
  font-size: 2.25rem;
  font-weight: 100;
  line-height: 1.1;
}
.pitch-accent { color: var(--color-purple); }

.pitch-text {
  max-width: 560px;
  margin-top: 20px;
  font-family: var(--font-secondary);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-grey-dark);
}

.pitch-graph {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 8 / 11;
  margin: 40px auto 0;
}

/* The web runs past the graph and fades out at its edges. */
.pitch-web {
  position: absolute;
  top: -48px;
  left: -64px;
  width: calc(100% + 128px);
  height: calc(100% + 96px);
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 75%, transparent);
  mask-image: radial-gradient(closest-side, #000 75%, transparent);
}

/* A block, centred on its point (--x, --y) and drifting around it. */
.pitch-node {
  --node-color: var(--color-black);
  position: absolute;
  top: var(--y);
  left: var(--x);
  padding: 8px 12px;
  background: var(--node-color);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  translate: -50% -50%;
  transition: scale 0.25s ease, opacity 0.3s ease;
  animation: pitch-drift var(--drift) ease-in-out var(--drift-delay) infinite alternate;
}
/* Its pixel, as on "PIXYZ." above. */
.pitch-node::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 8px;
  height: 8px;
  background: var(--node-color);
}

.pitch-node--data {
  --node-color: var(--color-purple);
  --x: 50%; --y: 5%;
  --i: 0; --dx: 6px; --dy: -5px; --drift: 6.4s; --drift-delay: -1s;
}
/* People are not one more number: an outlined block. */
.pitch-node--people {
  --node-color: var(--color-purple);
  --x: 50%; --y: 22%;
  --i: 1; --dx: 7px; --dy: -6px; --drift: 6.9s; --drift-delay: -3.4s;
  border: 2px solid var(--color-purple);
  background: var(--color-white);
  color: var(--color-purple);
}
.pitch-node--planning {
  --node-color: var(--color-darkblue);
  --x: 24%; --y: 38%;
  --i: 2; --dx: -8px; --dy: 6px; --drift: 7.6s; --drift-delay: -3s;
}
.pitch-node--operations {
  --x: 76%; --y: 38%;
  --i: 3; --dx: 7px; --dy: 6px; --drift: 7s; --drift-delay: -4.2s;
}
.pitch-node--revenue {
  --node-color: var(--color-blue);
  --x: 24%; --y: 58%;
  --i: 4; --dx: -6px; --dy: -8px; --drift: 6.8s; --drift-delay: -2.2s;
}
.pitch-node--cost {
  --node-color: var(--color-pink);
  --x: 76%; --y: 58%;
  --i: 5; --dx: 8px; --dy: -6px; --drift: 8s; --drift-delay: -5s;
  color: var(--color-dark);
}
.pitch-node--decisions {
  --node-color: var(--color-cyan);
  --x: 50%; --y: 76%;
  --i: 6; --dx: -7px; --dy: 7px; --drift: 6.6s; --drift-delay: -2.6s;
  color: var(--color-dark);
}
.pitch-node--result {
  --node-color: var(--color-purple);
  --x: 50%; --y: 93%;
  --i: 7; --dx: 5px; --dy: 5px; --drift: 7.2s; --drift-delay: -1.6s;
  padding: 10px 16px;
  font-size: 1.375rem;
  font-weight: 900;
}
/* The result blinks like the "Contato" block; its rings are on the canvas. */
.pitch-node--result::before {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--color-cyan);
  animation: blink 1s step-start infinite;
}
/* Pointing at a block dims the ones it does not link to (landing.js
   lights its wires). */
.pitch-graph.is-focus .pitch-node { opacity: 0.35; }
.pitch-graph.is-focus .pitch-node.is-near { opacity: 1; }
.pitch-node.is-active { scale: 1.08; }

/* landing.js holds the graph back until it is on screen: then the blocks
   pop in one by one and the wires fade in. */
.pitch-graph.is-waiting .pitch-node,
.pitch-graph.is-waiting .pitch-web { opacity: 0; }
.pitch-graph.is-in .pitch-node {
  animation:
    pitch-pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.35) calc(var(--i) * 90ms) backwards,
    pitch-drift var(--drift) ease-in-out var(--drift-delay) infinite alternate;
}
.pitch-graph.is-in .pitch-web { animation: pitch-fade 1s ease 0.3s backwards; }

@media (min-width: 640px) {
  .pitch { padding: 88px 40px 104px; }
  .pitch-title { font-size: 3rem; }
}

@media (min-width: 961px) {
  .pitch { padding: 128px 80px 72px 120px; }
  .pitch-line { display: block; }
  .pitch-copy {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: end;
    column-gap: 64px;
  }
  .pitch-title { font-size: clamp(2.625rem, 4.4vw, 4.5rem); }
  .pitch-text { margin-top: 0; font-size: 1.25rem; }
  .pitch-graph {
    max-width: none;
    height: clamp(380px, 34vw, 520px);
    aspect-ratio: auto;
    margin-top: 64px;
  }
  .pitch-node { padding: 10px 16px; font-size: 1.125rem; }
  /* Narrower on small desktops, so "+Resultados" keeps clear of its neighbour. */
  .pitch-node--result { padding: 12px 20px; font-size: clamp(1.25rem, 1.8vw, 1.625rem); }
  .pitch-node--data { --x: 7%; --y: 50%; }
  .pitch-node--people { --x: 30%; --y: 50%; }
  .pitch-node--planning { --x: 26%; --y: 16%; }
  .pitch-node--operations { --x: 24%; --y: 84%; }
  .pitch-node--revenue { --x: 48%; --y: 20%; }
  .pitch-node--cost { --x: 46%; --y: 80%; }
  .pitch-node--decisions { --x: 64%; --y: 50%; }
  .pitch-node--result { --x: 87%; --y: 50%; }
}

@keyframes pitch-drift {
  to { translate: calc(-50% + var(--dx)) calc(-50% + var(--dy)); }
}
@keyframes pitch-pop {
  from { opacity: 0; scale: 0.4; }
}
@keyframes pitch-fade {
  from { opacity: 0; }
}

/* ===== Method ===== */
.method {
  position: relative;
  overflow: hidden;
  padding: 96px 24px 104px;
  background: var(--color-black);
  color: var(--color-white);
}

.method-art span { position: absolute; }
.method-line {
  top: 0;
  width: 2px;
  height: 120px;
  background: var(--color-cyan);
}
.method-line--80 { left: 80px; }
.method-line--278 { left: 284px; }
.method-circle {
  top: -260px;
  right: -200px;
  width: 520px;
  height: 520px;
  border: 2px solid var(--color-cyan);
  border-radius: 50%;
}
.method-line,
.method-circle { display: none; }
.method-pixel { width: 40px; height: 40px; }
.method-pixel--purple { top: 0; right: 120px; background: var(--color-purple); }
.method-pixel--blue {
  bottom: 0;
  left: 0;
  background: var(--color-blue);
  animation: pixel-diagonal-slide 1s linear infinite;
}

.method-inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
}

.method-title {
  max-width: 900px;
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: 100;
  line-height: 1.1;
}
.method-title .light { color: rgba(255, 255, 255, 0.75); }
.method-accent { color: var(--color-purple); }

.method-intro {
  max-width: 620px;
  margin-top: 20px;
  font-family: var(--font-secondary);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.method-steps {
  position: relative;
  display: grid;
  gap: 48px;
  margin-top: 64px;
  list-style: none;
}

.method-step {
  --step-color: var(--color-purple);
  position: relative;
  padding-left: 64px;
}
.method-step--2 { --step-color: var(--color-blue); }
.method-step--3 { --step-color: var(--color-pink); }
.method-step--4 { --step-color: var(--color-cyan); }

/* The path: a cyan line linking the steps (vertical until two columns). */
.method-step::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -48px;
  left: 19px;
  width: 2px;
  background: var(--color-cyan);
  opacity: 0.6;
}
.method-step:last-child::before { bottom: 0; }

/* A pixel on the path, in the step color. It hops on hover (the stagger
   makes a wave along the path) and steps away from the pointer, a finger
   included (landing.js sets --push-x / --push-y). */
.method-step-pixel {
  position: absolute;
  top: 9px;
  left: 10px;
  width: 20px;
  height: 20px;
  background: var(--step-color);
  translate: var(--push-x, 0) var(--push-y, 0);
  transition: translate 0.3s ease;
}
.method-step--2 .method-step-pixel { --hop-delay: 70ms; }
.method-step--3 .method-step-pixel { --hop-delay: 140ms; }
.method-step--4 .method-step-pixel { --hop-delay: 210ms; }
.method-steps:hover .method-step-pixel {
  animation: pixel-hop 0.7s ease-out var(--hop-delay, 0ms);
}

@keyframes pixel-hop {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-12px); }
  55% { transform: translateY(3px); }
  75% { transform: translateY(-2px); }
}

/* Beside the pixel until four columns, where it goes below the line. */
.method-step-title {
  padding-top: 5px;
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.method-step-lead {
  margin-top: 10px;
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
}

.method-step-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  list-style: none;
  font-family: var(--font-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}
.method-step-list li {
  position: relative;
  padding-left: 18px;
}
/* Pixel bullets in the step color. */
.method-step-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--step-color);
}

.method-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 64px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-purple);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 1.375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.method-cta:hover,
.method-cta:focus-visible { border-color: var(--color-cyan); }
.method-cta:focus-visible { outline: 2px solid var(--color-cyan); outline-offset: 4px; }
.method-cta-pixel {
  width: 12px;
  height: 12px;
  background: var(--color-cyan);
  animation: blink 1s step-start infinite;
}

@media (min-width: 640px) {
  .method { padding: 112px 40px 120px; }
  .method-title { font-size: 3.25rem; }
  .method-steps { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .method-step::before { display: none; }
}

@media (min-width: 961px) {
  .method-line,
  .method-circle { display: block; }
  .method { padding: 128px 80px 136px 120px; }
  .method-title { font-size: 4.5rem; }
  .method-intro { font-size: 1.25rem; }
}

/* Four steps in a row: the path becomes one horizontal line through the
   pixels, with a white one travelling along it. */
@media (min-width: 1200px) {
  .method-steps {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 40px;
    padding-top: 0;
  }
  .method-steps::before {
    content: "";
    position: absolute;
    top: 19px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-cyan);
    opacity: 0.6;
  }
  .method-steps::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 0;
    width: 8px;
    height: 8px;
    z-index: 0;
    background: var(--color-white);
    animation: method-travel 6s linear infinite;
  }
  /* The line vibrates like a plucked string when the pointer comes in. */
  .method-steps:hover::before { animation: path-pluck 0.9s ease-out; }
  .method-step { z-index: 1; padding-left: 0; padding-top: 52px; }
  .method-step-pixel { top: 10px; left: 0; }
  /* Same height for titles and leads, so the four lists start aligned. */
  .method-step-title { min-height: 2.4em; }
  .method-step-lead { min-height: 3.1em; }
}

@keyframes path-pluck {
  0%, 100% { transform: translateY(0); }
  15% { transform: translateY(-4px); }
  35% { transform: translateY(3px); }
  55% { transform: translateY(-2px); }
  75% { transform: translateY(1px); }
}

@keyframes method-travel {
  from { transform: translateX(0); }
  to { transform: translateX(calc(min(1400px, 100vw - 200px) - 8px)); }
}

/* ===== TrackHub frames: a glance at the screens ===== */
.shot { margin: 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-window {
  position: relative;
  background: var(--color-dark);
  box-shadow: 14px 14px 0 var(--color-purple);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}
.shot-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
}
.shot-window-bar i {
  width: 8px;
  height: 8px;
  background: var(--color-purple);
}
.shot-window-bar i:nth-child(2) { background: var(--color-blue); }
.shot-window-bar i:nth-child(3) { background: var(--color-pink); }

.shot-phone {
  position: relative;
  padding: 7px;
  border-radius: 26px;
  background: var(--color-black);
  box-shadow: -14px 14px 0 var(--color-pink);
}
.shot-phone img { border-radius: 19px; }
/* The screens fade out at the bottom: a glance, not a tour. */
.shot-window::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(250, 250, 252, 0), rgba(250, 250, 252, 0.96));
}
.shot-phone::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  height: 38%;
  border-radius: 0 0 19px 19px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95));
}

.shot-card {
  padding: 10px;
  background: var(--color-white);
  box-shadow: 0 0 0 2px var(--color-grey), 14px 14px 0 var(--color-blue);
}

/* ===== Contact (the TrackHub contact section, in plain CSS) ===== */
.contact {
  --violet-50: #f5f3ff;
  --violet-400: #a684ff;
  --violet-500: #8e51ff;
  --violet-600: #7f22fe;
  --violet-700: #7008e7;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5dc;
  --gray-500: #6a7282;
  --gray-600: #4a5565;
  --gray-700: #364153;
  --gray-900: #101828;
  --teal-50: #f0fdfa;
  --teal-600: #009689;
  --red-50: #fef2f2;
  --red-200: #ffc9c9;
  --red-500: #fb2c36;
  --red-600: #e7000b;
  --red-700: #c10007;
  --lavender: #e6e4f4;
  scroll-margin-top: 72px;
  padding: 48px 16px;
  background: #fafafc;
  font-family: var(--font-secondary);
  color: var(--gray-900);
}

.contact-card {
  display: grid;
  max-width: 72rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--lavender);
  border-radius: 24px;
  background: var(--color-white);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--violet-50);
}

.contact-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--violet-700);
}

.contact-title {
  font-family: var(--font-primary);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

.contact-lead {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-700);
}

/* The Pixyz blocks in place of the TrackHub illustration (lg and up). */
.contact-art {
  position: relative;
  display: none;
  margin-top: auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.contact-art span { position: absolute; }
/* Slow, gentle motion, like the blinking pixel of the navbar (it all stops
   with reduced motion). */
.contact-art-block--purple {
  left: 0;
  bottom: 0;
  width: 46%;
  height: 38%;
  background: var(--color-purple);
  transform-origin: left bottom;
  animation: art-breathe 6s ease-in-out infinite alternate;
}
.contact-art-block--blue {
  left: 46%;
  bottom: 38%;
  width: 40px;
  height: 40px;
  background: var(--color-blue);
  animation: art-drift 4.5s ease-in-out infinite alternate;
}
.contact-art-block--pink {
  right: 12%;
  top: 12%;
  width: 22%;
  height: 30%;
  background: var(--color-pink);
  animation: art-float 5.5s ease-in-out infinite alternate;
}
/* A light pulse runs down the line. */
.contact-art-line {
  left: 30%;
  top: 0;
  width: 2px;
  height: 100%;
  overflow: hidden;
  background: var(--color-cyan);
}
.contact-art-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -30%;
  width: 100%;
  height: 30%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff, rgba(255, 255, 255, 0));
  animation: art-pulse 3.6s ease-in-out infinite;
}
/* A pixel travels along the visible arc. */
.contact-art-circle {
  right: -30%;
  bottom: -55%;
  width: 90%;
  aspect-ratio: 1;
  border: 2px solid var(--color-cyan);
  border-radius: 50%;
  animation: art-orbit 8s ease-in-out infinite alternate;
}
.contact-art-circle::after {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  left: -6px;
  width: 10px;
  height: 10px;
  background: var(--color-cyan);
}

@keyframes art-breathe {
  to { transform: scaleX(1.08); }
}
@keyframes art-drift {
  to { transform: translate(-10px, 10px); }
}
@keyframes art-float {
  to { transform: translateY(-12px); }
}
@keyframes art-pulse {
  to { top: 100%; }
}
@keyframes art-orbit {
  to { transform: rotate(80deg); }
}

.contact-mail {
  font-size: 0.875rem;
  color: var(--gray-700);
}
.contact-mail a {
  font-weight: 500;
  color: var(--violet-700);
  text-underline-offset: 2px;
  text-decoration: none;
}
.contact-mail a:hover { text-decoration: underline; }

.contact-main { padding: 24px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-form[hidden] { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field[hidden] { display: none; }

.field label,
.interests legend {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-900);
}

.field input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--color-white);
  color: var(--gray-900);
  font-family: var(--font-secondary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: var(--gray-500); }
.field input:focus {
  border-color: var(--violet-400);
  box-shadow: 0 0 0 1px var(--violet-400);
}
.field input[aria-invalid="true"] {
  border-color: var(--red-500);
}
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 1px var(--red-500); }

.field-row {
  display: grid;
  gap: 20px;
}

.interests {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.interests-hint {
  font-weight: 400;
  color: var(--gray-500);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 9999px;
  background: var(--color-white);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--gray-300); background: var(--gray-50); }
.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.chip:has(input:checked) {
  border-color: var(--violet-500);
  background: var(--violet-50);
  color: var(--violet-700);
}
.chip:has(input:focus-visible) {
  outline: 2px solid var(--violet-500);
  outline-offset: 2px;
}
.chip-check {
  display: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chip:has(input:checked) .chip-check { display: block; }

.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
  font-size: 0.75rem;
  color: var(--red-600);
}
.field-error[hidden] { display: none; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  padding: 8px 12px;
  border: 1px solid var(--red-200);
  border-radius: 8px;
  background: var(--red-50);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--red-700);
}
.form-alert[hidden] { display: none; }
.form-alert a {
  font-weight: 500;
  color: inherit;
  text-underline-offset: 2px;
}

.form-footer {
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}

.form-privacy {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--gray-500);
}
.form-privacy a {
  font-weight: 500;
  color: var(--violet-600);
  text-decoration: none;
}
.form-privacy a:hover { color: var(--violet-700); }

.form-submit {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--violet-600);
  color: var(--color-white);
  font-family: var(--font-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.form-submit:hover { background: var(--violet-700); }
.form-submit:focus-visible { outline: 2px solid var(--violet-500); outline-offset: 2px; }
.form-submit:disabled { cursor: not-allowed; opacity: 0.5; }
.form-submit-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.form-submit[aria-busy="true"] .form-submit-icon {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  stroke: none;
  animation: spin 0.8s linear infinite;
}

.contact-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding: 24px 0;
  font-size: 0.875rem;
  color: var(--gray-700);
}
.contact-success[hidden] { display: none; }
.contact-success strong { font-weight: 600; color: var(--gray-900); }
.contact-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: var(--teal-50);
  color: var(--teal-600);
}
.contact-success-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-success-title {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-black);
  outline: none;
}
.contact-again {
  padding: 0;
  border: 0;
  background: none;
  color: var(--violet-600);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.contact-again:hover { color: var(--violet-700); }

@media (pointer: coarse) {
  .chip,
  .form-submit { min-height: 44px; }
}

@media (min-width: 640px) {
  .contact { padding: 64px 24px; }
  .contact-aside,
  .contact-main { padding: 40px; }
  .contact-title { font-size: 2.25rem; }
  .contact-lead { font-size: 1rem; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .form-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .form-submit { width: auto; }
}

@media (min-width: 768px) {
  .field input { font-size: 0.875rem; }
}

@media (min-width: 1024px) {
  .contact { padding: 80px 32px; }
  .contact-card { grid-template-columns: 5fr 7fr; }
  .contact-art { display: block; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Footer: one for every width ===== */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-secondary);
}

.site-footer-art span { position: absolute; }
.site-footer-circle {
  left: -150px;
  bottom: -250px;
  width: 420px;
  height: 420px;
  border: 2px solid var(--color-cyan);
  border-radius: 50%;
  opacity: 0.7;
}
.site-footer-line {
  top: 0;
  width: 2px;
  height: 44px;
  background: var(--color-cyan);
}
.site-footer-line--80 { left: 80px; }
.site-footer-line--278 { left: 284px; }
.site-footer-pixel { width: 40px; height: 40px; }
.site-footer-pixel--darkblue { top: 0; left: 46%; background: var(--color-darkblue); }
.site-footer-pixel--purple { top: 0; right: 0; background: var(--color-purple); }
.site-footer-pixel--blue {
  right: 16%;
  bottom: 84px;
  width: 30px;
  height: 30px;
  background: var(--color-blue);
  animation: art-float 5.5s ease-in-out infinite alternate;
}

.site-footer-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 24px 48px;
}

.site-footer-brand img {
  display: block;
  width: 120px;
  height: auto;
}
.site-footer-tagline {
  margin-top: 18px;
  font-family: var(--font-primary);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1.15;
}
.site-footer-accent { font-weight: 700; }
/* The hero's blinking cursor. */
.site-footer-cursor {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 4px;
  background: var(--color-cyan);
  animation: blink 1s step-start infinite;
}

.site-footer-heading {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #99a1af;
}

.site-footer-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  list-style: none;
}
.site-footer-links a,
.site-footer-mail {
  position: relative;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}
/* The cyan scan line of the navbar. */
.site-footer-links a::after,
.site-footer-mail span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--color-cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-footer-links a:hover::after,
.site-footer-links a:focus-visible::after,
.site-footer-mail:hover span::after,
.site-footer-mail:focus-visible span::after { transform: scaleX(1); }

.site-footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.site-footer-mail span { position: relative; }
.site-footer-mail svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--color-cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
/* Pixel blocks that shift on hover, leaving a cyan shadow. */
.site-footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-purple);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.site-footer-social-link--blue { background: var(--color-blue); }
.site-footer-social-link:hover,
.site-footer-social-link:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 var(--color-cyan);
}
.site-footer-social-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--color-white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* LinkedIn's "in" is drawn filled. */
.site-footer-social-link .site-footer-social-fill {
  width: 18px;
  height: 18px;
  fill: var(--color-white);
  stroke: none;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 4px;
}

.site-footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 24px;
  background: var(--color-purple);
}
.site-footer-legal {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
}
@media (min-width: 768px) {
  .site-footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    padding: 80px 40px 56px;
  }
  .site-footer-bottom { padding: 12px 40px; }
}

@media (min-width: 961px) {
  .site-footer-inner { padding: 88px 80px 64px 120px; }
  .site-footer-bottom { padding: 12px 80px 12px 120px; }
  .site-footer-tagline { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
