/*
 * thanku.tech styles. Values come only from tokens.css. Motion is transform and opacity
 * only, each animation named in one word beside it, and all of it is off under
 * prefers-reduced-motion. Media query widths are the one place a raw number appears:
 * CSS does not allow a variable there.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text-2);
  font-family: var(--font);
  font-size: var(--body-size);
  line-height: var(--body-line);
  font-weight: var(--w-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: var(--focus-w) solid var(--accent);
  outline-offset: var(--focus-gap);
  border-radius: var(--r-sm);
}

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Skip link: off screen until focused. */
.skip {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 10;
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md);
  background: var(--page-band);
  color: var(--text);
  font-size: var(--small-size);
  line-height: var(--small-line);
  text-decoration: none;
  transform: translateY(calc(-100% - 2 * var(--s-4)));
}

.skip:focus-visible {
  transform: none;
}

/* Header */

.site-header {
  border-bottom: var(--line) solid var(--hairline);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--text);
  font-size: var(--body-size);
  font-weight: var(--w-semibold);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
}

.mark {
  width: var(--mark-size);
  height: var(--mark-size);
  flex: none;
}

.mark-from {
  stop-color: var(--icon-from);
}

.mark-to {
  stop-color: var(--icon-to);
}

.mark-u {
  fill: none;
  stroke: var(--icon-mark);
  stroke-width: 100;
  stroke-linecap: round;
}

.mark-dot {
  fill: var(--icon-mark);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--s-6);
}

.nav-link {
  color: var(--text-2);
  font-size: var(--small-size);
  line-height: var(--small-line);
  font-weight: var(--w-medium);
  text-decoration: none;
  transition: opacity var(--t-fast) ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:active {
  opacity: 0.7;
}

/* The call to action */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--s-12);
  padding: 0 var(--s-6);
  border-radius: var(--r-lg);
  background: var(--accent-fill);
  color: var(--on-accent);
  font-size: var(--body-size);
  line-height: var(--small-line);
  font-weight: var(--w-semibold);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-fast) ease;
}

.button:hover {
  background: var(--accent-fill-hover);
}

.button:active {
  background: var(--accent-fill-active);
  transform: scale(var(--press-scale));
}

.button:focus-visible {
  border-radius: var(--r-lg);
}

.button-small {
  min-height: var(--s-10);
  padding: 0 var(--s-4);
  border-radius: var(--r-md);
  font-size: var(--small-size);
}

.button-small:focus-visible {
  border-radius: var(--r-md);
}

.text-link {
  color: var(--accent);
  font-weight: var(--w-medium);
  text-decoration: underline;
  text-decoration-color: var(--accent-ring);
  text-underline-offset: var(--s-1);
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

.text-link:active {
  opacity: 0.7;
}

.text-link.quiet {
  color: var(--text-2);
  font-weight: var(--w-regular);
  text-decoration-color: var(--hairline);
}

.text-link.quiet:hover {
  color: var(--text);
  text-decoration-color: var(--text-3);
}

/* Hero */

.hero {
  padding-top: var(--s-24);
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  max-width: var(--measure-wide);
  color: var(--text);
  font-size: var(--hero-size);
  line-height: var(--hero-line);
  font-weight: var(--w-semibold);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

.lead {
  max-width: var(--measure);
  margin-top: var(--s-5);
  color: var(--text-2);
  font-size: var(--lead-size);
  line-height: var(--lead-line);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.beta {
  color: var(--text-3);
  font-size: var(--small-size);
  line-height: var(--small-line);
}

.hero-figure {
  margin-top: var(--s-16);
}

/* A soft glow under the drawing, so the overlay's translucent surface has something to sit on. */
.stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding: var(--s-10) 0;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.figure-note {
  max-width: var(--measure);
  margin: var(--s-4) auto 0;
  color: var(--text-3);
  font-size: var(--small-size);
  line-height: var(--small-line);
  text-align: center;
}

/*
 * The drawn overlay. Every size is the app's own pixel value (a unitless token) times
 * --ov-u, which is 1px when the column is at least 690 px wide and less below that.
 */
.drawing {
  position: relative;
  width: 100%;
  max-width: calc(var(--ov-width) * var(--unit));
  container-type: inline-size;
}

.heard,
.ov {
  --ov-u: min(var(--unit), calc(100cqw / var(--ov-width)));
}

.heard {
  display: flex;
  align-items: baseline;
  gap: calc(var(--ov-gap-2) * var(--ov-u));
  margin-bottom: calc(var(--ov-heard-gap) * var(--ov-u));
  padding-left: calc(var(--ov-pad) * var(--ov-u));
  font-size: calc(var(--ov-ui) * var(--ov-u));
  line-height: calc(var(--ov-ui-line) * var(--ov-u));
  color: var(--text-3);
}

.heard-who {
  flex: none;
  color: var(--text-4);
  font-size: calc(var(--ov-caption) * var(--ov-u));
  line-height: calc(var(--ov-caption-line) * var(--ov-u));
  font-weight: var(--w-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ov {
  overflow: hidden;
  border-radius: calc(var(--ov-r-xl) * var(--ov-u));
  background: var(--ov-surface);
  box-shadow: var(--shadow-overlay);
  font-family: var(--font);
  color: var(--ov-text);
  /* rise: the overlay fades up once on load. */
  animation: rise var(--t-rise) var(--ease) both;
}

.ov-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--ov-input-h) * var(--ov-u));
  padding: 0 calc(var(--ov-pad) * var(--ov-u)) 0 calc(var(--ov-gap-4) * var(--ov-u));
  background: var(--ov-band-input);
}

.ov-placeholder {
  color: var(--ov-text-3);
  font-size: calc(var(--ov-input) * var(--ov-u));
  line-height: calc(var(--ov-input-line) * var(--ov-u));
  font-weight: var(--w-medium);
}

.ov-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--ov-send) * var(--ov-u));
  height: calc(var(--ov-send) * var(--ov-u));
  border-radius: calc(var(--ov-r-md) * var(--ov-u));
  background: var(--ov-fill-active);
  color: var(--ov-text-2);
  font-size: calc(var(--ov-ui) * var(--ov-u));
  font-weight: var(--w-semibold);
}

.ov-content {
  display: flex;
  flex-direction: column;
  gap: calc(var(--ov-gap-3) * var(--ov-u));
  min-height: calc(var(--ov-content-h) * var(--ov-u));
  padding: calc(var(--ov-pad) * var(--ov-u));
}

.ov-bubble {
  align-self: flex-end;
  max-width: var(--ov-bubble-max);
  padding: calc(var(--ov-gap-2) * var(--ov-u)) calc(var(--ov-pad) * var(--ov-u));
  border-radius: calc(var(--ov-r-xl) * var(--ov-u)) calc(var(--ov-r-xl) * var(--ov-u))
    calc(var(--ov-r-tail) * var(--ov-u)) calc(var(--ov-r-xl) * var(--ov-u));
  background: var(--ov-bubble);
  color: var(--ov-text);
  font-size: calc(var(--ov-ui) * var(--ov-u));
  line-height: calc(var(--ov-ui-line) * var(--ov-u));
  font-weight: var(--w-medium);
}

.ov-answer {
  display: flex;
  flex-direction: column;
  gap: calc(var(--ov-gap-2) * var(--ov-u));
  color: var(--ov-text);
  font-size: calc(var(--ov-body) * var(--ov-u));
  line-height: calc(var(--ov-body-line) * var(--ov-u));
}

.ov-line {
  display: block;
  /* reveal: each sentence line appears in turn, once. */
  animation: reveal var(--t-line) var(--ease) both;
}

.ov-line:nth-child(1) { animation-delay: var(--line-delay-1); }
.ov-line:nth-child(2) { animation-delay: var(--line-delay-2); }
.ov-line:nth-child(3) { animation-delay: var(--line-delay-3); }
.ov-line:nth-child(4) { animation-delay: var(--line-delay-4); }

.ov-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--ov-toolbar-h) * var(--ov-u));
  padding: 0 calc(var(--ov-gap-1) * var(--ov-u));
  background: var(--ov-band-toolbar);
  border-top: var(--line) solid var(--ov-hairline);
}

.ov-group {
  display: flex;
  align-items: center;
  gap: calc(var(--ov-gap-1) * var(--ov-u));
}

.ov-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--ov-control) * var(--ov-u));
  height: calc(var(--ov-control) * var(--ov-u));
  border-radius: calc(var(--ov-r-lg) * var(--ov-u));
  color: var(--ov-text-3);
}

.ov-btn.is-on {
  color: var(--ov-text);
}

.ov-btn svg {
  width: calc(var(--ov-icon) * var(--ov-u));
  height: calc(var(--ov-icon) * var(--ov-u));
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ov-btn .cog {
  stroke-width: 3;
  stroke-dasharray: 2.6 3.29;
}

.ov-btn .dot-fill {
  fill: currentColor;
  stroke: none;
}

.ov-stop {
  color: var(--danger);
}

.ov-btn .stop-fill {
  fill: currentColor;
  stroke: none;
}

.ov-divider {
  width: var(--line);
  height: calc(var(--ov-toolbar-h) * var(--ov-u) / 2);
  margin: 0 calc(var(--ov-gap-2) * var(--ov-u));
  background: var(--ov-hairline);
}

.ov-live {
  width: calc(var(--ov-dot) * var(--ov-u));
  height: calc(var(--ov-dot) * var(--ov-u));
  margin: 0 calc(var(--ov-gap-1) * var(--ov-u));
  border-radius: var(--r-pill);
  background: var(--accent);
}

.ov-timer {
  color: var(--ov-text-2);
  font-size: calc(var(--ov-label) * var(--ov-u));
  line-height: calc(var(--ov-label-line) * var(--ov-u));
  font-weight: var(--w-semibold);
  font-variant-numeric: tabular-nums;
}

.ov-text-btn {
  display: inline-flex;
  align-items: center;
  height: calc(var(--ov-control) * var(--ov-u));
  padding: 0 calc(var(--ov-pad) * var(--ov-u));
  border-radius: calc(var(--ov-r-lg) * var(--ov-u));
  color: var(--ov-text-2);
  font-size: calc(var(--ov-label) * var(--ov-u));
  line-height: calc(var(--ov-label-line) * var(--ov-u));
  font-weight: var(--w-semibold);
}

/* Sections */

.section {
  padding-top: var(--section-gap);
}

h2 {
  color: var(--text);
  font-size: var(--h2-size);
  line-height: var(--h2-line);
  font-weight: var(--w-semibold);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

h3 {
  color: var(--text);
  font-size: var(--body-size);
  line-height: var(--body-line);
  font-weight: var(--w-semibold);
}

.steps,
.features {
  display: grid;
  gap: var(--s-4);
  margin-top: var(--s-8);
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: var(--s-6);
  border: var(--line) solid var(--hairline);
  border-radius: var(--r-xl);
  background: var(--page-raised);
}

.card p,
.features p {
  margin-top: var(--s-2);
  color: var(--text-2);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--step-badge);
  height: var(--step-badge);
  margin-bottom: var(--s-4);
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--small-size);
  line-height: var(--small-line);
  font-weight: var(--w-semibold);
  font-variant-numeric: tabular-nums;
}

.features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--s-8);
  row-gap: var(--s-8);
}

.features li {
  padding-top: var(--s-4);
  border-top: var(--line) solid var(--hairline);
}

.privacy-band {
  max-width: var(--measure-wide);
}

.privacy-band p {
  margin-top: var(--s-4);
}

.closing-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding-top: var(--s-12);
  padding-bottom: var(--s-12);
  border-top: var(--line) solid var(--hairline);
  border-bottom: var(--line) solid var(--hairline);
}

.closing .wrap {
  max-width: var(--content);
  padding-left: 0;
  padding-right: 0;
}

.closing {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Footer */

.site-footer {
  margin-top: var(--s-12);
  padding-bottom: var(--s-12);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
  color: var(--text-3);
  font-size: var(--small-size);
  line-height: var(--small-line);
}

/* The privacy page */

.doc {
  max-width: var(--measure-wide);
  padding-top: var(--s-16);
}

.doc h1 {
  font-size: var(--h2-size);
  line-height: var(--h2-line);
}

.doc .dated {
  margin-top: var(--s-2);
  color: var(--text-3);
  font-size: var(--small-size);
  line-height: var(--small-line);
}

.doc h2 {
  margin-top: var(--s-10);
  font-size: var(--body-size);
  line-height: var(--body-line);
}

.doc p,
.doc ul {
  margin-top: var(--s-3);
}

.doc ul {
  list-style: disc;
  padding-left: var(--s-6);
}

.doc li + li {
  margin-top: var(--s-2);
}

.doc strong {
  color: var(--text);
  font-weight: var(--w-semibold);
}

/* Layout below the widest widths */

@media (max-width: 959px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  .ov-opt {
    display: none;
  }
}

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

  .features {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--s-6);
  }

  .hero {
    padding-top: var(--s-16);
  }

  .hero-figure {
    margin-top: var(--s-10);
  }

  .stage {
    padding: var(--s-6) 0;
  }

  .closing-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Motion */

/* rise: fade up once. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(var(--rise-from));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* reveal: one sentence line appearing. */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(var(--line-from));
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ov,
  .ov-line {
    animation: none;
  }

  .button,
  .nav-link {
    transition: none;
  }

  .button:active {
    transform: none;
  }
}
