:root {
  --signal: #FFD400;   /* for-sale-sign yellow */
  --ink: #121417;      /* sign lettering */
  --ink-soft: #3A3628; /* secondary text, ~9:1 on signal */
  --proof: #D7261E;    /* proofreader's red pen */
  --rule: #121417;

  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  background: var(--signal);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--signal); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Top bar ---------- */

.bar {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Page ---------- */

.page {
  padding: 0 var(--gutter);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: clamp(32px, 6vh, 64px);
}

/* ---------- The mark: fixed.ai → fixed.si → fixd.si ---------- */

.mark {
  margin: clamp(28px, 9vh, 112px) 0 0;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 850;
  /* sized for the final "fixd.si" (~3.32em); the longer opening word is scaled down to fit */
  font-size: clamp(3rem, calc((100vw - 2 * var(--gutter)) / 3.45), 24rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  overflow-x: clip;
}

.word {
  display: inline-block;
  white-space: nowrap;
}

/* The word opens small enough for "fixed.ai" and grows to full width as the corrections land. */
.anim .word {
  transform: scale(var(--fit, 0.82));
  transform-origin: 0 100%;
  /* same timing as the e-slot collapse, so the right edge holds nearly still */
  transition: transform 520ms cubic-bezier(0.65, 0, 0.35, 1) 1660ms;
}

.anim.go .word { transform: none; }

/* While main.js locks the measured widths, nothing may animate. */
.anim.measuring .word,
.anim.measuring .word * { transition: none !important; }

.tld {
  font-weight: 300;
  letter-spacing: -0.02em;
}

/* Without JS or with reduced motion, the final name shows immediately. */
.e-slot,
.a,
.strike { display: none; }

.anim .e-slot,
.anim .swap {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
}

/* Beat 2: strike the e, drop it, close the gap while the word grows into place. */

.anim .e-slot {
  width: var(--ew, auto);
  transition: width 520ms cubic-bezier(0.65, 0, 0.35, 1) 1660ms;
}

.anim .e,
.anim .dele {
  transition:
    transform 480ms cubic-bezier(0.5, 0, 0.75, 0) 1600ms,
    opacity 360ms ease-in 1680ms;
}

.anim .e {
  display: inline-block;
  transform-origin: 30% 90%;
}

.anim .dele {
  position: absolute;
  left: -22%;
  top: 14%;
  width: 150%;
  height: 74%;
  overflow: visible;
  pointer-events: none;
}

/* Beat 1: strike the a, drop it, set the s in its place. */

.anim .swap {
  width: var(--aw, auto);
  transition: width 420ms cubic-bezier(0.65, 0, 0.35, 1) 450ms;
}

.anim .a,
.anim .strike {
  transition:
    transform 480ms cubic-bezier(0.5, 0, 0.75, 0) 350ms,
    opacity 360ms ease-in 430ms;
}

.anim .a {
  display: inline-block;
  transform-origin: 70% 90%;
}

.anim .strike {
  display: block;
  position: absolute;
  left: -10%;
  top: 30%;
  width: 120%;
  height: 62%;
  overflow: visible;
  pointer-events: none;
}

.anim .s {
  position: absolute;
  left: 0;
  bottom: 0;
  opacity: 0;
  transform: translateY(-0.6em);
  transition:
    opacity 260ms ease-out 500ms,
    transform 560ms cubic-bezier(0.2, 0.7, 0.2, 1) 500ms;
}

/* Red pen */

.dele path,
.strike path {
  fill: none;
  stroke: var(--proof);
  stroke-width: max(3px, 0.045em);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0; /* the round cap would otherwise leave a dot before drawing starts */
}

.dele path {
  transition:
    stroke-dashoffset 560ms cubic-bezier(0.6, 0, 0.3, 1) 950ms,
    opacity 0s linear 950ms;
}

.strike path {
  transition: stroke-dashoffset 320ms cubic-bezier(0.6, 0, 0.3, 1);
}

.anim.go .dele path,
.anim.go .strike path { stroke-dashoffset: 0; opacity: 1; }

.anim.go .e,
.anim.go .dele {
  transform: translateY(0.42em) rotate(16deg);
  opacity: 0;
}
.anim.go .e-slot { width: 0; }

.anim.go .a,
.anim.go .strike {
  transform: translateY(0.42em) rotate(-14deg);
  opacity: 0;
}
.anim.go .swap { width: var(--sw, 0.55em); }
.anim.go .s { opacity: 1; transform: none; }

/* ---------- Dictionary line ---------- */

.entry {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: clamp(14px, 2.4vw, 26px) 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.entry-word {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Pitch + offer ---------- */

.pitch {
  display: grid;
  gap: 40px;
  margin-top: clamp(40px, 8vh, 96px);
}

.lede {
  max-width: 36ch;
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.lede p { margin: 0; }

.lede strong { font-weight: 700; }

.lede .fits {
  margin-top: 1em;
  font-size: 0.8em;
  color: var(--ink-soft);
}

.offer-title {
  margin: 0;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 750;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.offer-note {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn,
.copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 26px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.btn {
  background: var(--ink);
  color: var(--signal);
}

.btn span {
  display: inline-block;
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn:hover span { transform: translateX(4px); }

.btn:active,
.copy:active { transform: translateY(1px); }

.copy {
  background: transparent;
  color: var(--ink);
}

.copy:hover { background: rgba(18, 20, 23, 0.08); }

.copy.is-done,
.copy.is-done:hover {
  background: var(--ink);
  color: var(--signal);
}

.btn:focus-visible,
.copy:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.addr {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

/* ---------- Facts ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(56px, 10vh, 120px) 0 0;
  border-top: 2px solid var(--rule);
}

.facts > div {
  padding: 16px 16px 20px 0;
}

.facts dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.facts dd {
  margin: 6px 0 0;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 650;
  font-size: 1.1875rem;
  line-height: 1.2;
}

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .pitch {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(48px, 7vw, 120px);
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
