/* kaaz v6
   Big type, one dark section, a different layout per section.
   Orange is only ever a fill with ink text on top of it (orange text on paper
   would fail contrast). Change the tokens to restyle. */
:root {
  --ink: #111111;
  --paper: #f2f0ea;
  --muted: #5a5852;          /* 6:1 on paper */
  --rule: rgba(17, 17, 17, .18);
  --signal: #ff4a1c;
  --on-dark: #f2f0ea;
  --on-dark-muted: #b8b5ac;  /* 9:1 on ink */
  --error: #b3200e;
  --error-dark: #ff8a73;

  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --body: "Funnel Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --max: 1320px;
  --gut: clamp(16px, 3.4vw, 48px);
  --gap: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; background: var(--paper); scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, details { margin: 0; }
ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wrap {
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; padding: 10px 14px; background: var(--ink); color: var(--paper); }
.skip:focus { left: max(8px, env(safe-area-inset-left, 0px)); }

.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; transition: text-decoration-thickness 150ms ease; }
.link:hover { text-decoration-thickness: 3px; }
.js-email { display: inline-block; padding-block: 12px; margin-block: -12px; }

.small { font: 600 .95rem/1.3 var(--body); }
.h2 { font: 700 clamp(2.2rem, 5vw, 4.4rem)/.98 var(--display); letter-spacing: -.035em; text-wrap: balance; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 32px; border: 0; border-radius: 0;
  background: var(--signal); color: var(--ink);
  font: 600 1.15rem/1 var(--display); letter-spacing: -.01em; text-decoration: none; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }

/* header */
.top { padding-top: env(safe-area-inset-top, 0px); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
/* logo: ka2z (the 2 is superscript), the double a written as a squared, with the 2 in orange (also logo.svg) */
.wordmark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.logo { font: 600 1.8rem/1 var(--display); letter-spacing: -.035em; white-space: nowrap; }
.logo sup { position: relative; top: -0.56em; margin: 0 .02em 0 .04em; font-size: .56em; line-height: 1; vertical-align: baseline; letter-spacing: 0; color: var(--signal); }
.top__nav { display: none; margin-left: auto; gap: clamp(18px, 2.4vw, 36px); }
.nav-link { position: relative; padding: 12px 0; font-size: .95rem; text-decoration: none; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease); }
.nav-link:hover::after { transform: scaleX(1); }
.top__cta { padding: 12px 0; font-weight: 600; font-size: .95rem; }

/* hero
   A four-line poster headline. The word in the orange slab rolls through a few
   trades once on load and settles on "trades" (see script.js). */
.hero { min-height: min(78svh, 980px); display: flex; border-bottom: 1px solid var(--ink); }
.hero__in { display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(28px, 5vw, 56px); padding-block: clamp(40px, 7vw, 80px) clamp(32px, 4vw, 56px); }
.hero__h { font: 700 clamp(2.6rem, 12.4vw, 7rem)/.98 var(--display); letter-spacing: -.04em; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.w { display: block; overflow: hidden; padding: .04em .08em .1em; margin: -.04em -.08em -.1em; white-space: nowrap; }
.w > span { display: inline-block; animation: rise 900ms var(--ease) both; animation-delay: calc(var(--i) * 80ms); }
@keyframes rise { from { transform: translateY(112%); } to { transform: none; } }
.slab { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: .03em; padding: 0 .14em .1em; background: var(--signal); white-space: nowrap; transition: width 420ms var(--ease); }
.slab__w { display: inline-block; }
.slab__w.is-out { position: absolute; left: .14em; top: 0; }
.c { display: inline-block; transition: transform 420ms var(--ease) calc(var(--k) * 10ms); }
.is-below .c { transform: translateY(115%); transition: none; }
.is-up .c { transform: translateY(-115%); }
.hero__foot { display: grid; gap: 24px; align-items: end; }
.hero__p { max-width: 34rem; color: var(--muted); font-size: 1.125rem; text-wrap: pretty; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--signal); color: var(--ink); }

/* the website */
.site { padding-block: clamp(56px, 8vw, 120px); }
.site__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px; }
.site__in .small { grid-column: 1 / -1; }
.site__lead { grid-column: 1 / -1; font: 500 clamp(2rem, 5.2vw, 4.6rem)/1.02 var(--display); letter-spacing: -.035em; text-wrap: balance; max-width: 18em; }
.site__body { grid-column: 1 / -1; display: grid; gap: 16px; color: var(--muted); font-size: 1.125rem; max-width: 34rem; margin-top: 8px; }
.site__body p { text-wrap: pretty; }

/* sites we built: a two-slide carousel. Each slide is text beside two plain
   screenshots, the phone one overlapping. It scrolls sideways by touch, by the
   two buttons, or with the arrow keys when focused. It never moves on its own. */
.work { border-top: 1px solid var(--ink); padding-block: clamp(40px, 6vw, 88px) clamp(72px, 10vw, 140px); }
.work__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin-bottom: 24px; }
.work__ctrl { display: flex; align-items: center; gap: 8px; }
.work__ctrl[hidden] { display: none; }
.work__count { margin-right: 8px; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.work__btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.work__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.work__btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.work__btn:disabled { border-color: var(--rule); color: #8d8b84; cursor: default; }
.work__track { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.work__track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; align-content: start; }
.work__text { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; justify-items: start; }
.work__text p { max-width: 30rem; text-wrap: pretty; }
.work__note { color: var(--muted); }
.work__link { padding-block: 12px; margin-block: -4px -12px; font-weight: 600; }
.work__shots { grid-column: 1 / -1; position: relative; margin: 0; padding: 0 0 9% 0; }
.work__shots img { display: block; height: auto; }
.work__desk { width: 100%; }
.work__phone { position: absolute; right: 5%; bottom: 0; width: 24%; outline: 6px solid var(--paper); }

/* ongoing care */
.care { border-top: 1px solid var(--ink); padding-block: clamp(40px, 6vw, 88px) clamp(64px, 9vw, 136px); }
.care__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 40px; }
.care__head { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; }
.care__intro { font-size: 1.2rem; max-width: 26rem; }
.care__price { color: var(--muted); max-width: 26rem; margin-top: 8px; }
.care__list { grid-column: 1 / -1; }
.care__row { display: grid; gap: 6px; padding-block: 22px 24px; border-top: 1px solid var(--rule); }
.care__row:last-child { border-bottom: 1px solid var(--rule); }
.care__row dt { font: 700 1.5rem/1.1 var(--display); letter-spacing: -.03em; }
.care__row dd { color: var(--muted); max-width: 36rem; }

/* who it's for */
.who { padding-block: clamp(24px, 4vw, 56px) clamp(64px, 9vw, 136px); }
.who .small { margin-bottom: 20px; }
.who__text { font: 500 clamp(1.7rem, 4.1vw, 3.5rem)/1.1 var(--display); letter-spacing: -.03em; max-width: 24em; text-wrap: pretty; }
.who__text span { color: var(--muted); }

/* how it works */
.how { border-top: 1px solid var(--ink); padding-block: clamp(40px, 6vw, 88px) clamp(72px, 10vw, 150px); }
.steps { margin-top: clamp(36px, 5vw, 72px); }
.step { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); column-gap: var(--gap); row-gap: 6px; padding-block: 24px 30px; }
.step::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--ink); transform-origin: left; }
.js .step::before { transform: scaleX(0); transition: transform 900ms var(--ease); }
.js .step.is-in::before { transform: scaleX(1); }
.step__n { grid-row: 1 / span 2; font: 700 2.4rem/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.step__h { font: 700 1.5rem/1.1 var(--display); letter-spacing: -.03em; }
.step__p { color: var(--muted); max-width: 32rem; text-wrap: pretty; }

/* offer */
.offer { background: var(--ink); color: var(--on-dark); padding-block: clamp(64px, 10vw, 160px); }
.offer :focus-visible { outline-color: var(--on-dark); }
.offer__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 48px; }
.offer__lead { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; color: var(--on-dark-muted); }
.offer__lead p { max-width: 30rem; text-wrap: pretty; }
.offer__lead a { color: var(--on-dark); }
.offer__h { margin-bottom: 8px; color: var(--on-dark); font: 700 clamp(2.6rem, 6.4vw, 5.8rem)/.95 var(--display); letter-spacing: -.04em; text-wrap: balance; }
.form { grid-column: 1 / -1; display: grid; }
.field { margin-bottom: 22px; min-width: 0; }
.field label { display: block; font-size: .875rem; color: var(--on-dark-muted); }
.field input {
  width: 100%; min-height: 48px; padding: 8px 0 6px;
  font: 400 1.15rem/1.3 var(--body); color: var(--on-dark);
  background: transparent; border: 0; border-bottom: 1px solid var(--on-dark); border-radius: 0;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.field input:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 6px; }
.field input:focus { border-bottom-color: var(--signal); box-shadow: inset 0 -2px 0 var(--signal); }
.field input[aria-invalid="true"] { border-bottom-color: var(--error-dark); box-shadow: inset 0 -2px 0 var(--error-dark); }
.field__err { font-size: .875rem; color: var(--error-dark); }
.field__err:not(:empty) { margin-top: 6px; }
.form__end { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 14px; }
.offer .btn:hover { background: var(--paper); color: var(--ink); }
.form__msg { flex: 1 1 16rem; font-size: .95rem; color: var(--on-dark-muted); }
.form__msg.is-error { color: var(--error-dark); }
.form__msg .hl-email { color: var(--on-dark); user-select: all; }
.offer noscript .form__msg { margin-top: 18px; }

/* questions */
.faq { padding-block: clamp(64px, 9vw, 136px) clamp(64px, 9vw, 120px); }
.faq__list { margin-top: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--ink); }
details { border-top: 1px solid var(--ink); }
summary { position: relative; padding: 22px 56px 22px 0; font: 600 clamp(1.2rem, 2.2vw, 1.6rem)/1.25 var(--display); letter-spacing: -.02em; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before, summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 18px; height: 2px; margin-top: -1px; background: currentColor; transition: transform 250ms var(--ease); }
summary::after { transform: rotate(90deg); }
details[open] summary::after { transform: rotate(0deg); }
summary:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
details p { padding: 0 56px 26px 0; max-width: 40rem; color: var(--muted); text-wrap: pretty; }

/* footer */
.foot { border-top: 1px solid var(--ink); padding-block: 28px max(40px, env(safe-area-inset-bottom, 0px)); }
.foot__in { display: grid; gap: 8px; }
.foot__name { margin-bottom: 4px; }
.foot__name .logo { font-size: 2.2rem; }
.foot__line, .foot__meta { color: var(--muted); font-size: .95rem; }

/* mobile bar */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 16px env(safe-area-inset-bottom, 0px);
  background: var(--signal); color: var(--ink);
  font: 600 1.15rem/1 var(--display); letter-spacing: -.01em; text-decoration: none;
  transform: translateY(105%); visibility: hidden;
  transition: transform 300ms var(--ease), visibility 0s linear 300ms;
}
.bar.is-on { transform: none; visibility: visible; transition-delay: 0s; }

@media (max-width: 899px) {
  .work__phone { right: 0; width: 28%; }
  .foot { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .btn--wide { width: 100%; }
}

@media (min-width: 900px) {
  .bar { display: none; }
  .top__nav { display: flex; }
  .top__cta { margin-left: 24px; }
  .hero__foot { grid-template-columns: minmax(0, 34rem) auto; justify-content: space-between; column-gap: var(--gap); }

  .site__in .small { grid-column: 1 / span 12; }
  .site__lead { grid-column: 1 / span 10; }
  .site__body { grid-column: 7 / span 5; margin-top: 24px; }

  .work__text { grid-column: 1 / span 4; }
  .work__shots { grid-column: 6 / -1; }

  .care__head { grid-column: 1 / span 5; position: sticky; top: 32px; }
  .care__list { grid-column: 7 / span 6; }
  .care__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); column-gap: var(--gap); }

  .who .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
  .who .small { grid-column: 1 / -1; }
  .who__text { grid-column: 3 / span 10; }

  .step { grid-template-columns: clamp(4rem, 7vw, 6.5rem) minmax(0, 1fr); margin-left: calc(var(--n) * 8.333%); padding-block: 28px 36px; }
  .step__n { font-size: clamp(3rem, 6vw, 5.4rem); }
  .step__h { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }

  .offer__lead { grid-column: 1 / span 5; position: sticky; top: 32px; }
  .form { grid-column: 7 / span 6; }
}

/* wide screens: headline on the left, the paragraph and button bottom right */
@media (min-width: 1100px) {
  .hero__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-content: end; align-items: end; }
  .hero__h { grid-column: 1 / span 8; font-size: clamp(5rem, min(8.9vw, 15.5svh), 8.4rem); }
  .hero__foot { grid-column: 9 / -1; grid-template-columns: 1fr; justify-items: start; padding-bottom: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html, .work__track { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .step::before { transform: scaleX(1); }
}
