@font-face {
  font-family: 'Jura';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/jura-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;

  /* Sampled from assets/tigre-tech-logo.png */
  --crimson: #b71b32;
  --crimson-deep: #961529;
  --ink: #393536;
  --ink-soft: #6b6869;
  /* Lightest grey that keeps 4.5:1 contrast on white. */
  --ink-faint: #767374;

  --ground: #ffffff;
  --rule: #e4e2e2;
  --ink-ghost: #dddbdb;
  --field-border: #8c898a;

  --font-label: 'Jura', 'Segoe UI', system-ui, sans-serif;
  --font-prose: 'Jura', 'Segoe UI', system-ui, sans-serif;

  --label-column: 13rem;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  border-top: 2px solid var(--crimson);
  border-bottom: 3px solid var(--crimson);
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-prose);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.65;
}

main {
  flex: 1 0 auto;
}

.page {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a {
  color: inherit;
  text-decoration-color: var(--crimson);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--crimson);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

::selection {
  background: var(--crimson);
  color: #ffffff;
}

/* The hidden attribute wins over any display value set below. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Pages cross-fade on navigation while the masthead holds still.
   Browsers without cross-document view transitions navigate as usual. */

@view-transition {
  navigation: auto;
}

.masthead {
  view-transition-name: masthead;
}

@keyframes page-out {
  to {
    opacity: 0;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

::view-transition-old(root) {
  animation: 140ms ease-out both page-out;
}

::view-transition-new(root) {
  animation: 300ms ease-out 80ms both page-in;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* Labels: nav, section labels, field labels, buttons, footer */

.label,
.masthead nav a,
.colophon,
.definition figcaption,
.field label,
.button {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Masthead */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

.masthead .logo {
  display: block;
  flex: none;
  margin-left: -3px;
}

.masthead .logo img {
  display: block;
  width: var(--label-column);
  height: auto;
}

.masthead nav,
.colophon nav {
  display: flex;
  gap: 2rem;
}

.masthead nav a,
.colophon a {
  text-decoration: none;
  white-space: nowrap;
}

.masthead nav a[aria-current='page'],
.colophon a[aria-current='page'] {
  color: var(--crimson);
}

/* Home: the tiger team definition, centred in the viewport. The operative
   words of the quote stand slightly darker than the rest, and a short
   crimson rule hands the quote to its source. */

.home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: clamp(3rem, 12vh, 8rem);
}

.definition {
  --quote-ink: #4d494a;
  --quote-emphasis-ink: #2a2627;
  margin: 0;
  animation: fade-in 1s ease-in both;
}

/* An opacity fade, not motion, so it runs for reduced-motion visitors too. */
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.definition blockquote {
  margin: 0;
}

.definition blockquote p {
  max-width: 21em;
  margin: 0;
  color: var(--quote-ink);
  font-size: clamp(1.7rem, 0.95rem + 2.5vw, 2.95rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.definition .emphasis {
  color: var(--quote-emphasis-ink);
  -webkit-text-fill-color: var(--quote-emphasis-ink);
}

.definition figcaption {
  margin-top: 2rem;
}

.definition figcaption::before {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-bottom: 1.4rem;
  background: var(--crimson);
}

.definition figcaption .attribution,
.definition figcaption .context {
  display: block;
}

.definition figcaption .attribution {
  color: var(--ink);
}

/* The context line reads as a sentence, not a label. */
.definition figcaption .context {
  max-width: 38rem;
  margin-top: 0.6rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
}

/* The quote inks in from the first line to the last, once, on load. */
@keyframes ink-in {
  to {
    background-position: 0 0;
  }
}

@media screen and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .definition blockquote p {
      background-image: linear-gradient(to bottom, var(--quote-ink) 0 45%, var(--ink-ghost) 55% 100%);
      background-size: 100% 220%;
      background-position: 0 100%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      animation: ink-in 1.8s cubic-bezier(0.3, 0.1, 0.2, 1) 0.2s forwards;
    }
  }
}

/* Rows: label on the left, text on the right */

.row {
  display: grid;
  grid-template-columns: var(--label-column) minmax(0, 1fr);
  column-gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
}

.row > .label {
  margin: 0;
  padding-top: 0.42rem;
  color: var(--crimson-deep);
}

.row > .label + * {
  max-width: var(--measure);
}

/* Field labels have no cap-height offset, so the row label drops its own. */
.form-row > .label {
  padding-top: 0;
}

.row p {
  margin: 0 0 1rem;
}

.row p:last-child {
  margin-bottom: 0;
}

.row p,
.ledger dd {
  text-wrap: pretty;
}

/* Small print, such as an effective date. */
.row .note {
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.row .lede {
  font-size: 1.3rem;
  line-height: 1.5;
}

.ledger {
  margin: 0;
}

.ledger > div + div {
  margin-top: 1.15rem;
}

.ledger dt {
  font-weight: 700;
}

.ledger dd {
  margin: 0.1rem 0 0;
}

/* Forms */

.form {
  max-width: 26rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--field-border);
  border-radius: 0;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--crimson);
  outline: 1px solid var(--crimson);
  outline-offset: 0;
}

.button {
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--crimson);
  border-radius: 0;
  background: var(--crimson);
  color: #ffffff;
  cursor: pointer;
}

.button:hover {
  border-color: var(--crimson-deep);
  background: var(--crimson-deep);
}

.button[disabled] {
  cursor: default;
  opacity: 0.6;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form-status {
  margin: 0 0 1.25rem;
}

.form-status[data-state='error'] {
  color: var(--crimson-deep);
}

/* Spam trap: invisible to people, filled in by bots, dropped by Formspree. */
.honeypot {
  display: none;
}

.cf-turnstile {
  margin-bottom: 1.25rem;
}

.form-status[data-state='sent'] {
  color: var(--ink);
}

/* Footer */

.colophon {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding: 1.75rem 0 2.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
}

.colophon p {
  margin: 0;
}

/* Narrow screens */

@media (min-width: 44.01rem) {
  .row > .label {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}

@media (max-width: 44rem) {
  .row {
    grid-template-columns: minmax(0, 1fr);
  }

  .row {
    row-gap: 0.9rem;
    padding: 2rem 0;
  }

  .row > .label {
    padding-top: 0;
  }
}

@media (max-width: 30rem) {
  .masthead {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .masthead .logo img {
    width: 10.5rem;
  }

  .masthead nav {
    gap: 1.1rem;
  }

  .masthead nav a {
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }
}
