/* Onga Tools — brand foundation */

/* Archivo Black (self-hosted, SIL Open Font License 1.1) */
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/archivo-black-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/archivo-black-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* palette */
  --black:     #0C0C0C;
  --off-white: #F2F2F2;
  --bold:      #EF4B3C;
  --rise:      #FFBD17;
  --calm:      #1973C0;
  --flow:      #1DA849;
  --roam:      #F9B6B1;
  --peach:     #E8C5AC;

  /* roles */
  --bg:    var(--black);
  --ink:   var(--off-white);
  --muted: color-mix(in srgb, var(--ink) 65%, var(--bg));
  --rule:  color-mix(in srgb, var(--ink) 22%, transparent);

  /* motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* type */
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --body: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 6vw, 6rem);
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.5rem, 16vw, 11rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.tagline {
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  font-size: clamp(1rem, 2vw, 1.375rem);
  line-height: 1.35;
}

/* --- links ---------------------------------------------------------- */

.tagline-link,
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--ink);
  text-decoration: none;
}

.tagline-link { padding: 0.25em 0; }

.arrow {
  flex: none;
  transition: transform 220ms var(--ease);
}

.tagline-link:hover .arrow,
.tagline-link:focus-visible .arrow { transform: translateX(0.3em); }

.back:hover .arrow--back,
.back:focus-visible .arrow--back { transform: translateX(-0.3em); }

:focus-visible {
  outline: 2px solid var(--rise);
  outline-offset: 4px;
}

/* --- page transitions ------------------------------------------------ */

/* Cross-document view transitions: pages slide, matching the arrows.
   Going deeper (home -> tools -> product) the new page slides in from the
   right and pushes the old one left; going back reverses it. Browsers
   without support just load the next page normally. */
@view-transition { navigation: auto; }

/* The colour stripe is named, so it holds still and anchors the slide
   instead of travelling with the page. */
.stripe { view-transition-name: vt-stripe; }

@keyframes vt-in-from-right { from { transform: translateX(100%); } }
@keyframes vt-out-to-left   { to   { transform: translateX(-22%); opacity: 0.4; } }
@keyframes vt-in-from-left  { from { transform: translateX(-100%); } }
@keyframes vt-out-to-right  { to   { transform: translateX(22%); opacity: 0.4; } }

::view-transition-old(root),
::view-transition-new(root) {
  /* Opt out of the default cross-fade so the two pages slide as solid
     surfaces rather than ghosting through each other. */
  animation-duration: 380ms;
  animation-timing-function: var(--ease);
  animation-fill-mode: both;
  mix-blend-mode: normal;
}

::view-transition-old(root) { animation-name: vt-out-to-left; }
::view-transition-new(root) { animation-name: vt-in-from-right; z-index: 1; }

/* Direction is set by transitions.js before the transition renders. */
:root[data-dir="back"]::view-transition-old(root) { animation-name: vt-out-to-right; }
:root[data-dir="back"]::view-transition-new(root) { animation-name: vt-in-from-left; }

@media (prefers-reduced-motion: reduce) {
  .arrow,
  .tool,
  .tool-name::before,
  .tool-arrow { transition: none; }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* --- interior pages -------------------------------------------------- */

.bar {
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.75rem, 6vw, 6rem) 0;
  font-size: clamp(0.875rem, 1.4vw, 1rem);
}

.page {
  flex: 1;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.75rem, 6vw, 6rem) clamp(3rem, 8vw, 6rem);
}

.page-title {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.tools {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.tool-item { border-bottom: 1px solid var(--rule); }

.tool {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em 1em;
  padding: clamp(1.1rem, 2.6vw, 1.6rem) 0;
  color: var(--ink);
  text-decoration: none;
  transition: padding 220ms var(--ease), background-color 220ms var(--ease);
}

.tool:hover,
.tool:focus-visible {
  padding-left: clamp(0.75rem, 1.6vw, 1.25rem);
  padding-right: clamp(0.75rem, 1.6vw, 1.25rem);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.tool-name {
  position: relative;
  padding-left: 0.75em;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.tool-name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  width: 0.16em;
  height: 0.68em;
  background: var(--accent);
  transform-origin: center;
  transition: transform 220ms var(--ease);
}

.tool:hover .tool-name::before,
.tool:focus-visible .tool-name::before { transform: scaleY(1.28); }

.tool-kind {
  font-size: clamp(0.875rem, 1.5vw, 1.0625rem);
  color: var(--muted);
}

.tool-arrow {
  margin-left: auto;
  align-self: center;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--accent);
  opacity: 0;
  transform: translateX(-0.4em);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.tool:hover .tool-arrow,
.tool:focus-visible .tool-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- product pages --------------------------------------------------- */

.product-title {
  margin: 0;
  padding-left: 0.42em;
  position: relative;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 9vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.product-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.11em;
  width: 0.1em;
  height: 0.72em;
  background: var(--accent);
}

.product-kind {
  margin: clamp(0.9rem, 2vw, 1.25rem) 0 0;
  font-size: clamp(0.9375rem, 1.6vw, 1.125rem);
  color: var(--muted);
}

.lede {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  max-width: 42ch;
  font-size: clamp(1.0625rem, 2vw, 1.375rem);
  line-height: 1.45;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3.5rem, 10vw, 7rem);
  padding-top: clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--rule);
}

.pager-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
}

.pager-link--next { margin-left: auto; }

.pager-label { color: var(--muted); }

.pager-name {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.pager-link:hover .arrow:not(.arrow--back),
.pager-link:focus-visible .arrow:not(.arrow--back) { transform: translateX(0.3em); }

.pager-link:hover .arrow--back,
.pager-link:focus-visible .arrow--back { transform: translateX(-0.3em); }

/* --- stripe ---------------------------------------------------------- */

.stripe {
  display: flex;
  height: 12px;
}

.stripe span { flex: 1; }
