/*
 * Tessellate (fictional): a modern B2B software look. Deep indigo ink on warm paper, one electric
 * violet and a lime signal colour, a geometric display face over a humanist text face, and a
 * triangle-tiled texture (the product's name) behind the hero. System fonts only: the site's CSP
 * allows no external fonts.
 */
:root {
  --ink: #14122b;
  --ink-soft: #2a2750;
  --paper: #faf8f5;
  --card: #ffffff;
  --muted: #4a4766;
  --rule: #e3dfd6;
  --violet: #5b3df5;
  --violet-deep: #3f26c9;
  --lime: #c8f169;
  --on-ink-muted: #bdbae0;
  --error: #a3171f;

  --font-display:
    'Avenir Next', 'Avenir', 'Century Gothic', 'Segoe UI Variable Display', 'Trebuchet MS',
    system-ui, sans-serif;
  --font-text: 'Segoe UI Variable Text', 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;

  font-family: var(--font-text);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

body {
  margin: 0;
}

h1,
h2,
h3,
.brand {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--lime);
  color: var(--ink);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1.25rem, 5vw, 4rem);
  background: var(--ink);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

/* The mark: a hexagon cut into three tiles. */
.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: conic-gradient(from 30deg, var(--lime) 0 33%, var(--violet) 0 66%, #fff 0 100%);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.site-header nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover {
  border-bottom-color: var(--lime);
}

.site-header .nav-cta {
  padding: 0.45rem 0.9rem;
  border: 2px solid var(--lime);
  border-radius: 999px;
  color: var(--lime);
}

.site-header .nav-cta:hover {
  background: var(--lime);
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.site-header a:focus-visible,
.slot-hero a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--lime);
}

/*
 * Slot size contracts (ADR 0011 section 6, ADR 0019: the site owns them). Each slot reserves room
 * for its tallest variant (src/variants.ts), plan terms included, so swapping or keeping content
 * never shifts the layout (CLS <= 0.01). Slots never hide overflow: content that outgrows its
 * box must fail a check, not clip. Sized for the widest system fonts plus headroom.
 */
.slot {
  box-sizing: border-box;
  contain: layout;
}

.slot-hero {
  position: relative;
  min-height: 40rem;
  padding: 4rem clamp(1.25rem, 5vw, 4rem);
  background-color: var(--ink);
  /* Triangle tiling: two offset gradients make a diamond lattice. */
  background-image:
    linear-gradient(135deg, var(--ink-soft) 25%, transparent 25%),
    linear-gradient(225deg, var(--ink-soft) 25%, transparent 25%),
    linear-gradient(45deg, #1b1840 25%, transparent 25%),
    linear-gradient(315deg, #1b1840 25%, var(--ink) 25%);
  background-size: 3rem 3rem;
  background-position:
    1.5rem 0,
    1.5rem 0,
    0 0,
    0 0;
  color: #fff;
}

.slot-hero > * {
  position: relative;
  max-width: 44rem;
}

.slot-hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 1.05;
  font-weight: 800;
}

.slot-hero p {
  color: #e9e7fb;
  font-size: 1.125rem;
}

.slot-hero .terms {
  margin: 2rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--on-ink-muted);
  color: var(--on-ink-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.proof-wrap {
  padding: 0 clamp(1.25rem, 5vw, 4rem);
}

.slot-proof {
  position: relative;
  min-height: 14rem;
  margin-top: -2rem;
  padding: 2rem 2.25rem 2rem 2.5rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 0.5rem solid var(--violet);
  border-radius: 0.25rem 1.5rem 0.25rem 1.5rem;
  box-shadow: 0.75rem 0.75rem 0 var(--lime);
}

.slot-proof h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.2;
}

.slot-proof p {
  max-width: 44rem;
  color: var(--muted);
}

.slot-next-step {
  min-height: 16rem;
  margin: 0 clamp(1.25rem, 5vw, 4rem) 3rem;
  padding: 1.75rem 2rem;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 1.5rem 0.25rem 1.5rem 0.25rem;
}

.slot-next-step h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.slot-next-step p {
  max-width: 40rem;
  color: var(--muted);
}

/* A slot marked collapsible gives up its reserved space when true-path hides it. */
[data-tp-collapsible][data-tp-shown='hide'] {
  display: none;
}

@media (max-width: 640px) {
  .slot-hero {
    min-height: 42rem;
    padding: 2.5rem 1.25rem;
  }

  .slot-proof {
    min-height: 19rem;
    padding: 1.5rem 1.25rem 1.5rem 1.5rem;
  }

  .slot-next-step {
    min-height: 21rem;
  }
}

/* The narrowest phones wrap the most. */
@media (max-width: 360px) {
  .slot-hero {
    min-height: 47rem;
  }

  .slot-proof {
    min-height: 23rem;
  }

  .slot-next-step {
    min-height: 25rem;
  }
}

/*
 * Slots stay hidden until the SDK marks them done. If JavaScript never runs, this CSS-only
 * failsafe reveals the baseline after the SDK timeout plus 100 ms (the bootstrap sets `--tp-reveal`;
 * 450 ms is the default timeout of 350 ms plus 100 ms). Visibility changes cause no layout shift.
 */
[data-tp-slot]:not([data-tp-done]) {
  visibility: hidden;
  animation: tp-reveal 0s var(--tp-reveal, 450ms) forwards;
}

@keyframes tp-reveal {
  to {
    visibility: visible;
  }
}

.tp-eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
}

.cta {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.8rem 1.4rem;
  background: var(--lime);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0.25rem 0.25rem 0 var(--violet);
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out;
}

.cta:hover {
  transform: translate(0.125rem, 0.125rem);
  box-shadow: 0.125rem 0.125rem 0 var(--violet);
}

.cta:active {
  transform: translate(0.25rem, 0.25rem);
  box-shadow: 0 0 0 var(--violet);
}

.slot-next-step .cta,
.section-form .cta {
  background: var(--violet);
  color: #fff;
  box-shadow: 0.25rem 0.25rem 0 var(--ink);
}

.slot-next-step .cta:hover,
.section-form .cta:hover {
  box-shadow: 0.125rem 0.125rem 0 var(--ink);
}

.tp-link {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--violet-deep);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .cta {
    transition: none;
  }
}

.section {
  padding: 3.5rem clamp(1.25rem, 5vw, 4rem);
}

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section p {
  max-width: 44rem;
  color: var(--muted);
}

.section-tint {
  background: #efeafd;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
}

.tile {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.25rem 1.25rem 0.25rem 1.25rem;
}

.tile h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.tile p {
  margin: 0.25rem 0;
}

.tile-featured {
  border: 2px solid var(--violet);
  transform: translateY(-0.5rem);
}

.price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
}

.price span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}

.fictional-note {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.app-intro {
  padding-bottom: 1.5rem;
}

.site-footer {
  padding: 2rem clamp(1.25rem, 5vw, 4rem);
  background: var(--ink);
  color: var(--on-ink-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
  max-width: 44rem;
}

.site-footer p:first-child {
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
}

.site-form {
  display: grid;
  gap: 1rem;
  max-width: 30rem;
  margin-top: 1rem;
}

.field {
  display: grid;
  gap: 0.25rem;
}

.field label {
  font-weight: 700;
}

.field input,
.field select {
  box-sizing: border-box;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 0.25rem;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

/* The honeypot: out of sight and out of the layout, not display:none (some bots skip those). */
.field-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.required {
  color: var(--ink);
}

/* Reserved: a field's message appears without moving the next field. */
.field-error {
  min-height: 1.5rem;
  margin: 0;
  color: var(--error);
  font-weight: 700;
}

.field input[aria-invalid='true'],
.field select[aria-invalid='true'] {
  border-color: var(--error);
}

.site-form .cta {
  justify-self: start;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Reserved space: the success message appears without moving anything below it. */
.form-status {
  min-height: 3rem;
  margin: 0;
  color: var(--ink);
}

#demo {
  scroll-margin-top: 1rem;
}
