/*
  Shared V2 components. Load after base.css (which imports the tokens and fonts).

  Pages compose these classes. There are no page layouts here.
  Interactive pieces are real buttons and links. Tap targets are at least
  44px, except .btn-sm, which the spec fixes at 36px.
*/

@import "./tokens.css";

/* ---- Logo ---- */

.gsu-mark {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
}

.gsu-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  color: var(--gsu-navy);
  text-decoration: none;
}

a.gsu-lockup:hover {
  color: var(--gsu-navy);
  text-decoration: none;
}

.gsu-wordmark {
  font-family: var(--gsu-font-sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
  color: inherit;
}

.site-footer .gsu-wordmark {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.band-navy .gsu-lockup,
.on-navy .gsu-lockup {
  color: var(--gsu-white);
}

.band-navy a.gsu-lockup:hover,
.on-navy a.gsu-lockup:hover {
  color: var(--gsu-white);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gsu-s-2);
  box-sizing: border-box;
  height: 48px;
  min-height: 44px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: var(--gsu-r-pill);
  background: transparent;
  color: var(--gsu-navy);
  font-family: var(--gsu-font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
}

a.btn:hover {
  text-decoration: none;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: var(--gsu-cobalt);
  border-color: var(--gsu-cobalt);
  color: var(--gsu-white);
}

.btn-primary:hover {
  background: var(--gsu-navy);
  border-color: var(--gsu-navy);
  color: var(--gsu-white);
}

.btn-lime {
  background: var(--gsu-lime);
  border-color: var(--gsu-lime);
  color: var(--gsu-navy);
}

.btn-lime:hover {
  background: var(--gsu-white);
  border-color: var(--gsu-white);
  color: var(--gsu-navy);
}

/* base.css paints every navy-band link lime (and white on hover). These
   beat that so filled buttons keep their own label color. */
.band-navy a.btn-primary,
.on-navy a.btn-primary,
.band-navy a.btn-primary:hover,
.on-navy a.btn-primary:hover {
  color: var(--gsu-white);
}

.band-navy a.btn-lime,
.on-navy a.btn-lime,
.band-navy a.btn-lime:hover,
.on-navy a.btn-lime:hover {
  color: var(--gsu-navy);
}

.band-navy a.btn-outline,
.on-navy a.btn-outline,
.band-navy .btn-outline,
.on-navy .btn-outline {
  border-color: var(--gsu-white);
  color: var(--gsu-white);
}

.band-navy a.btn-outline:hover,
.on-navy a.btn-outline:hover,
.band-navy .btn-outline:hover,
.on-navy .btn-outline:hover {
  background: var(--gsu-white);
  border-color: var(--gsu-white);
  color: var(--gsu-navy);
}

.btn-outline {
  background: transparent;
  border-color: var(--gsu-navy);
  color: var(--gsu-navy);
}

.btn-outline:hover {
  background: var(--gsu-ice);
  border-color: var(--gsu-navy);
  color: var(--gsu-navy);
}

/* Demo "Switch stylist": outline that fills navy. */
.btn-outline.btn-invert:hover {
  background: var(--gsu-navy);
  border-color: var(--gsu-navy);
  color: var(--gsu-white);
}

.btn-sm {
  height: 36px;
  min-height: 36px;
  padding: 0 var(--gsu-s-4);
  font-size: 13px;
}

.btn-md {
  height: 44px;
  min-height: 44px;
  padding: 0 var(--gsu-s-5);
  font-size: 14px;
}

.btn-lg {
  height: 52px;
  min-height: 52px;
  padding: 0 28px;
}

.btn:focus-visible,
.gsu-lockup:focus-visible {
  outline: 2px solid var(--gsu-cobalt);
  outline-offset: 2px;
}

.on-navy .btn:focus-visible,
.band-navy .btn:focus-visible,
.on-navy .gsu-lockup:focus-visible,
.band-navy .gsu-lockup:focus-visible {
  outline-color: var(--gsu-lime);
}

/* ---- Fields ---- */

.field {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  min-height: 44px;
  padding: 0 var(--gsu-s-4);
  border: 1.5px solid var(--gsu-rule-soft);
  border-radius: var(--gsu-r-panel);
  background: var(--gsu-white);
  color: var(--gsu-navy);
  font-family: var(--gsu-font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.field::placeholder {
  color: var(--gsu-gray);
}

.field-lg {
  height: 52px;
  padding-inline: 18px;
}

.field:focus {
  outline: none;
  border-color: var(--gsu-cobalt);
}

.field:focus-visible {
  outline: 2px solid var(--gsu-cobalt);
  outline-offset: 2px;
  border-color: var(--gsu-cobalt);
}

.on-navy .field,
.band-navy .field,
.field.on-navy {
  background: transparent;
  border-color: var(--gsu-rule-on-navy);
  color: var(--gsu-white);
}

.on-navy .field::placeholder,
.band-navy .field::placeholder,
.field.on-navy::placeholder {
  color: var(--gsu-on-navy);
}

.on-navy .field:focus,
.band-navy .field:focus,
.field.on-navy:focus,
.on-navy .field:focus-visible,
.band-navy .field:focus-visible,
.field.on-navy:focus-visible {
  border-color: var(--gsu-lime);
  outline-color: var(--gsu-lime);
}

/* ---- Chips and tag pills ---- */

.chip,
.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  border-radius: var(--gsu-r-pill);
  font-family: var(--gsu-font-mono);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  vertical-align: middle;
}

.chip {
  padding: 6px 12px;
  border: 1px solid transparent;
  color: var(--gsu-navy);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chip-outline {
  border-color: var(--gsu-navy);
  background: transparent;
  color: var(--gsu-navy);
}

.chip-cobalt {
  border-color: var(--gsu-cobalt);
  background: transparent;
  color: var(--gsu-cobalt);
}

.chip-dark {
  border-color: var(--gsu-navy);
  background: var(--gsu-navy);
  color: var(--gsu-lime);
}

.chip-lime {
  border-color: var(--gsu-lime);
  background: var(--gsu-lime);
  color: var(--gsu-navy);
}

button.chip,
a.chip,
button.tag-pill,
a.tag-pill {
  cursor: pointer;
  min-height: 44px;
  padding-inline: 12px;
  appearance: none;
}

button.chip-cobalt,
a.chip-cobalt {
  background: var(--gsu-ice);
}

button.chip-cobalt:hover,
a.chip-cobalt:hover {
  background: var(--gsu-cobalt);
  color: var(--gsu-white);
  text-decoration: none;
}

a.chip:hover,
a.tag-pill:hover {
  text-decoration: none;
}

.chip:focus-visible,
.tag-pill:focus-visible {
  outline: 2px solid var(--gsu-cobalt);
  outline-offset: 2px;
}

.tag-pill {
  padding: 5px 10px;
  border: 1px solid var(--gsu-navy);
  background: transparent;
  color: var(--gsu-navy);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
}

/* ---- Cards and grid panels ---- */

.card {
  box-sizing: border-box;
  padding: 28px;
  border: 1px solid var(--gsu-navy);
  border-radius: var(--gsu-r-panel);
  background: var(--gsu-white);
  color: var(--gsu-navy);
}

.card-ice {
  background: var(--gsu-ice);
}

.card-navy {
  background: var(--gsu-navy);
  border-color: var(--gsu-navy);
  color: var(--gsu-white);
}

.card-navy :is(p, .t-body, .t-lead) {
  color: var(--gsu-on-navy);
}

.card-navy :is(h1, h2, h3, h4, .t-h3, .t-section, .t-d1, .t-d2) {
  color: var(--gsu-white);
}

.card-navy :is(.t-label, .eyebrow) {
  color: var(--gsu-lime);
}

.card-navy .eyebrow-cobalt {
  color: var(--gsu-cobalt);
}

.card-navy .eyebrow-violet {
  color: var(--gsu-violet);
}

.grid-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--gsu-navy);
  border-radius: var(--gsu-r-panel);
  background: var(--gsu-navy);
}

.grid-panel > * {
  min-width: 0;
  background: var(--gsu-white);
  color: var(--gsu-navy);
}

.grid-panel--hover > *:hover {
  background: var(--gsu-ice);
}

/* ---- Eyebrow ---- */

.eyebrow {
  display: block;
  margin: 0 0 18px;
  color: var(--gsu-cobalt);
  font-family: var(--gsu-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow-cobalt {
  color: var(--gsu-cobalt);
}

.eyebrow-violet {
  color: var(--gsu-violet);
}

/* ---- Site header and footer ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--gsu-white);
  border-bottom: 1px solid var(--gsu-navy);
  padding-top: env(safe-area-inset-top, 0px);
}

.site-footer {
  background: var(--gsu-white);
  border-top: 1px solid var(--gsu-navy);
  color: var(--gsu-navy);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.site-header > .container,
.site-footer > .container,
.site-header-inner,
.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gsu-s-5) var(--gsu-s-6);
  flex-wrap: wrap;
}

.site-header > .container,
.site-header-inner {
  padding-block: var(--gsu-s-4);
}

.site-footer > .container,
.site-footer-inner {
  padding-block: var(--gsu-s-6);
}

.site-header-inner,
.site-footer-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--gsu-container);
  margin-inline: auto;
  padding-left: max(var(--gsu-s-7), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gsu-s-7), env(safe-area-inset-right, 0px));
}

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

.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gsu-body);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  color: var(--gsu-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-nav a:not(.btn):focus-visible {
  outline: 2px solid var(--gsu-cobalt);
  outline-offset: 2px;
}

.site-footer-meta {
  margin: 0;
  color: var(--gsu-gray);
  font-family: var(--gsu-font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

@media (max-width: 1279px) {
  .site-header-inner,
  .site-footer-inner {
    padding-left: max(var(--gsu-s-6), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gsu-s-6), env(safe-area-inset-right, 0px));
  }
}

/* Below 1024 the nav keeps the CTA and hides the text links. */
@media (max-width: 1023px) {
  .site-header > .container,
  .site-header-inner,
  .site-nav {
    flex-wrap: nowrap;
  }

  .site-nav {
    margin-left: auto;
    gap: var(--gsu-s-3);
  }

  .site-nav > a:not(.btn),
  .site-nav > :not(.btn) {
    display: none;
  }

  .site-header .btn {
    padding-inline: var(--gsu-s-4);
  }
}

@media (max-width: 767px) {
  .site-header-inner,
  .site-footer-inner {
    padding-left: max(var(--gsu-s-5), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gsu-s-5), env(safe-area-inset-right, 0px));
  }
}

/* 320px: the wordmark plus "Get early access" overflowed the viewport. */
@media (max-width: 359px) {
  .site-header-inner,
  .site-header > .container {
    gap: var(--gsu-s-2);
    padding-left: max(var(--gsu-s-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gsu-s-4), env(safe-area-inset-right, 0px));
  }

  .site-header .gsu-wordmark {
    font-size: 15px;
  }

  .site-header .btn {
    padding-inline: 10px;
    font-size: 13px;
  }
}

/* ---- Message bubbles ---- */

.bubble,
.bubble-voice {
  box-sizing: border-box;
  max-width: 62%;
  font-size: 15px;
  line-height: 1.5;
  animation: gsu-in 0.3s ease both;
}

.bubble {
  padding: 11px 14px;
}

.bubble-client {
  align-self: flex-end;
  border: 1px solid var(--gsu-rule-soft);
  border-radius: 12px 12px 4px 12px;
  background: var(--gsu-white);
  color: var(--gsu-navy);
}

.bubble-agent {
  align-self: flex-start;
  border-radius: 12px 12px 12px 4px;
  background: var(--gsu-cobalt);
  color: var(--gsu-white);
}

.bubble-agent-dark {
  align-self: flex-start;
  border-radius: 12px 12px 12px 4px;
  background: var(--gsu-navy);
  color: var(--gsu-white);
}

.bubble-meta {
  margin: 0;
  color: var(--gsu-gray);
  font-family: var(--gsu-font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.bubble-voice {
  display: flex;
  flex-direction: column;
  gap: var(--gsu-s-2);
  padding: 10px 14px;
  border: 1px solid var(--gsu-navy);
  border-radius: 12px 12px 12px 4px;
  background: var(--gsu-white);
  color: var(--gsu-navy);
}

.bubble-voice.bubble-agent-dark {
  border-color: var(--gsu-navy);
  background: var(--gsu-navy);
  color: var(--gsu-white);
}

.bubble-voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bubble-voice button {
  position: relative;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--gsu-r-pill);
  background: transparent;
  color: var(--gsu-white);
  cursor: pointer;
}

.bubble-voice button::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: var(--gsu-r-pill);
  background: var(--gsu-navy);
}

.bubble-voice.bubble-agent-dark button {
  color: var(--gsu-navy);
}

.bubble-voice.bubble-agent-dark button::after {
  background: var(--gsu-lime);
}

.bubble-voice button::before {
  content: "";
  position: relative;
  z-index: 1;
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent currentColor;
}

.bubble-voice button:focus-visible {
  outline: 2px solid var(--gsu-cobalt);
  outline-offset: 2px;
}

.bubble-voice-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gsu-body);
}

.bubble-voice.bubble-agent-dark .bubble-voice-text {
  color: var(--gsu-on-navy-strong);
}

.bubble-voice-time {
  color: var(--gsu-gray);
  font-family: var(--gsu-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.bubble-voice.bubble-agent-dark .bubble-voice-time {
  color: var(--gsu-on-navy);
}

.bubble-voice .voice-bars {
  color: var(--gsu-navy);
}

.bubble-voice.bubble-agent-dark .voice-bars {
  color: var(--gsu-lime);
}

.bubble-photo {
  display: block;
  box-sizing: border-box;
  width: 220px;
  height: 220px;
  object-fit: cover;
  border: 1px solid var(--gsu-navy);
  border-radius: 12px 12px 12px 4px;
  background: var(--gsu-ice);
  animation: gsu-in 0.3s ease both;
}

.voice-bars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
}

.voice-bar {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
}

/* ---- Typing, wave, pulse ---- */

.typing-dots {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--gsu-rule-soft);
  border-radius: 12px;
  background: var(--gsu-white);
  animation: gsu-in 0.3s ease both;
}

.typing-dots > span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: var(--gsu-r-pill);
  background: var(--gsu-cobalt);
  animation: gsu-dot 1s ease-in-out infinite;
}

.typing-dots > span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots > span:nth-child(3) {
  animation-delay: 0.3s;
}

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  color: var(--gsu-lime);
}

.wave-bar,
.wave > span {
  display: block;
  flex: 0 0 auto;
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  animation-name: gsu-wave;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--gsu-r-pill);
  background: var(--gsu-lime);
  animation: gsu-pulse 1.4s ease-out infinite;
}

/* ---- Photo placeholder ---- */

.photo-frame {
  overflow: hidden;
  border: 1px solid var(--gsu-navy);
  border-radius: var(--gsu-r-panel);
  background: var(--gsu-ice);
}

.photo-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-slot {
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
  min-height: 160px;
  padding: var(--gsu-s-4);
  background: var(--gsu-ice);
  color: var(--gsu-body);
  font-family: var(--gsu-font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.photo-frame > .photo-slot {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border-radius: 0;
}

.photo-slot-caption,
figure:has(.photo-slot) > figcaption {
  margin: var(--gsu-s-2) 0 0;
  color: var(--gsu-gray);
  font-family: var(--gsu-font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-align: left;
}

/* ---- Scroll reveal ---- */

/* Applied after the hidden state is committed, so the hide itself does not animate. */
[data-reveal].is-armed {
  transition: opacity 0.8s cubic-bezier(.2, .7, .2, 1), transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

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

@keyframes gsu-wave {
  0%,
  100% {
    transform: scaleY(0.25);
  }

  50% {
    transform: scaleY(1);
  }
}

@keyframes gsu-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }

  40% {
    opacity: 1;
  }
}

@keyframes gsu-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--gsu-lime) 70%, transparent);
  }

  100% {
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--gsu-lime) 0%, transparent);
  }
}

@keyframes gsu-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1023px) {
  .bubble,
  .bubble-voice {
    max-width: 80%;
    font-size: 14px;
  }

  .bubble {
    padding: 9px 12px;
  }

  .bubble-photo {
    width: 160px;
    height: 160px;
  }

  .typing-dots {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave-bar,
  .wave > span,
  .typing-dots > span,
  .pulse-dot,
  .bubble,
  .bubble-voice,
  .bubble-photo,
  .typing-dots,
  [data-reveal] {
    animation: none !important;
    transition: none !important;
  }

  .wave-bar,
  .wave > span {
    transform: none;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
