@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@property --split {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 56%;
}

:root {
  --paper: #F6F5F1;
  --ink: #111111;
  --ink-2: #4A4946;
  --line: #CFCDC6;
  --field-line: #6E6C68;
  --red: #D7261E;
  --red-ink: #B01C15;
  --grid-line: rgba(17, 17, 17, 0.05);

  --gutter: clamp(16px, 2.2vw, 32px);
  --margin: clamp(16px, 4vw, 64px);
  --font: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

/* The poster: a red field owns the left of the page. */
.stage {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 56% 44%;
  grid-template-rows: auto 1fr;
  animation: field-in 1200ms var(--ease-out) both;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--split);
  background: var(--red);
  z-index: -1;
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0 0 0 var(--split);
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    var(--grid-line) 0 1px,
    transparent 1px 20%
  );
}
@keyframes field-in { from { --split: 0%; } }

.masthead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: baseline;
  padding-top: clamp(20px, 3vw, 36px);
  font-size: 0.9375rem;
  font-weight: 650;
}
.mark {
  justify-self: start;
  margin-left: var(--margin);
  color: var(--paper);
  text-decoration: none;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.mark:focus-visible { outline-color: var(--paper); }
.nav { justify-self: end; margin-right: var(--margin); text-decoration: none; }
.nav:hover { text-decoration: underline; }

.statement {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin: 0;
  padding: clamp(56px, 12vh, 140px) var(--margin) clamp(40px, 8vh, 96px);
  color: var(--paper);
  font-size: clamp(2.5rem, 4.6vw, 4.75rem);
  font-weight: 750;
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: calc(13ch + 2 * var(--margin));
  text-wrap: balance;
}

.contact {
  grid-column: 2;
  grid-row: 2;
  padding: clamp(56px, 12vh, 140px) var(--margin) clamp(32px, 6vh, 64px) clamp(28px, 3.5vw, 56px);
}

.contact-title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 2.8vw, 2.75rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* Heavy rule over the form; it becomes the sending indicator. */
.rule {
  position: relative;
  height: 4px;
  background: var(--ink);
  overflow: hidden;
}
.rule.is-busy { background: color-mix(in srgb, var(--red) 25%, var(--paper)); }
.rule.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 34%;
  background: var(--red);
  animation: rule-sweep 1100ms cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes rule-sweep { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* Form fields: labels above boxed inputs */
.spec { padding-top: 20px; }

.row {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.row label {
  font-size: 0.9375rem;
  font-weight: 650;
}
.opt { font-weight: 400; color: var(--ink-2); margin-left: 6px; }

.field { min-width: 0; }

.field input, .field textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--field-line);
  border-radius: 0;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  padding: 12px 14px;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.row.has-error input, .row.has-error textarea {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}
.err {
  margin: 8px 0 0;
  color: var(--red-ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.row-submit {
  padding-top: 8px;
  row-gap: 14px;
  justify-items: start;
}
.cf-turnstile:empty { display: none; }

.send {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  min-height: 60px;
  padding: 0 22px 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--red);
  color: #FFFFFF;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out);
}
.send-arrow { transition: transform 220ms var(--ease-out); }
.send:hover { background: var(--red-ink); }
.send:hover .send-arrow { transform: translateX(4px); }
.send:active { background: #8F160F; }
.send:disabled { background: var(--ink-2); cursor: progress; }
.send:disabled .send-arrow { transform: none; }

.status { margin: 0; min-height: 1.5em; font-size: 0.9375rem; color: var(--ink-2); }
.status.is-error { color: var(--red-ink); font-weight: 500; }

/* Confirmation, set in place of the form */
.sent {
  padding-top: 24px;
  animation: settle 600ms var(--ease-out) both;
}
.sent:focus { outline: none; }
.sent-title {
  margin: 0;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.sent-body { margin: 12px 0 28px; max-width: 42ch; color: var(--ink-2); }
.sent-body strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.again {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  cursor: pointer;
}
.again:hover { color: var(--red-ink); }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--margin) 24px;
  border-top: 1px solid var(--ink);
  font-size: 0.875rem;
  color: var(--ink-2);
}
.foot p { margin: 0; }

/* Narrow screens: the field becomes a band across the top. */
@media (max-width: 999px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
    animation: none;
  }
  .stage::before { display: none; }
  .stage::after { display: none; }
  .masthead, .statement { background: var(--red); }
  .nav { color: var(--paper); }
  .nav:focus-visible { outline-color: var(--paper); }
  .statement {
    grid-column: 1 / -1;
    padding-top: clamp(56px, 12vh, 112px);
    padding-bottom: clamp(48px, 8vh, 80px);
    max-width: none;
    font-size: clamp(2.25rem, 10.5vw, 4rem);
  }
  .contact { grid-column: 1 / -1; grid-row: 3; padding: 40px var(--margin) 56px; }
}

@media (max-width: 560px) {
  .send { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .stage, .sent { animation: none; }
  .rule.is-busy::after { animation-duration: 2400ms; }
  .send-arrow, .send { transition: none; }
}
