/* Home page sections. */

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--s-4) var(--section);
  overflow: hidden;
  overflow: clip;
}

.guide {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  max-width: none;
  padding-bottom: var(--s-2);
  border-bottom: var(--rule-heavy) solid var(--ink);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 40rem) {
  .guide__mid {
    display: none;
  }
}

.hero__title {
  margin-block: var(--s-5) var(--s-6);
  font-size: var(--text-hero);
  line-height: 0.84;
  letter-spacing: -0.012em;
  text-wrap: wrap;
}

.mark {
  padding-inline: 0.06em;
  margin-inline: -0.06em;
  background: linear-gradient(transparent 9%, var(--yellow) 9%, var(--yellow) 90%, transparent 90%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__grid {
  display: grid;
  gap: var(--s-7);
}

.hero__copy {
  display: grid;
  gap: var(--s-5);
  align-content: start;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  padding-bottom: var(--s-2);
}

.hero__demo figcaption,
.script figcaption,
.incoming__art figcaption {
  margin-top: var(--s-5);
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

@media (min-width: 75rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s-7);
    align-items: start;
  }

  .hero__copy {
    padding-top: var(--s-4);
  }
}

/* Terminal */
.term {
  border: var(--rule) solid var(--ink);
  background: var(--night);
  color: var(--on-night);
  box-shadow: var(--shadow-hard);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.term__bar {
  max-width: none;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.55rem var(--s-4);
  border-bottom: 1px solid var(--night-rule);
  color: var(--on-night-mute);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.term__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--yellow);
}

.term__body {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-4) calc(var(--s-7) + var(--s-5));
}

.term__line {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: var(--s-3);
  max-width: none;
  line-height: 1.6;
}

.term__who {
  color: var(--on-night-mute);
}

.term__who--you {
  color: var(--yellow);
}

.term__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.chip {
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--night-rule);
  color: var(--on-night-mute);
}

.chip--on {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

.term strong {
  color: var(--yellow);
  font-weight: 700;
}

/* When the demo is wide enough, the slip sits beside the terminal and leans over its edge. */
.hero__demo {
  container-type: inline-size;
}

@container (min-width: 38rem) {
  .hero__stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19rem;
    align-items: start;
  }

  .hero__stage .term__body {
    padding-right: 3.25rem;
    padding-bottom: var(--s-6);
  }

  .hero__stage .slip {
    width: auto;
    margin: var(--s-7) 0 0 -2.25rem;
  }
}

/* Paper slip (call report, phone message) */
.slip {
  position: relative;
  width: min(21rem, 88%);
  margin: calc(-1 * var(--s-7)) var(--s-4) 0 auto;
  padding: var(--s-4) var(--s-4) var(--s-5);
  border: var(--rule) solid var(--ink);
  background: var(--pink);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  font-size: var(--text-sm);
  line-height: 1.45;
  transform: rotate(2.2deg);
}

.slip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: var(--rule-heavy) solid var(--ink);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1;
  text-transform: uppercase;
}

.slip__head small {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-stretch: 100%;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.slip .leaders > div {
  padding-block: 0.3rem;
  border-bottom: 1px solid var(--ink);
}

.slip .leaders dt::after {
  border-bottom-width: 2px;
}

.slip dt,
.slip__label {
  color: var(--pink-ink);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slip dd {
  font-weight: 600;
}

.slip__label {
  margin-top: var(--s-3);
}

.slip__text {
  font-weight: 600;
}

.slip__facts li {
  position: relative;
  padding-left: 1.1rem;
}

.slip__facts li::before {
  content: "";
  position: absolute;
  top: 0.48em;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ink);
}

.slip__msg {
  padding-block: var(--s-2);
  border-bottom: 1px solid var(--ink);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.5;
}

.slip__ticks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.slip__ticks li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.tick {
  display: grid;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  border: var(--rule) solid var(--ink);
  background: var(--paper-white);
}

.tick--on::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  background: var(--ink);
}

.slip--msg {
  width: min(25rem, 94%);
  margin: 0 auto;
  transform: rotate(-2.4deg);
}

/* ---------- How a call goes ---------- */
.how__grid {
  display: grid;
  gap: var(--s-7);
}

.steps {
  border-bottom: var(--rule) solid var(--ink);
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-5);
  padding-block: var(--s-5);
  border-top: var(--rule) solid var(--ink);
}

.step h3 {
  margin-bottom: var(--s-2);
}

.step p {
  color: var(--fg-soft);
}

.script {
  align-self: start;
}

.script__sheet {
  border: var(--rule) solid var(--ink);
  background: var(--paper-white);
  box-shadow: var(--shadow-hard);
}

.script__bar {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  max-width: none;
  padding: var(--s-2) var(--s-4);
  border-bottom: var(--rule) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px dashed var(--ink-mute);
}

.turn:last-child {
  border-bottom: 0;
}

.turn__who {
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.turn--ai .turn__who {
  color: var(--ink);
}

.turn p {
  font-size: var(--text-base);
  line-height: 1.45;
}

.hl {
  padding: 0.05em 0.15em;
  background: var(--yellow);
  color: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media (min-width: 62rem) {
  .how__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--s-8);
  }

  .how__grid .steps {
    order: 2;
  }

  .script {
    position: sticky;
    top: var(--s-5);
  }
}

/* ---------- What to ask (directory listing) ---------- */
.asks .sec-head {
  display: grid;
  gap: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: var(--rule-heavy) solid var(--ink);
}

.asks .sec-head h2 {
  max-width: 14ch;
}

.asks .kicker {
  margin-bottom: 0;
}

.listing {
  display: grid;
  gap: 0 var(--s-8);
}

.entry {
  display: grid;
  gap: var(--s-3);
  align-content: start;
  padding-block: var(--s-5) var(--s-6);
  border-bottom: var(--rule) solid var(--ink);
}

.entry__cat {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry__cat .dots {
  flex: 1;
  border-bottom: 3px dotted var(--ink);
  transform: translateY(-0.28em);
}

.entry h3 {
  font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.4rem);
  text-transform: uppercase;
  font-stretch: 66%;
}

.prompt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  max-width: none;
  padding: var(--s-3) var(--s-4);
  background: var(--night);
  color: var(--on-night);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.prompt::before {
  content: ">";
  color: var(--yellow);
  font-weight: 700;
}

.asks__note {
  margin-top: var(--s-5);
  font-weight: 600;
}

@media (min-width: 48rem) {
  .listing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .asks .sec-head {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }

  .asks .sec-head .kicker {
    grid-column: 1 / -1;
  }
}

/* ---------- Incoming calls ---------- */
.incoming__grid {
  display: grid;
  gap: var(--s-7);
}

.incoming__art {
  padding-block: var(--s-4);
}

.incoming__art figcaption {
  margin-top: var(--s-6);
  text-align: center;
}

.incoming .lede {
  margin-block: var(--s-5) var(--s-6);
}

.points {
  display: grid;
  gap: var(--s-5);
}

.points > div {
  padding-left: var(--s-4);
  border-left: var(--rule-heavy) solid var(--yellow);
}

.points dt {
  font-stretch: 75%;
  font-weight: 800;
  font-size: var(--text-lg);
  line-height: 1.15;
}

.points dd {
  max-width: 54ch;
  margin-top: var(--s-1);
  color: var(--fg-soft);
}

@media (min-width: 62rem) {
  .incoming__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s-8);
    align-items: center;
  }

  .incoming__art {
    order: -1;
  }
}

/* ---------- Safety and limits ---------- */
.limits__grid {
  display: grid;
  gap: var(--s-7);
}

.limits .sec-head {
  margin-bottom: var(--s-5);
}

.limits h2 span {
  color: var(--yellow);
}

.limits__copy {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}

.limits__copy p {
  color: var(--on-night-mute);
}

.limits__copy .lede {
  color: var(--on-night);
}

.limits__table {
  border-top: var(--rule-heavy) solid var(--yellow);
}

.limits__table > div {
  border-bottom: 1px solid var(--night-rule);
}

.limits__table dt {
  font-size: var(--text-lg);
  font-weight: 500;
}

.limits__table dd {
  color: var(--yellow);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.limits__cap {
  margin-bottom: var(--s-3);
  color: var(--on-night-mute);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 62rem) {
  .limits__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s-8);
  }
}

/* ---------- Sign-up call to action ---------- */
.join__grid {
  display: grid;
  gap: var(--s-5);
}

.join .sec-head {
  margin-bottom: 0;
}

.join__copy {
  display: grid;
  gap: var(--s-5);
  align-content: start;
  max-width: 44rem;
}

@media (min-width: 62rem) {
  .join__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s-8);
    align-items: end;
  }
}

/* ---------- Contact form ---------- */
.access__grid {
  display: grid;
  gap: var(--s-7);
}

.access__copy {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}

.access__copy .sec-head {
  margin-bottom: var(--s-2);
}

.form,
.thanks {
  border: var(--rule) solid var(--ink);
  background: var(--paper-white);
  box-shadow: 8px 8px 0 var(--yellow), 8px 8px 0 2px var(--ink);
}

.form {
  display: grid;
  gap: var(--s-5);
  padding: clamp(var(--s-4), 4vw, var(--s-6));
}

.form__row {
  display: grid;
  gap: var(--s-5);
}

.field {
  display: grid;
  gap: var(--s-2);
  align-content: start;
}

.field label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field label small {
  color: var(--ink-mute);
  font-size: inherit;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border: var(--rule) solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  background: var(--paper-white);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  background: var(--paper-white);
  box-shadow: 4px 4px 0 var(--yellow);
}

.field [aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: inset 4px 0 0 var(--red);
}

.field__hint {
  color: var(--ink-mute);
  font-size: var(--text-sm);
}

.field__err {
  color: var(--red);
  font-size: var(--text-sm);
  font-weight: 700;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4) var(--s-5);
  padding-bottom: var(--s-2);
}

.form__status {
  flex: 1 1 14rem;
  min-height: 1.5em;
  font-size: var(--text-sm);
  font-weight: 600;
}

.form__status[data-kind="error"] {
  padding: var(--s-2) var(--s-3);
  border-left: var(--rule-heavy) solid var(--red);
  background: var(--paper);
  color: var(--red);
}

.thanks {
  padding: clamp(var(--s-5), 5vw, var(--s-7));
  background: var(--yellow);
  box-shadow: 8px 8px 0 var(--ink);
}

.thanks:focus-visible {
  outline-offset: 12px;
}

.thanks h3 {
  margin-bottom: var(--s-4);
  font-stretch: 62%;
  font-size: var(--text-2xl);
  line-height: 0.92;
  text-transform: uppercase;
}

.thanks p + p {
  margin-top: var(--s-2);
}

@media (min-width: 40rem) {
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 62rem) {
  .access__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s-8);
  }
}

/* ---------- Entrance motion (transform and opacity only) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__title,
  .hero__copy,
  .term {
    animation: rise var(--slow) var(--ease-out) both;
  }

  .hero__copy {
    animation-delay: 90ms;
  }

  .term {
    animation-delay: 180ms;
  }

  .hero .slip {
    animation: drop var(--slow) var(--ease-out) 420ms both;
  }

  .term__dot {
    animation: ring 1.8s ease-in-out infinite;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-28px) rotate(7deg);
  }
}

@keyframes ring {
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}
