/*
 * Shared components. Shadows only ever reference --e1, --e2, --e2-alta,
 * --e3 or --e-painel; no container of a button or card clips its content.
 */

/* Header ---------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 111px;
}

.site-header__brand {
  color: var(--neutrals-dark);
}

.site-header__brand .wordmark {
  width: 150px;
  height: auto;
}

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

.site-nav__links {
  display: flex;
  gap: 20px;
}

.site-nav__links a {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blackout);
  cursor: pointer;
}

.mobile-menu {
  border-top: 1px solid var(--neutrals-light);
  border-bottom: 1px solid var(--neutrals-light);
  background: var(--white);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  padding-block: 12px;
}

.mobile-menu__list a {
  display: block;
  padding-block: 12px;
  color: var(--primary);
}

.mobile-menu__cta {
  padding-bottom: 26px;
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

@media (min-width: 901px) {
  .mobile-menu {
    display: none;
  }
}

/* Buttons and links ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--e2);
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--e2-alta);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--e1);
}

.btn--green { background: var(--secondary); }
.btn--dark { background: var(--neutrals-dark); }

/* Sizes as drawn in Figma: header, hero, signup plate, products band. */
.btn--header { padding: 12px 16px; border-radius: 12px; }
.btn--hero { padding: 15px 26px; border-radius: 6px; }
.btn--signup { padding: 16px 26px; border-radius: 6px; }
.btn--band { padding: 13px 22px; border-radius: 9px; }

.link {
  color: var(--secondary);
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Link followed by the 26px rule used on the product pages. */
.link--rule {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.link--rule::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--secondary);
}

/* Section head: eyebrow, title, lead ----------------------------------- */

.eyebrow {
  color: var(--primary);
}

.section-title {
  padding-top: 20px;
}

.on-dark {
  color: var(--white);
}

.on-dark .eyebrow {
  color: var(--neutrals-light);
}

/*
 * Plate: a dark band is an object resting on the page, not a background.
 * width min(1352px, 100% - 32px), radius 16px, E3, centred. The section
 * after it has no background of its own, so the shadow below survives.
 */
.plate {
  isolation: isolate;
}

.plate::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  z-index: -1;
  width: min(1352px, 100% - 32px);
  border-radius: 16px;
  background: var(--neutrals-dark);
  box-shadow: var(--e3);
  transform: translateX(-50%);
}

/* Cards ----------------------------------------------------------------- */

.card {
  position: relative;
  border: 1px solid var(--neutrals-light);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--e1);
  transition: box-shadow 300ms var(--ease);
}

.card:hover {
  box-shadow: var(--e2-alta);
}

/* Signup plate ---------------------------------------------------------- */

.signup {
  padding-bottom: var(--section-space);
}

.signup__plate {
  width: min(1352px, 100% - 32px);
  margin-inline: auto;
  padding: 50px 75px;
  border-radius: 16px;
  background: var(--neutrals-light);
  box-shadow: var(--e3);
}

.signup__lead {
  max-width: 620px;
  padding-top: 16px;
  color: var(--primary);
}

.signup__actions {
  padding-top: 34px;
}

@media (max-width: 640px) {
  .signup__plate {
    padding: 34px 22px;
  }
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  padding-block: var(--margin-alternative);
  border-top: 1px solid var(--neutrals-light);
  color: var(--primary);
}

.site-footer__columns {
  display: flex;
  gap: 64px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 300px;
}

.site-footer__brand .wordmark {
  width: 104px;
  height: auto;
  color: var(--neutrals-dark);
}

.site-footer__col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__legal {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: var(--margin-alternative);
}

@media (max-width: 900px) {
  .site-footer__columns {
    flex-wrap: wrap;
    gap: 34px 64px;
  }

  .site-footer__brand {
    flex-basis: 100%;
  }

  .site-footer__col {
    flex: 1 1 140px;
  }
}

@media (max-width: 640px) {
  .site-footer__legal {
    flex-direction: column;
  }
}

/* Status label ---------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.status__dot {
  position: relative;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neutrals-light);
}

.status--dark {
  color: var(--neutrals-light);
}

.status--dark .status__dot {
  background: var(--primary);
}

.status--early,
.status--early.status--dark {
  color: var(--secondary);
}

.status--early .status__dot,
.status--early.status--dark .status__dot {
  background: var(--secondary);
}

/*
 * Pulse of the live product: a 9px ring in Secondary over 2.6s. Drawn as a
 * scaled ring instead of an animated box-shadow, so no shadow outside the
 * five elevations exists and the animation stays on transform and opacity.
 */
.status--early .status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--secondary);
  animation: status-pulse 2.6s infinite;
}

@keyframes status-pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(4); opacity: 0; }
}

/* Product card ---------------------------------------------------------- */

.product-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.product-card__name {
  padding-top: 22px;
  color: var(--neutrals-dark);
}

.product-card__text {
  padding-top: 12px;
  color: var(--primary);
}

@media (prefers-reduced-motion: reduce) {
  .status--early .status__dot::after {
    animation: none;
    opacity: 0;
  }
}

/* Motion ---------------------------------------------------------------- */

/*
 * Node field. The canvas covers the whole viewport behind the content and
 * is never inside the hero box, so dispersion has the full screen to travel
 * and no ancestor can clip it.
 */
.node-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Drag target in the hero: the slot the field is drawn around. */
.field-anchor {
  cursor: grab;
  touch-action: none;
}

.field-anchor.is-dragging {
  cursor: grabbing;
}

[data-parallax] {
  will-change: transform;
}

/* Tilt: 80ms linear while the cursor moves, 400ms on the way back. */
[data-tilt] {
  transform-style: preserve-3d;
  transition:
    transform 400ms var(--ease),
    box-shadow 300ms var(--ease);
}

[data-tilt].is-tilting {
  transition:
    transform 80ms linear,
    box-shadow 300ms var(--ease);
}

/* Glow that follows the cursor: Secondary at 14%, 260px on cards, 320px on the large cards. */
[data-tilt="card"]::after,
[data-tilt="big"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    color-mix(in srgb, var(--secondary) 14%, transparent),
    transparent
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease);
}

[data-tilt="big"]::after {
  background: radial-gradient(
    320px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    color-mix(in srgb, var(--secondary) 14%, transparent),
    transparent
  );
}

[data-tilt].is-tilting::after {
  opacity: 1;
}

/* Section entrance: opacity 0, 22px down, 5deg back; 620ms, 55ms per sibling. */
.reveal > * {
  opacity: 0;
  transform: perspective(1200px) translateY(22px) rotateX(5deg);
}

.reveal.is-revealed > * {
  opacity: 1;
  transform: none;
  transition:
    opacity 620ms var(--ease) var(--reveal-delay, 0ms),
    transform 620ms var(--ease) var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card,
  [data-tilt] {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* Section head ---------------------------------------------------------- */

.section-lead {
  max-width: 680px;
  padding-top: 18px;
  color: var(--primary);
}

/* Panels ---------------------------------------------------------------- */

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 20px 22px;
  border: 1px solid var(--neutrals-light);
  border-radius: 6px;
  background: var(--white);
  color: var(--neutrals-dark);
}

.panel__label {
  color: var(--primary);
}

.panel__rule {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--neutrals-light);
}

.panel--dark {
  border-color: var(--primary);
  background: var(--blackout);
  box-shadow: var(--e-painel);
  color: var(--white);
}

.panel--dark .panel__label {
  color: var(--neutrals-light);
}

.panel--dark .panel__rule {
  background: var(--primary);
}

.panel__note--accent {
  color: var(--secondary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.timeline li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline .t-mono-medium-12 {
  color: var(--neutrals-light);
}

.timeline .is-done .t-mono-medium-12 {
  color: var(--secondary);
}

/* Responsive type: phones have no Figma frame, so the display styles step
   down to the next existing style instead of a new size. */
@media (max-width: 640px) {
  .t-display-60 { font-size: 40px; line-height: 1.15; }
  .t-display-40 { font-size: 30px; line-height: 1.22; letter-spacing: -0.01em; }
}

/* Panel footnotes are single lines in Figma (no wrap); phones may wrap. */
@media (min-width: 641px) {
  .panel > p:last-child {
    white-space: nowrap;
  }
}

/* Page opening (ecosystem, company) -------------------------------------- */

.page-opening__title {
  padding-top: 22px;
}

.page-opening__lead {
  color: var(--primary);
}

.page-opening__lead--740 { max-width: 740px; padding-top: 28px; }
.page-opening__lead--760 { max-width: 760px; padding-top: 30px; }

/* On phones the plate sits 16px from the screen edge, the same as the
   page gutter; its content keeps the 22px inner padding panels use. */
@media (max-width: 640px) {
  .plate > .wrap {
    width: calc(100% - 2 * (16px + 22px));
  }
}

/* Reduced motion: the field is drawn once and must scroll with the page,
   so the canvas leaves the fixed layer and sits over the document. */
@media (prefers-reduced-motion: reduce) {
  .node-field {
    position: absolute;
    bottom: auto;
  }
}
