:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --ink: #101216;
  --muted: #5e6469;
  --line: #d7d1c6;
  --panel: #fffdf8;
  --blue: #214f72;
  --green: #276458;
  --amber: #b86f19;
  --red: #9f3a2f;
  --shadow: 0 24px 60px rgb(16 18 22 / 12%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  min-height: 48px;
  padding: 0 22px;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 13px 14px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  min-height: 100vh;
}

.intro {
  background:
    linear-gradient(90deg, rgb(247 245 239 / 92%) 0%, rgb(247 245 239 / 76%) 54%, rgb(247 245 239 / 34%) 100%),
    url("/assets/tab-computing-office.png") center / cover;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 48px clamp(24px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}

.brand-block {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.brand-row {
  align-items: center;
  display: flex;
  gap: 12px;
  font-weight: 800;
}

.mark {
  align-items: center;
  aspect-ratio: 1;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  justify-content: center;
  width: 36px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 7vw, 7.1rem);
  letter-spacing: 0;
  line-height: 0.9;
  max-width: 10.5ch;
  min-height: 4.5em;
}

.transform-headline span {
  display: inline;
}

.transform-headline [data-phrase-slot] {
  color: var(--ink);
  display: inline-block;
  position: relative;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.transform-headline [data-phrase-slot="domain"] {
  color: var(--blue);
  text-align: left;
  width: 1.35em;
}

.transform-headline [data-phrase-slot="medium"] {
  color: var(--red);
  width: 3.6em;
}

.transform-headline [data-phrase-slot="use"] {
  color: var(--green);
}

.transform-headline [data-phrase-slot="extension"] {
  color: var(--amber);
  display: inline;
}

.transform-headline .is-changing {
  opacity: 0;
  transform: translateY(0.18em);
}

.transform-headline .has-changed {
  transform: translateY(-0.06em);
}

@media (prefers-reduced-motion: reduce) {
  .transform-headline [data-phrase-slot] {
    transition: none;
  }

  .transform-headline .is-changing,
  .transform-headline .has-changed {
    opacity: 1;
    transform: none;
  }
}

.service-stack {
  bottom: 0;
  height: 54vh;
  max-height: 520px;
  min-height: 310px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / 18%) 12%, #000 34%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / 18%) 12%, #000 34%, #000 100%);
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: clamp(24px, 6vw, 72px);
  width: min(300px, calc(100% - 48px));
}

.service-stack span {
  animation: stack-rise 18s linear infinite;
  background: rgb(255 253 248 / 92%);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: -56px;
  box-shadow: 0 10px 28px rgb(16 18 22 / 10%);
  color: #30363b;
  font-weight: 800;
  position: absolute;
  right: 0;
  padding: 8px 13px;
  white-space: nowrap;
}

.service-stack span:nth-child(1) {
  animation-delay: -15s;
}

.service-stack span:nth-child(2) {
  animation-delay: -12s;
}

.service-stack span:nth-child(3) {
  animation-delay: -9s;
}

.service-stack span:nth-child(4) {
  animation-delay: -6s;
}

.service-stack span:nth-child(5) {
  animation-delay: -3s;
}

.service-stack span:nth-child(6) {
  animation-delay: 0s;
}

@keyframes stack-rise {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  10% {
    opacity: 1;
  }

  72% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateY(calc(-54vh - 90px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-stack span {
    animation: none;
  }
}

.assistant-panel {
  align-self: stretch;
  background: var(--panel);
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto auto;
  gap: 20px;
  min-height: 100vh;
  padding: 34px clamp(18px, 4vw, 48px);
}

.panel-head,
.admin-head,
.lead-top {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form-head h3,
.admin-head h1 {
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  letter-spacing: 0;
  line-height: 0.96;
  margin-top: 4px;
}

.status {
  background: #e8f0ea;
  border-radius: 999px;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 8px 12px;
}

.transcript {
  align-content: start;
  display: grid;
  gap: 12px;
  min-height: clamp(300px, 44vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.message {
  align-items: flex-start;
  display: flex;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  gap: 12px;
  line-height: 1.12;
  max-width: 760px;
  white-space: pre-wrap;
}

.message-bubble {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 22px;
}

.goldie-avatar {
  border: 1px solid #e1b654;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgb(16 18 22 / 10%);
  flex: 0 0 auto;
  height: clamp(42px, 5vw, 58px);
  margin-right: 6px;
  margin-top: 0.12em;
  width: clamp(42px, 5vw, 58px);
}

.message.assistant .message-bubble {
  border: 0;
  background: transparent;
  padding: 0;
}

.message.user {
  justify-self: end;
}

.message.user .message-bubble {
  background: #e8eef2;
  border-color: #c5d2db;
}

.composer {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 92px;
}

.composer-field {
  display: grid;
  gap: 8px;
}

.composer textarea {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.25;
  min-height: 150px;
  padding: 18px;
}

.word-counter {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
  justify-self: end;
}

.word-counter.is-over {
  color: #9c2f1a;
}

.composer button {
  align-self: start;
  font-size: 1.05rem;
  margin-top: calc(0.88rem * 1.2 + 8px);
  min-height: 150px;
}

.contact-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.contact-form[hidden],
.composer[hidden] {
  display: none;
}

.hp-field {
  left: -9999px;
  position: absolute;
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-note {
  color: var(--green);
  font-weight: 700;
}

.admin-shell {
  display: grid;
  gap: 26px;
  margin: 0 auto;
  max-width: 1100px;
  padding: 42px 22px;
}

.token-form {
  display: flex;
  gap: 10px;
}

.lead-list {
  display: grid;
  gap: 14px;
}

.lead-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.lead-card h2 {
  font-size: 1.4rem;
}

.lead-card time,
.lead-meta {
  color: var(--muted);
}

.lead-project {
  font-size: 1.12rem;
  line-height: 1.4;
  margin: 16px 0;
  white-space: pre-wrap;
}

.lead-card dl {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.lead-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lead-card dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .assistant-panel {
    min-height: auto;
  }

  .intro {
    min-height: 72vh;
  }

  .assistant-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-template-rows: auto auto auto auto;
  }

  .transcript {
    min-height: 0;
  }

  h1 {
    max-width: 10ch;
  }
}

@media (max-width: 620px) {
  .intro,
  .assistant-panel {
    padding: 24px 16px;
  }

  .service-stack {
    bottom: 0;
    right: 16px;
    width: min(280px, calc(100% - 32px));
  }

  .composer,
  .field-grid,
  .lead-card dl,
  .admin-head,
  .token-form {
    grid-template-columns: 1fr;
  }

  .composer,
  .admin-head,
  .token-form {
    display: grid;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .composer button {
    margin-top: 0;
    min-height: 54px;
  }

  .panel-head {
    display: grid;
  }

  h1 {
    font-size: 3.1rem;
  }
}
