/* A typographic closing composition, using GrokIt's existing theme tokens. */
:root .grokit-footer-intro {
  width: calc(100% - 64px);
  max-width: none;
  margin: 0 auto;
  padding: 96px 0 32px;
}

:root .grokit-footer-intro > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, 20%);
  gap: 24px 12px;
  padding: 0;
  border: 0;
}

:root .grokit-footer-intro h2 {
  grid-column: 1 / 3;
  margin: 0;
  font-size: clamp(50px, 5.3vw, 88px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.055em;
}

:root .grokit-footer-intro h2 .text-grad {
  background: none;
  color: inherit;
  -webkit-text-fill-color: currentColor;
}

:root .grokit-footer-intro .grokit-footer-action {
  grid-row: 2;
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  align-self: start;
  min-height: 44px;
  height: auto;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--line-2, #aaa);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  box-shadow: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

:root .grokit-footer-intro .grokit-footer-secondary { grid-column: 2; }

.grokit-footer-links {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  gap: 4px;
}

.grokit-footer-link {
  display: inline-block;
  color: var(--fg);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.035em;
  text-decoration: none;
  text-underline-offset: 5px;
}

/* The single wordmark shares the intro and footer's outer alignment. */
body:has(footer.grokit-footer) #grokit-footer-marquee {
  padding: 8px 0 12px;
  border: 0;
}

/* Reserve a small top-right signature without changing the six-letter reveal. */
body:has(footer.grokit-footer) .grokit-footer-wordmark {
  padding-inline-end: 4.7%;
  font-size: calc((100vw - 64px) * .309);
  font-size: 30.9cqw;
}

.grokit-footer-registered {
  position: absolute;
  top: 12%;
  right: .3%;
  font-family: Arial, sans-serif;
  font-size: clamp(16px, 3.2vw, 52px);
  font-size: clamp(16px, 3.2cqw, 52px);
  font-weight: 400;
  line-height: 1;
  color: inherit;
}

footer .grokit-registered {
  display: inline-block;
  margin-inline-start: .18em;
  font-family: Arial, sans-serif;
  font-size: .55em;
  font-weight: 400;
  line-height: 1;
  vertical-align: super;
}

:root footer.grokit-footer {
  margin: 0;
  border: 0;
  background: transparent;
}

:root footer.grokit-footer > .wrap {
  width: calc(100% - 64px);
  max-width: none;
  padding: 12px 0;
}

:root footer.grokit-footer > .grid {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 24px;
}

.grokit-footer-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.grokit-footer-signature {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.grokit-footer-identity > a,
.grokit-footer-identity > p,
.grokit-footer .eyebrow,
.grokit-footer-network,
.grokit-footer-community { display: none; }

:root .grokit-footer-identity > button {
  margin: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
}

.grokit-footer-product { grid-column: 3; grid-row: 1; }
.grokit-footer-network { grid-column: 2; grid-row: 1; }

:root .grokit-footer :is(.grokit-footer-product, .grokit-footer-network) ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

:root .grokit-footer :is(.grokit-footer-product, .grokit-footer-network) li { margin: 0; }
.grokit-footer-product li:first-child,
.grokit-footer-network li:not(:first-child) { display: none; }
.grokit-footer-network li { color: var(--muted); }
.grokit-footer-product a { text-decoration: none; text-underline-offset: 4px; }

:root footer.grokit-footer > .wrap + .wrap {
  display: none;
}

@media (hover: hover) {
  :root .grokit-footer-intro .grokit-footer-action:hover {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    box-shadow: none;
  }
  .grokit-footer-link:hover,
  .grokit-footer-product a:hover { text-decoration: underline; }
}

@media (prefers-reduced-motion: no-preference) {
  :root .grokit-footer-action:active { scale: .96; transition: scale 150ms ease-out; }
  [data-wordmark-reveal="pending"] .grokit-footer-registered { opacity: 0; }
  [data-wordmark-reveal="active"] .grokit-footer-registered {
    opacity: 1;
    transition: opacity 250ms ease-out 600ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root .grokit-footer-action { transition: none; }
}

@media (max-width: 1000px) {
  :root footer.grokit-footer > .grid { grid-template-columns: auto 1fr; }
  .grokit-footer-network { justify-self: end; }
  .grokit-footer-product { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 639px) {
  :root .grokit-footer-intro { width: calc(100% - 32px); padding: 64px 0 24px; }
  :root .grokit-footer-intro > div { grid-template-columns: auto minmax(0, 1fr); gap: 24px 8px; }
  :root .grokit-footer-intro h2 { font-size: clamp(44px, 9.5vw, 60px); }
  :root .grokit-footer-intro .grokit-footer-action { padding: 0 15px; font-size: 10px; }
  .grokit-footer-links { grid-row: 3; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 10px 24px; }
  .grokit-footer-link { font-size: 16px; }
  :root footer.grokit-footer > .wrap { width: calc(100% - 32px); }
  :root footer.grokit-footer > .grid { gap: 16px 12px; }
  .grokit-footer-identity { gap: 8px; }
  :root .grokit-footer :is(.grokit-footer-product, .grokit-footer-network) ul { gap: 8px 14px; font-size: 11px; }
}

@media (forced-colors: active) {
  :root .grokit-footer-intro .grokit-footer-action { border-color: ButtonText; }
  body:has(footer.grokit-footer) .grokit-footer-wordmark { color: CanvasText; }
}
