/* Knapp Build
   One page. Light, big type, terracotta carries the brand. */

:root {
  --bg: oklch(1 0 0);
  --ink: oklch(0.22 0.015 34);
  --ink-soft: oklch(0.36 0.02 34);
  --line: oklch(0.88 0.01 34);
  --brand: oklch(0.50 0.155 34);        /* terracotta, white text passes AA on this */
  --brand-deep: oklch(0.40 0.13 34);
  --brand-tint: oklch(0.955 0.02 34);   /* used only behind screenshots */
  --on-brand: oklch(1 0 0);
  --on-brand-soft: oklch(0.93 0.03 34);

  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Zilla Slab", Georgia, "Times New Roman", serif;

  --measure: 62ch;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --block: clamp(4rem, 10vw, 8rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --z-sticky: 10;
  --z-skip: 20;
}

* { box-sizing: border-box; }

html {
  font-size: 112.5%;              /* 18px base; the audience is over 50 */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.6rem, 8.5vw, 5.2rem); }
h2 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.7rem); }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

a { color: var(--brand-deep); text-underline-offset: 0.15em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: var(--z-skip);
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
}
.skip:focus { top: 1rem; }

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
}
.mark { width: 1.5rem; height: 1.5rem; fill: var(--brand); }

.top-link {
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0.85rem 1.6rem;
  border-radius: 10px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid var(--brand);
  cursor: pointer;
  transition: background 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--on-brand); }
.btn:active { transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--brand-deep); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-deep); border-color: var(--brand); }

.btn-light { background: var(--on-brand); color: var(--brand-deep); border-color: var(--on-brand); }
.btn-light:hover { background: var(--on-brand-soft); border-color: var(--on-brand-soft); color: var(--brand-deep); }

/* Hero */

.hero {
  padding: clamp(3rem, 9vw, 7rem) var(--gutter) clamp(3rem, 7vw, 5rem);
  max-width: 68rem;
  margin-inline: auto;
}
.hero h1 { max-width: 14ch; }
.lead {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  max-width: var(--measure);
  margin-top: 1.5rem;
  color: var(--ink-soft);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
@media (max-width: 480px) {
  .actions .btn { flex: 1 1 100%; }
}

/* Shared section bits */

.section-lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-top: 0.75rem;
}

/* Work */

.work {
  padding: var(--block) var(--gutter);
  max-width: 68rem;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.projects {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

.project {
  display: grid;
  gap: 1.25rem 2.5rem;
  align-items: center;
}
@media (min-width: 760px) {
  .project { grid-template-columns: 1.15fr 1fr; }
  .project:nth-child(even) .shots { order: 2; }
}

.shots {
  position: relative;
  display: block;
  background: var(--brand-tint);
  border-radius: 14px;
  padding: 7% 12% 0 7%;
  overflow: hidden;
  isolation: isolate;
}
.shot-desktop {
  width: 100%;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 14px 32px -12px rgba(60, 20, 10, 0.35);
  transition: transform 500ms var(--ease-out);
}
.shot-phone {
  position: absolute;
  right: 4%;
  bottom: -6%;
  width: 24%;
  border-radius: 12px;
  border: 3px solid var(--ink);
  box-shadow: 0 18px 30px -10px rgba(60, 20, 10, 0.45);
  transition: transform 500ms var(--ease-out);
}
.shots:hover .shot-desktop { transform: translateY(-4px); }
.shots:hover .shot-phone { transform: translateY(-8px); }

.project-text h3 a { color: var(--ink); text-decoration: none; }
.project-text h3 a:hover { color: var(--brand); text-decoration: underline; }
.project-text p { margin-top: 0.6rem; color: var(--ink-soft); }
.project-text .tag {
  margin-top: 0.9rem;
  color: var(--brand-deep);
  font-weight: 700;
}

/* Offer: the drenched block */

.offer {
  background: var(--brand);
  color: var(--on-brand);
  padding: var(--block) var(--gutter);
}
.offer-inner { max-width: 68rem; margin-inline: auto; }
.offer h2 { color: var(--on-brand); }
.offer-cols {
  display: grid;
  gap: 2.5rem 3rem;
  margin-top: 2.5rem;
}
@media (min-width: 760px) { .offer-cols { grid-template-columns: 1fr 1fr; } }

.offer-item h3 { color: var(--on-brand); font-size: clamp(1.7rem, 4vw, 2.3rem); }
.price {
  margin-top: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--on-brand);
}
.checks {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.75rem;
  color: var(--on-brand-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}
.checks li {
  position: relative;
  padding-left: 1.7rem;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.85rem;
  height: 0.5rem;
  border-left: 3px solid var(--on-brand);
  border-bottom: 3px solid var(--on-brand);
  transform: rotate(-45deg);
}

/* How it goes: the one real sequence on the page */

.how {
  padding: var(--block) var(--gutter);
  max-width: 68rem;
  margin-inline: auto;
}
.steps {
  list-style: none;
  counter-reset: step;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.steps li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 3px solid var(--brand);
}
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--brand);
  margin-bottom: 0.6rem;
}
.steps p { margin-top: 0.6rem; color: var(--ink-soft); }

/* About */

.about {
  padding: 0 var(--gutter) var(--block);
  max-width: 68rem;
  margin-inline: auto;
  display: grid;
  gap: 2rem;
  align-items: start;
}
.about-photo:empty { display: none; }
.about-photo img {
  border-radius: 14px;
  aspect-ratio: 1;
  object-fit: cover;
}
@media (min-width: 760px) {
  .about:has(.about-photo:not(:empty)) { grid-template-columns: 1fr 1.6fr; }
}
.about-text p { margin-top: 1rem; max-width: var(--measure); color: var(--ink-soft); }

/* Contact */

.contact {
  background: var(--brand-deep);
  color: var(--on-brand);
  padding: var(--block) var(--gutter);
}
.contact-inner { max-width: 44rem; margin-inline: auto; }
.contact h2 { color: var(--on-brand); }
.contact .section-lead { color: var(--on-brand-soft); }
.contact .section-lead a { color: var(--on-brand); }

.form {
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--on-brand);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  min-height: 52px;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--on-brand);
  outline-offset: 3px;
}
.field.invalid input, .field.invalid textarea { border-color: oklch(0.85 0.15 60); }
.field .error { font-size: 0.95rem; color: var(--on-brand); font-weight: 700; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form .btn { justify-self: start; min-width: 10rem; }
.form-status { min-height: 1.5em; font-weight: 700; }
.form-status a { color: var(--on-brand); }

/* Footer */

.foot {
  padding: 2.5rem var(--gutter);
  max-width: 68rem;
  margin-inline: auto;
  color: var(--ink-soft);
}
.foot .small { font-size: 0.9rem; margin-top: 0.5rem; }

/* Motion: scroll-driven reveals, CSS only, visible by default */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .project, .steps li, .offer-item {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}
@keyframes rise {
  from { opacity: 0.001; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .shot-desktop, .shot-phone { transition: none; }
}
