/* Norddrift – stylesheet */

/* Fonts are self-hosted (SIL Open Font License), so no visitor data goes to Google. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("public/fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Reenie Beanie";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("public/fonts/reenie-beanie-latin.woff2") format("woff2");
}

:root {
  --ink: #15233b;
  --ink-soft: #4a576b;
  --paper: #f1f3ef;
  --paper-deep: #e4e8e3;
  --rule: #c9cfca;
  --slip: #f6e58d;
  --slip-print: #3d4f78;
  --ruler: #f3cb2b;
  --pen: #1f3fa6;
  --stamp: #b8342a;
  --ok: #1d6b45;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Reenie Beanie", "Segoe Print", cursive;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --band: clamp(4.5rem, 9vw, 8rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ruler);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--ink);
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { top: 1rem; }

.hand { font-family: var(--hand); font-weight: 400; color: var(--pen); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .75rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  font-stretch: 108%;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: #24375a; border-color: #24375a; }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn-small { min-height: 2.5rem; padding: .45rem 1rem; font-size: .95rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(241 243 239 / .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark { width: 1.3rem; height: 1.3rem; fill: var(--ink); }

.nav { display: flex; gap: 1.75rem; margin-left: auto; }
.nav a {
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 52rem) {
  .nav { display: none; }
  .header-inner .btn-small { margin-left: auto; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: min(88svh, 54rem);
  padding-block: clamp(7rem, 16vh, 10rem) clamp(3.5rem, 8vh, 6rem);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}

.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 40%;
}
.hero-media::after {
  /* keeps the text readable on any photo */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(21 35 59 / .9) 0%, rgb(21 35 59 / .7) 38%, rgb(21 35 59 / .12) 78%),
    linear-gradient(0deg, rgb(21 35 59 / .7) 0%, rgb(21 35 59 / 0) 45%);
}

.hero-inner { position: relative; }

.hero h1 {
  max-width: 13ch;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  font-stretch: 122%;
  font-weight: 850;
  line-height: .98;
  hyphens: manual;
}

.lede {
  margin-top: 1.75rem;
  max-width: 36rem;
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  color: #dfe4ec;
}

.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.hero-note { margin-top: 1.25rem; max-width: 32rem; font-size: .95rem; color: #c3cad6; }

.btn-light { background: var(--ruler); border-color: var(--ruler); color: var(--ink); }
.btn-light:hover { background: #ffd84a; border-color: #ffd84a; }

.btn-ghost-light { background: transparent; border-color: rgb(241 243 239 / .75); color: var(--paper); }
.btn-ghost-light:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

@media (max-width: 52rem) {
  .hero { min-height: min(92svh, 46rem); }
  .hero-media::after {
    background: linear-gradient(0deg, rgb(21 35 59 / .92) 0%, rgb(21 35 59 / .72) 50%, rgb(21 35 59 / .25) 100%);
  }
  .hero-media img { object-position: 72% 60%; }
}

/* ---------- Videos ---------- */

.video {
  position: relative;
  margin: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fff;
}
.video-toggle {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  min-height: 2.25rem;
  padding: .35rem .9rem;
  border: 0;
  border-radius: 4px;
  background: rgb(21 35 59 / .85);
  color: var(--paper);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.video-toggle:hover { background: var(--ink); }

.service .video { grid-column: 1 / -1; }
.video-process { margin-top: clamp(3rem, 6vw, 4.5rem); }

/* ---------- Generic bands ---------- */

.band { padding-block: var(--band); }

.section-intro { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-intro h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-intro p { margin-top: 1rem; font-size: 1.2rem; color: var(--ink-soft); }

/* ---------- Problem ---------- */

.problem { background: var(--paper-deep); }

.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.problem h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.04; }
.problem-body { display: grid; gap: 1.1rem; max-width: 34rem; color: var(--ink-soft); }
.problem-body .who {
  margin-top: .75rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
  color: var(--ink);
}

@media (max-width: 52rem) { .problem-grid { grid-template-columns: 1fr; } }

/* ---------- Services ---------- */

.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
  border-top: 2px solid var(--ink);
}
.service:last-child { padding-bottom: 0; }

.service-kind { font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
.service h3 { margin-top: .5rem; font-size: clamp(1.6rem, 2.8vw, 2.15rem); }
.service-head > p:last-child { margin-top: 1rem; max-width: 30rem; color: var(--ink-soft); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding-block: .9rem;
  border-bottom: 1px solid var(--rule);
}
.timeline li:first-child { padding-top: .25rem; }
.timeline .when { font-weight: 700; font-stretch: 110%; }

.sort { display: grid; align-content: start; }
.sort-col {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding-block: .9rem;
  border-bottom: 1px solid var(--rule);
}
.sort-col:first-child { padding-top: .25rem; }
.sort-col h4 {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  font-size: 1.05rem;
  font-stretch: 110%;
  line-height: 1.25;
}
.sort-col h4::before {
  content: "";
  flex: none;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--dot);
  transform: translateY(.05rem);
}
.sort-col p { font-size: 1rem; color: var(--ink-soft); }
.sort-send { --dot: var(--ok); }
.sort-draft { --dot: #d9a90f; }
.sort-hold { --dot: var(--stamp); }

.friday {
  align-self: start;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--slip);
  border-radius: 2px;
}
.friday-label { display: block; font-size: 2.2rem; line-height: 1; }
.friday-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; align-items: end; }
.friday input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: .2rem 0;
  border: 0;
  border-bottom: 2px solid var(--slip-print);
  background: transparent;
  font-size: 1.9rem;
  line-height: 1.2;
}
.friday input::placeholder { color: rgb(31 63 166 / .45); }
.friday input:focus-visible { outline: none; box-shadow: none; border-bottom-color: var(--ink); border-bottom-width: 3px; }
.friday-hint { margin-top: .9rem; font-size: .85rem; color: var(--slip-print); }

@media (max-width: 52rem) {
  .service { grid-template-columns: 1fr; }
  .sort-col { grid-template-columns: 1fr; gap: .35rem; }
  .timeline li { grid-template-columns: 1fr; gap: .15rem; }
}

/* ---------- Customers ---------- */

.customers { background: var(--paper-deep); }

.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }

.case { display: flex; flex-direction: column; }
.case h3 { font-size: 1.35rem; padding-bottom: .9rem; border-bottom: 2px solid var(--ink); }
.case dl { margin: 0; flex: 1; }
.case dl > div { display: grid; grid-template-columns: 2.75rem 1fr; gap: .5rem; padding-block: .85rem; border-bottom: 1px solid var(--rule); }
.case dt { font-weight: 700; }
.case dd { margin: 0; font-size: 1.02rem; }
.case-quote {
  margin-top: 1.1rem;
  font-family: var(--hand);
  color: var(--pen);
  font-size: 1.9rem;
  line-height: 1.05;
}

@media (max-width: 60rem) { .cases { grid-template-columns: 1fr; max-width: 36rem; } }

/* The folding ruler (tommestok) */

.ruler-block { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.ruler-block h3 { font-size: 1.35rem; margin-bottom: 1.25rem; }

.ruler {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.ruler li {
  position: relative;
  display: grid;
  gap: .25rem;
  padding: 1.6rem 1.25rem 1.2rem;
  background:
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 10px) top left / 100% 7px no-repeat,
    repeating-linear-gradient(to right, var(--ink) 0 2px, transparent 2px 50px) top left / 100% 14px no-repeat,
    var(--ruler);
  border-radius: 2px;
}
.ruler li::after {
  /* the hinge rivet between segments */
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--ink);
  z-index: 1;
}
.ruler li:last-child::after { display: none; }
.ruler strong { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 850; font-stretch: 122%; line-height: 1; }
.ruler span { font-size: 1rem; }

@media (max-width: 44rem) {
  .ruler { grid-template-columns: 1fr; }
  .ruler li::after { display: none; }
}

/* ---------- Process ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  counter-reset: step;
}
.steps li { position: relative; padding-top: 4.25rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-weight: 800;
  font-stretch: 120%;
  z-index: 1;
}
.steps li:last-child::before { background: var(--ink); color: var(--paper); }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.33rem;
  left: 2.75rem;
  right: calc(-1 * clamp(1.25rem, 3vw, 2rem));
  height: 2px;
  background: var(--ink);
}
.steps h3 { font-size: 1.25rem; line-height: 1.15; }
.steps p { margin-top: .6rem; font-size: 1.02rem; color: var(--ink-soft); }

@media (max-width: 52rem) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 2rem 4rem; }
  .steps li:not(:last-child)::after { top: 2.75rem; bottom: 0; left: 1.33rem; right: auto; width: 2px; height: auto; }
  .steps h3 { padding-top: .55rem; }
}

.promises {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
}
.promises h3 { font-size: 1.35rem; }
.promises ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.promises li {
  position: relative;
  padding-left: 2rem;
  font-size: 1.2rem;
  font-weight: 500;
}
.promises li::before {
  content: "";
  position: absolute;
  left: .15rem;
  top: .38rem;
  width: .9rem;
  height: .5rem;
  border-left: 3px solid var(--ok);
  border-bottom: 3px solid var(--ok);
  transform: rotate(-45deg);
}

@media (max-width: 52rem) { .promises { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ---------- Contact ---------- */

.contact { background: var(--ruler); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.02; }
.contact-copy > p { margin-top: 1.25rem; max-width: 30rem; font-size: 1.2rem; }

.contact-ways { display: grid; gap: .75rem; margin-top: 2.25rem; max-width: 26rem; }
.contact-line {
  display: grid;
  gap: .1rem;
  padding: 1rem 1.3rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  text-decoration: none;
  transition: background-color .15s;
}
.contact-line:hover { background: #24375a; }
.contact-kind { font-size: .95rem; color: #c3cad6; }
.contact-value {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 800;
  font-stretch: 112%;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

/* The form */

.form-panel {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--paper);
  border-radius: 6px;
}
.contact-form h3,
.form-done h3 { font-size: 1.5rem; margin-bottom: 1.5rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; align-content: start; }
.field-row .field { margin-bottom: .6rem; }

.field label { font-size: 1rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-soft); }

.field input,
.field textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1.5px solid #9aa4b1;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 8.5rem; }
.field input::placeholder,
.field textarea::placeholder { color: #8a93a0; }
.field input:hover,
.field textarea:hover { border-color: var(--ink-soft); }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--ruler);
  outline-offset: 0;
  border-color: var(--ink);
  box-shadow: none;
}
.field [aria-invalid="true"] { border-color: var(--stamp); }

.field-error { font-size: .9rem; font-weight: 600; color: var(--stamp); }
.field-error:empty { display: none; }

.field-hint { margin: -.1rem 0 1.1rem; font-size: .92rem; color: var(--ink-soft); }
.field-hint.is-error { color: var(--stamp); font-weight: 600; }

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

.turnstile:not(:empty) { margin: .2rem 0 1rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: .4rem; }
.form-actions .btn[disabled] { opacity: .65; cursor: progress; }
.form-privacy { flex: 1 1 14rem; font-size: .9rem; color: var(--ink-soft); }
.form-privacy a { color: var(--ink); text-underline-offset: 3px; }

.form-status { margin-top: 1rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--stamp); }

.form-done { outline: none; }
.form-done h3 { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.form-done h3::before {
  content: "";
  width: .95rem;
  height: .55rem;
  border-left: 3px solid var(--ok);
  border-bottom: 3px solid var(--ok);
  transform: translateY(-.15rem) rotate(-45deg);
}
.form-done p { font-size: 1.15rem; }

@media (max-width: 56rem) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Privacy policy ---------- */

.policy-body { max-width: 46rem; }
.policy h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.policy-updated { margin-top: .75rem; font-size: .95rem; color: var(--ink-soft); }
.policy-lede { margin-top: 1.5rem; font-size: 1.25rem; }
.policy h2 {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
  font-size: clamp(1.45rem, 2.6vw, 1.8rem);
}
.policy h3 { margin-top: 1.75rem; font-size: 1.15rem; font-stretch: 110%; line-height: 1.25; }
.policy-body p { margin-top: .9rem; }
.policy-body h2 + p,
.policy-body h3 + p { margin-top: .6rem; }
.policy-body a { text-underline-offset: 3px; }

.policy-card {
  margin-top: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--paper-deep);
  border-radius: 4px;
  font-style: normal;
  line-height: 1.7;
}

.policy-list { margin: .9rem 0 0; padding-left: 1.25rem; }
.policy-list li { margin-top: .5rem; padding-left: .25rem; }

.policy-table { width: 100%; margin-top: 1rem; border-collapse: collapse; font-size: 1rem; }
.policy-table th,
.policy-table td { padding: .8rem .75rem .8rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.policy-table th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.policy-table td:first-child { width: 45%; padding-right: 1.5rem; }

@media (max-width: 40rem) {
  .policy-table thead { display: none; }
  .policy-table tr { display: block; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
  .policy-table td { display: block; width: auto; padding: 0; border: 0; }
  .policy-table td:first-child { width: auto; font-weight: 600; margin-bottom: .3rem; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 3rem;
  background: var(--ink);
  color: #c3cad6;
  font-size: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: start;
}
.brand-footer { color: var(--paper); margin-bottom: .6rem; font-size: 1.15rem; }
.brand-footer .brand-mark { fill: var(--paper); }
.site-footer address { font-style: normal; line-height: 1.8; }.site-footer a { color: var(--paper); text-underline-offset: 3px; }

@media (max-width: 44rem) { .footer-grid { grid-template-columns: 1fr; } }
