/* Bid Desk: blue-black ink, white paper, one red pencil. */

:root {
  --paper: #ffffff;
  --ink: #15233a;
  --ink-soft: #4a5870;
  --wash: #f3f5f8;
  --rule: #dce1e8;
  --pencil: #b42318;

  --text-sm: 0.9375rem;
  --text-base: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
  --text-md: 1.3125rem;
  --text-lg: 1.5rem;
  --text-xl: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
  --text-2xl: clamp(2.125rem, 1.4rem + 2.4vw, 3rem);
  --text-3xl: clamp(2.75rem, 1.5rem + 4.4vw, 4.5rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --gap: clamp(1.25rem, 2.6vw, 2.5rem);
  --max: 74rem;
  --measure: 36rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 2px; }

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

::selection { background: #f7dcd8; }

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

/* Masthead */

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.contact {
  padding-block: 0.5rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  text-decoration: none;
}
.contact:hover { color: var(--ink); text-decoration-line: underline; }

/* Buttons and action rows */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.0625rem;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}
.button:hover { background: #24395c; }
.button:active { transform: scale(0.98); }

/* Hero */

.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(4.5rem, 9vw, 7.5rem); }
.hero .wrap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 3.5rem;
  align-items: start;
}
.hero-text { grid-column: 1 / span 7; padding-top: clamp(0rem, 2vw, 1.75rem); }
.hero h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.038em;
  max-width: 17ch;
  text-wrap: balance;
}
.lede {
  margin-top: 1.5rem;
  max-width: 31rem;
  color: var(--ink-soft);
  font-size: var(--text-md);
  line-height: 1.5;
  text-wrap: pretty;
}
.hero .actions { margin-top: 2.25rem; }
.actions a:not(.button) { padding-block: 0.4rem; }

/* The product: a brief, shown as a sheet of paper with a second sheet behind it */

.sheet {
  grid-column: 8 / span 5;
  position: relative;
  margin-top: clamp(0rem, 3vw, 2.75rem);
  margin-right: 10px;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgb(21 35 58 / 0.05), 0 18px 40px -22px rgb(21 35 58 / 0.28);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transform: translate(10px, 10px);
  transition: transform 220ms ease;
}
.sheet:hover::before { transform: translate(14px, 14px); }
.sheet-kind { color: var(--ink-soft); font-size: 0.875rem; }
.sheet-title {
  margin-top: 0.15rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.sheet-title a { text-decoration: none; }
.sheet-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.sheet-title a:hover { text-decoration-line: underline; }
.sheet-ref { margin-top: 0.15rem; color: var(--ink-soft); font-size: 0.875rem; }
.sheet-rows { margin-top: 1.1rem; }
.sheet-rows > div {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.6rem;
  border-top: 1px solid var(--rule);
}
.sheet-rows dt { color: var(--ink-soft); }
.sheet-rows dd { text-wrap: balance; }

/* The red pencil: the one mark a reviewer makes on what could sink a bid */

.flagged { position: relative; }
.flag-mark {
  position: absolute;
  left: -1.25rem;
  top: -0.55rem;
  width: calc(100% + 2.3rem);
  height: calc(100% + 1.1rem);
  overflow: visible;
  pointer-events: none;
}
.flag-mark path {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: pencil-draw 1100ms cubic-bezier(0.65, 0, 0.35, 1) 600ms forwards;
}
.pencil-note {
  display: block;
  margin-top: 0.4rem;
  color: var(--pencil);
  font-size: 0.875rem;
  font-style: italic;
  text-wrap: balance;
  animation: pencil-note 450ms ease 1500ms both;
}
.doc .flag-mark { left: -2.25rem; width: calc(100% + 2.75rem); }
.doc .flag-mark path { animation: none; stroke-dashoffset: 0; }
.doc .pencil-note { animation: none; }

@keyframes pencil-draw { to { stroke-dashoffset: 0; } }
@keyframes pencil-note { from { opacity: 0; transform: translateY(2px); } }

/* Why now */

.band { background: var(--wash); padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band-statement {
  max-width: 24ch;
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.band-meta { margin-top: 1.5rem; color: var(--ink-soft); }
.band-meta a { color: var(--ink); margin-left: 0.35em; }

/* Sections */

.section { padding-block: clamp(4rem, 7vw, 6rem); }
.section-title {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.section-intro { margin-top: 0.75rem; max-width: var(--measure); color: var(--ink-soft); }

.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 2rem;
}
.split > .section-title { grid-column: 1 / span 4; }
.split > .split-body { grid-column: 5 / span 8; }

/* The path: four services, from least help to most, at flat prices */

.path {
  --dot: 0.625rem;
  list-style: none;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 3.5rem;
}
.stop { position: relative; padding-top: 2rem; }
.stop::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--ink);
}
.stop::after {
  content: "";
  position: absolute;
  left: var(--dot);
  right: calc(-1 * var(--gap));
  top: calc(var(--dot) / 2 - 0.5px);
  height: 1px;
  background: var(--rule);
}
.stop:last-child::after { display: none; }
.stop-name {
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.012em;
}
.stop-price { margin-top: 0.4rem; color: var(--ink-soft); font-size: var(--text-sm); }
.amount {
  color: var(--ink);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: lining-nums proportional-nums;
}
.stop-price .amount { margin-left: -0.06em; }
.stop-price .per { margin-left: 0.4em; }
.stop-price .from { margin-right: 0.35em; }
.stop-desc { margin-top: 0.9rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.stop-extra { margin-top: 0.75rem; font-size: 1rem; font-weight: 550; line-height: 1.5; }
.stop-detail { margin-top: 0.75rem; color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.5; }
.path-note { margin-top: clamp(2.5rem, 5vw, 3.5rem); max-width: 40rem; color: var(--ink-soft); font-size: var(--text-sm); }

/* How we work */

.principles {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem var(--gap);
}
.principles h3 { font-size: var(--text-base); font-weight: 600; line-height: 1.4; }
.principles p { margin-top: 0.35rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }

/* About */

.closing-body > p:first-child { max-width: var(--measure); color: var(--ink-soft); }
.closing-line {
  margin-top: 1.25rem;
  max-width: 22ch;
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.closing-body .actions { margin-top: 2.25rem; }

/* Footer */

.footer {
  padding-block: 2.25rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 2rem;
  align-items: baseline;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a { padding-block: 0.35rem; text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration-line: underline; }
.footer-fine { grid-column: 1 / -1; max-width: 46rem; font-size: 0.875rem; }

/* Document pages: why now, sample brief, privacy */

.doc { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4.5rem, 9vw, 7rem); }
.doc .wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.doc h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.doc .lede { margin-top: 1.25rem; max-width: none; }
.doc h2 {
  margin-top: 3rem;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.doc p, .doc ul { margin-top: 0.9rem; }
.doc ul { padding-left: 1.2rem; }
.doc li + li { margin-top: 0.55rem; }
.doc li::marker { color: var(--ink-soft); }
.doc .cta-row { margin-top: 2.75rem; }

.facts { width: 100%; margin-top: 2.25rem; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.facts th, .facts td { padding: 0.8rem 1rem 0.8rem 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 1px solid var(--rule); }
.facts th { width: 11rem; color: var(--ink-soft); font-weight: 500; }

.doc .checklist { padding-left: 0; list-style: none; }
.checklist li { display: flex; gap: 0.75rem; align-items: baseline; }
.checklist li::before {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  transform: translateY(0.15rem);
}

.doc .fineprint { margin-top: 3.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: var(--text-sm); }

/* Smaller screens */

@media (max-width: 60rem) {
  .hero-text, .sheet { grid-column: 1 / -1; }
  .sheet { max-width: 32rem; margin-top: 0; }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stop:nth-child(2n)::after { display: none; }
  .split > .section-title, .split > .split-body { grid-column: 1 / -1; }
}

@media (max-width: 40rem) {
  .path { grid-template-columns: 1fr; row-gap: 0; }
  .stop { padding: 0 0 2.75rem 2rem; }
  .stop:last-child { padding-bottom: 0; }
  .stop::before { top: 0.5rem; }
  .stop::after,
  .stop:nth-child(2n)::after {
    display: block;
    left: calc(var(--dot) / 2 - 0.5px);
    right: auto;
    top: calc(0.5rem + var(--dot));
    bottom: -0.5rem;
    width: 1px;
    height: auto;
  }
  .stop:last-child::after { display: none; }
  .principles { grid-template-columns: 1fr; gap: 1.75rem; }
  .sheet { padding: 1.25rem 1.15rem 1rem; }
  .sheet-rows > div { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; }
  .facts th { width: 7.5rem; }
  .footer .wrap { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .flag-mark path { animation: none; stroke-dashoffset: 0; }
  .pencil-note { animation: none; }
  .button, .sheet::before { transition: none; }
}
