/* bptdholding.com — BPTD Holding Limited
   Type and colour only: stone ground, blueprint blue band, Red Hat Display / Red Hat Text. */

@font-face {
  font-family: "Red Hat Display";
  src: url("/fonts/red-hat-display-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Red Hat Text";
  src: url("/fonts/red-hat-text-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Red Hat Text";
  src: url("/fonts/red-hat-text-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #dfdedb;
  --surface: #d3d2ce;
  --ink: #26251e;
  --muted: #57554e;
  --accent: #2456d6;
  --accent-hover: #1c46b4;
  --accent-ink: #ffffff;
  --field: #26251e;
  --field-ink: #dfdedb;
  --field-muted: #a9a79f;

  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-text: "Red Hat Text", system-ui, sans-serif;

  --step-small: 0.875rem;
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.4rem + 3.4vw, 4.5rem);
  --display: clamp(2rem, 10.5vw, 3.75rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(5rem, 10vw, 10rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 200ms;
}

@media (min-width: 48em) {
  :root {
    --display: clamp(4.5rem, 9vw, 8.75rem);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181818;
    --surface: #272727;
    --ink: #ecebe7;
    --muted: #a5a39c;
    --accent-hover: #3566e4;
    --field: #000000;
    --field-ink: #ecebe7;
    --field-muted: #a5a39c;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
p,
address,
table {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

address {
  font-style: normal;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: var(--margin);
  left: var(--margin);
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.wrap {
  padding-inline: var(--margin);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* ---------- controls ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) var(--ease-out);
}

.button:active {
  transform: scale(0.97);
}

.link {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.07em;
  transition: text-decoration-color var(--t-hover) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--accent-hover);
  }

  .link:hover {
    text-decoration-color: currentColor;
  }
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: var(--margin);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-lead);
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* ---------- hero: the name rests on the seam, the band below says what the company does ---------- */
.hero-name {
  padding-top: clamp(4rem, 12vw, 11rem);
  padding-bottom: clamp(0.75rem, 1.5vw, 1.5rem);
}

.hero-name h1 {
  font-size: var(--display);
  line-height: 0.92;
  text-transform: uppercase;
}

.hero-band {
  padding-block: clamp(2rem, 5vw, 4.5rem);
  background: var(--accent);
  color: var(--accent-ink);
}

.hero-band p {
  max-width: 44ch;
  font-size: var(--step-lead);
  line-height: 1.35;
}

/* ---------- content sections: heading in the first four columns, content from column five ---------- */
.section {
  padding-block: var(--section);
  row-gap: 2rem;
}

.section > * {
  grid-column: 1 / -1;
}

.section-head {
  font-size: var(--step-head);
  line-height: 1.02;
}

.section-text {
  font-size: var(--step-lead);
  line-height: 1.35;
  max-width: 40ch;
}

.section--surface {
  background: var(--surface);
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  display: block;
  padding: 0;
  text-align: left;
  vertical-align: top;
}

.company-table th {
  color: var(--muted);
  font-weight: 400;
  padding-bottom: 0.25rem;
}

.company-table tr + tr th {
  padding-top: 1.5rem;
}

.company-table td {
  font-size: var(--step-lead);
  line-height: 1.35;
}

.nums {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 48em) {
  .section .section-head {
    grid-column: 1 / span 4;
  }

  .section .section-text {
    grid-column: 5 / span 7;
  }

  .section--surface .section-head {
    grid-column: 1 / -1;
  }

  .company-table tr {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }

  .company-table th {
    grid-column: 1 / span 4;
    padding-bottom: 0;
    line-height: 2;
  }

  .company-table td {
    grid-column: 5 / -1;
    max-width: 36ch;
  }

  .company-table tr + tr th,
  .company-table tr + tr td {
    padding-top: 2rem;
  }
}

/* ---------- footer: the address to write to is the display line ---------- */
.footer {
  padding-block: var(--section) 2.5rem;
  background: var(--field);
  color: var(--field-ink);
  --muted: var(--field-muted);
}

.footer-title {
  font-family: var(--font-text);
  font-size: var(--step-body);
  font-weight: 500;
  letter-spacing: 0;
}

.footer-mail {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--display);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.footer-mail a {
  text-decoration: none;
}

.footer-mail .at {
  display: block;
}

@media (min-width: 48em) {
  .footer-mail {
    font-size: 6.4vw;
  }

  .footer-mail .at {
    display: inline;
  }
}

@media (hover: hover) and (pointer: fine) {
  .footer-mail a {
    transition: opacity var(--t-hover) var(--ease-out);
  }

  .footer-mail a:hover {
    opacity: 0.72;
  }
}

/* The company's full name closes every page. */
.site-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 2.5rem;
  font-size: var(--step-small);
  line-height: 1.45;
  color: var(--muted);
}

.footer .site-meta {
  margin-top: var(--section);
  padding-bottom: 0;
}

@media (min-width: 48em) {
  .site-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-meta > :nth-child(2) {
    text-align: center;
  }

  .site-meta > :nth-child(3) {
    text-align: right;
  }
}

/* ---------- inner pages: legal, 404 ---------- */
.doc {
  padding-block: 4rem var(--section);
  row-gap: 3rem;
}

.doc > * {
  grid-column: 1 / -1;
}

.doc h1 {
  font-size: var(--step-head);
  line-height: 1.02;
}

.doc-meta {
  color: var(--muted);
  font-size: var(--step-small);
}

.doc-part h2 {
  font-size: var(--step-lead);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.doc-part p {
  max-width: 64ch;
}

.doc-part p + p {
  margin-top: 1em;
}

@media (min-width: 48em) {
  .doc h1,
  .doc .doc-meta {
    grid-column: 1 / span 8;
  }

  .doc-part {
    display: grid;
    grid-template-columns: subgrid;
  }

  .doc-part h2 {
    grid-column: 1 / span 4;
  }

  .doc-part .doc-body {
    grid-column: 5 / -1;
  }
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding-block: clamp(5rem, 14vw, 12rem);
}

.not-found h1 {
  font-size: var(--display);
  line-height: 0.92;
  text-transform: uppercase;
}

.not-found p {
  font-size: var(--step-lead);
  line-height: 1.35;
  max-width: 34ch;
}

/* ---------- motion: one arrival on load; the resting state is the visible state ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 800ms var(--ease-out) backwards;
    animation-delay: calc(var(--i, 0) * 120ms + 100ms);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
}

/* ---------- print: black on white, everything shown ---------- */
@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --ink: #000000;
    --muted: #444444;
    --accent: #ffffff;
    --accent-ink: #000000;
    --field: #ffffff;
    --field-ink: #000000;
    --field-muted: #444444;
    --section: 2.5rem;
  }

  .skip-link,
  .topbar .button {
    display: none;
  }

  .rise {
    animation: none;
  }

  .hero-name {
    padding-top: 1rem;
  }

  .company-table tr {
    break-inside: avoid;
  }

  .footer-mail {
    font-size: 2rem;
  }
}
