/* Sonntagsfein. Palette, type and layout reasons are in DESIGN.md. */

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/literata-latin-opsz.woff2") format("woff2-variations"), url("/assets/fonts/literata-latin-opsz.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-700.woff2") format("woff2");
}

:root {
  --shirt: #ffffff;
  --loden: #22463a;
  --loden-hover: #2f5c4c;
  --loden-pale: #edf2ee;
  --loden-pale-deep: #e2eae4;
  --ink: #1b2420;
  --muted: #4a5a52;
  --brass: #c29a35;
  --brass-light: #d4ae4e;
  --brass-pressed: #b08a2c;
  --brass-edge: #7a5c14;
  --brass-on-dark: #e8c56a;
  --error: #9e3b2e;
  --sketch-line: #9aa8a0;

  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;

  --gutter: 1.25rem;
  --content-width: 72rem;
  --radius-small: 4px;
  --radius-panel: 10px;
  --focus-ring: 3px solid var(--loden);
}

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

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

body {
  margin: 0;
  background: var(--shirt);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  color: var(--loden);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--loden);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--loden-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.75rem 1rem;
  background: var(--loden);
  color: var(--shirt);
  border-radius: var(--radius-small);
  z-index: 10;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--shirt);
}

.skip-link:focus-visible {
  outline-color: var(--brass-edge);
}

/* Header: the wordmark with a brass crease underneath, nothing else on a one-page site. */
.site-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.75rem var(--gutter) 0;
}

.wordmark {
  display: inline-block;
  padding: 0.375rem 0;
  line-height: 0;
}

/* The logo (design/logo, direction A): the name in Literata with the brass crease under it, as outlines. */
.wordmark img {
  display: block;
  width: auto;
  height: 2.25rem;
}

.wordmark:hover img {
  opacity: 0.85;
}

/* Hero: headline, promise and the form first; the drawing follows on phones and sits beside on wide screens. */
.hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 3rem;
  display: grid;
  gap: 2.5rem;
}

.hero h1 {
  font-size: clamp(2.125rem, 1.3rem + 4.2vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lead {
  margin-top: 1rem;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.5;
  max-width: 36em;
}

.request-panel {
  margin-top: 1.5rem;
  background: var(--loden-pale);
  border-radius: var(--radius-panel);
  padding: 1.5rem 1.25rem;
  max-width: 34rem;
  scroll-margin-top: 1rem;
}

.request-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* On a phone the button below says the same, and the first screen needs the room for it. */
.request-form .request-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.field input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.875rem;
  font: inherit;
  font-size: 1.1875rem;
  color: var(--ink);
  background: var(--shirt);
  border: 2px solid var(--loden);
  border-radius: var(--radius-small);
}

.field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:focus-visible {
  outline-offset: 2px;
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
  border-width: 3px;
}

.field-hint {
  margin-top: 0.375rem;
  font-size: 1rem;
  color: var(--muted);
}

.field-error {
  margin-top: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--error);
}

/* The honeypot stays in the document for bots, out of sight and out of the tab order for people. */
.trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.875rem 1.5rem;
  font: inherit;
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--brass);
  border: 2px solid var(--brass-edge);
  border-radius: var(--radius-small);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.button-primary:hover {
  background: var(--brass-light);
  color: var(--ink);
  text-decoration: none;
}

.button-primary:active {
  background: var(--brass-pressed);
}

.button-primary[aria-disabled="true"] {
  cursor: progress;
  background: var(--loden-pale-deep);
  border-color: var(--muted);
  color: var(--ink);
}

.form-note {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--muted);
}

.form-status {
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.form-status:empty {
  display: none;
}

.form-status[data-tone="error"] {
  color: var(--error);
}

.request-sent p + p {
  margin-top: 0.75rem;
}

.request-sent:focus {
  outline: none;
}

.request-sent:focus-visible {
  outline: var(--focus-ring);
}

/* Before and after: the identity motif. The old page lies crooked underneath, the new one lies on top of it, straight. */
.before-after {
  margin: 0;
  max-width: 30rem;
  width: 100%;
  justify-self: center;
}

.frames {
  position: relative;
  padding: 0 0 0 2%;
}

.frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.frame-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 58%;
}

.frame-before svg {
  transform: rotate(-4deg);
  transform-origin: 30% 20%;
}

.frame-after {
  position: relative;
  width: 64%;
  margin: 3.25rem 0 0 auto;
}

/* The only shadow on the page: the new page is the thing lying on top. */
.frame-after svg {
  filter: drop-shadow(0 14px 22px rgba(34, 70, 58, 0.22));
}

.frame-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.frame-after .frame-label {
  color: var(--loden);
  margin: 0.75rem 0 0;
  text-align: right;
}

.before-after figcaption {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  color: var(--ink);
}

.sketch-paper {
  fill: var(--shirt);
  stroke: var(--sketch-line);
}

.frame-after .sketch-paper {
  stroke: var(--loden);
}

.sketch-bar {
  fill: var(--loden-pale-deep);
}

.sketch-logo {
  fill: var(--loden);
}

.sketch-muted {
  fill: #b9c4bd;
}

.sketch-photo {
  fill: #c9d3cc;
}

.sketch-phone-old {
  fill: #b9c4bd;
}

.sketch-ink {
  fill: var(--loden);
}

.sketch-soft {
  fill: #9aa8a0;
}

.sketch-button {
  fill: var(--brass);
}

.sketch-photo-after {
  fill: #a9bdb1;
}

/* What the new site does: heading left, a plain list right. */
.result {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem var(--gutter);
  display: grid;
  gap: 1.5rem;
}

.result h2,
.steps h2,
.questions h2 {
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  font-weight: 600;
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  max-width: 40rem;
}

.result-list li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--sketch-line);
}

.result-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.result-list strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--loden);
}

/* How it goes: a real sequence, so it is numbered; each step names the time it takes. */
/* Full-width bands keep their content on the same column as the other sections. */
.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.steps {
  background: var(--loden-pale);
  padding: 3rem 0;
}

.step-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--shirt);
  background: var(--loden);
  border-radius: var(--radius-small);
}

.step-list h3 {
  font-size: 1.375rem;
  font-weight: 600;
}

.step-time {
  margin: 0.25rem 0 0.5rem;
  font-weight: 700;
  color: var(--brass-edge);
}

/* Questions owners ask before they hand anything over. */
.questions {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem var(--gutter);
  display: grid;
  gap: 1.5rem;
}

.question-list {
  margin: 0;
  display: grid;
  gap: 1.5rem;
  max-width: 40rem;
}

.question-list dt {
  font-weight: 700;
  font-size: 1.1875rem;
}

.question-list dd {
  margin: 0.25rem 0 0;
}

/* Closing band: the one dark surface, with the way back to the form. */
.closing {
  background: var(--loden);
  color: var(--shirt);
  padding: 3rem 0;
}

.closing h2 {
  margin-bottom: 1.5rem;
  color: var(--shirt);
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  font-weight: 600;
}

/* On loden the dark brass edge would melt into the green; the fill itself is the boundary there (3.97:1). */
.button-on-dark {
  border-color: var(--brass);
}

.button-on-dark:hover {
  border-color: var(--brass-light);
}

.button-on-dark:focus-visible {
  outline-color: var(--brass-on-dark);
}

.site-footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 1rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Legal pages */
.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
}

.legal h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

.legal h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

.legal p + p,
.legal dl + p {
  margin-top: 0.75rem;
}

.legal dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
}

.legal dt {
  font-weight: 700;
}

.legal dd {
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere;
}

.legal .updated {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 1rem;
}

@media (min-width: 600px) {
  :root {
    --gutter: 2rem;
  }

  .request-panel {
    padding: 2rem;
  }

  .request-form .request-title {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }

  .hero {
    padding-top: 2rem;
  }

  .button-primary {
    width: auto;
  }

  .legal dl {
    grid-template-columns: 12rem minmax(0, 1fr);
  }

  .legal dd {
    margin-bottom: 0.25rem;
  }

  .step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .step-list li {
    padding-left: 0;
    padding-top: 3.5rem;
  }
}

@media (min-width: 900px) {
  body {
    font-size: 1.1875rem;
  }

  .wordmark img {
    height: 2.5rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
    padding-top: 3rem;
    padding-bottom: 5rem;
    align-items: start;
  }

  .before-after {
    margin-top: 0.5rem;
    max-width: none;
  }

  .result,
  .questions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 4rem;
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .steps {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }

  .closing {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Short phone screens (iPhone SE and smaller): tighter vertical spacing so the button stays in the first screen.
   Text sizes of the body and the intro stay as they are; nothing is hidden. */
@media (max-width: 599px) and (max-height: 720px) {
  .site-header {
    padding-top: 0.25rem;
  }

  .wordmark img {
    height: 2rem;
  }

  .hero {
    padding-top: 0.625rem;
  }

  .hero h1 {
    line-height: 1.08;
  }

  .lead {
    margin-top: 0.5rem;
    line-height: 1.4;
  }

  .request-panel {
    margin-top: 0.875rem;
    padding: 1rem 1rem 1.25rem;
  }

  .field {
    margin-bottom: 0.625rem;
  }

  .field label {
    margin-bottom: 0.25rem;
  }

  .field input {
    min-height: 3rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
  }

  .field-hint {
    margin-top: 0.25rem;
    line-height: 1.4;
  }

  .button-primary {
    min-height: 3.25rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (forced-colors: active) {
  .button-primary {
    border: 2px solid ButtonText;
  }
}

/* Keeps "E-Mail" from breaking at its hyphen. */
.nowrap {
  white-space: nowrap;
}
