/* ukulabs marketing site — shared stylesheet
   Palette: spruce ink, cool paper, Baltic amber.
   Type: Bricolage Grotesque (display + UI), Source Serif 4 (prose). */

/* ----------------------------------------------------------------- fonts
   Self-hosted, so the pages make no third-party request at all and the
   privacy note in the footer is literally true. Variable woff2, latin and
   latin-ext only — latin-ext carries the Estonian and Lithuanian diacritics
   (ä ö õ ü / ą č ę ė į š ų ū ž). Regenerate by re-downloading the files
   named in the src lines from Google Fonts; nothing else changes. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-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: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-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;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-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: "Source Serif 4";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-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 {
  color-scheme: light dark;

  --paper:        #F2F4F0;
  --surface:      #FFFFFF;
  --sand:         #EDE3D1;
  --ink:          #0E2320;
  --ink-soft:     #42534C;
  --rule:         #D5DAD1;
  --rule-strong:  #B6BEB3;
  --deep:         #0E2320;
  --deep-2:       #17322D;
  --deep-rule:    #2B4640;
  --on-deep:      #EAF0EA;
  --on-deep-soft: #A9BEB5;
  --amber-text:   #8A5310;
  --amber-fill:   #C8821F;
  --amber-bright: #E0A24A;
  --on-amber:     #1A1206;

  /* Focus ring. --amber-fill is only 2.85:1 on --paper and 2.48:1 on --sand,
     so light surfaces use the darker --amber-text (5.7:1 and 5.0:1). The deep
     bands below re-declare the token, where --amber-fill gives 5.2:1. */
  --focus-ring:   var(--amber-text);

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-prose:   "Source Serif 4", Georgia, "Times New Roman", serif;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 66ch;
  --radius: 10px;
  --band: clamp(4rem, 8vw, 7.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #0B1513;
    --surface:      #111F1C;
    --sand:         #16251F;
    --ink:          #E9EEE9;
    --ink-soft:     #A3B4AC;
    --rule:         #22332E;
    --rule-strong:  #33473F;
    --deep:         #060E0D;
    --deep-2:       #11211D;
    --deep-rule:    #233832;
    --on-deep:      #E9EEE9;
    --on-deep-soft: #A0B3AA;
    --amber-text:   #E3A24A;
    --amber-fill:   #D99B3E;
    --amber-bright: #EFB671;
    --on-amber:     #17110A;
    --focus-ring:   var(--amber-fill);
  }
}

/* ---------------------------------------------------------------- reset */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-prose);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

/* Dark surfaces: the ring needs the brighter fill to stay above 3:1. */
.masthead, .hero, .band--deep, .footer, .skip-link { --focus-ring: var(--amber-fill); }

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

::selection { background: var(--amber-fill); color: var(--on-amber); }

/* ------------------------------------------------------------ typography */

h1, h2, h3, .u-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3.05rem); }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.012em; line-height: 1.25; }

p { margin: 0 0 1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- utilities */

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 50;
  padding: 0.7rem 1.1rem;
  background: var(--amber-fill);
  color: var(--on-amber);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 120ms ease-out;
}
.skip-link:focus { top: 0.75rem; }

/* ---------------------------------------------------------------- header */

.masthead {
  background: var(--deep);
  color: var(--on-deep);
  border-bottom: 1px solid var(--deep-rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
  padding-block: 0.7rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.035em;
  color: var(--on-deep);
  margin-right: auto;
}
.brand__mark { width: 2rem; height: 2rem; flex: none; display: block; }

.nav { display: none; }
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.75rem);
  margin: 0; padding: 0;
  list-style: none;
}
.nav__link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--on-deep-soft);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--on-deep); border-bottom-color: var(--amber-bright); }

.langs {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--deep-rule);
  border-radius: 999px;
  padding: 0.2rem;
}
.langs__item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--on-deep-soft);
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  line-height: 1;
}
.langs__item:hover { color: var(--on-deep); }
.langs__item[aria-current="page"] {
  background: var(--amber-fill);
  color: var(--on-amber);
}

.nav-toggle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--on-deep);
  background: transparent;
  border: 1px solid var(--deep-rule);
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--amber-bright); }

/* Only below the desktop breakpoint: these selectors are more specific than
   the `.nav { display: block }` rule below, so left unscoped they survive a
   resize and wedge the masthead open with no visible toggle to close it. */
@media (max-width: 61.99rem) {
  .nav[data-open="true"] {
    display: block;
    order: 9;
    flex-basis: 100%;
    border-top: 1px solid var(--deep-rule);
    padding-block: 0.6rem 0.2rem;
  }
  .nav[data-open="true"] .nav__list { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .nav[data-open="true"] .nav__link { display: block; width: 100%; padding-block: 0.6rem; }
}

@media (min-width: 62rem) {
  .nav { display: block; }
  .nav-toggle { display: none; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  background: var(--deep);
  color: var(--on-deep);
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6rem);
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(3rem, 5vw, 5rem);
    align-items: center;
  }
}

.hero__title {
  font-size: clamp(2.35rem, 1.1rem + 5.1vw, 4.4rem);
  max-width: 15ch;
}
.hero__lede {
  margin-top: 1.5rem;
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.6;
  color: var(--on-deep-soft);
  max-width: 46ch;
}
.hero__note {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.93rem;
  color: var(--on-deep-soft);
}
.hero__note b { color: var(--on-deep); font-weight: 600; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.actions--flush { margin-top: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
@media (max-width: 24rem) {
  .actions .btn { flex: 1 1 100%; }
}

.btn--primary { background: var(--amber-fill); color: var(--on-amber); }
.btn--primary:hover { background: var(--amber-bright); }
.btn--ghost { border-color: var(--on-deep-soft); color: var(--on-deep); }
.btn--ghost:hover { border-color: var(--amber-bright); color: var(--amber-bright); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--amber-fill); color: var(--on-amber); }

/* ------------------------------------------------- hero record (the one bold device) */

.record {
  margin: 0;
  background: var(--deep-2);
  border: 1px solid var(--deep-rule);
  border-radius: 14px;
  overflow: hidden;
}

.record__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--deep-rule);
  font-family: var(--font-display);
}
.record__id {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--on-deep);
  margin-right: auto;
}
.chip {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--deep-rule);
  color: var(--on-deep-soft);
  white-space: nowrap;
}
.chip--priority { border-color: var(--amber-bright); color: var(--amber-bright); }

.record__body { padding: 1.25rem; }

.record__subject {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 1.4rem;
  color: var(--on-deep);
  max-width: none;
}

.gauge__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--on-deep-soft);
  margin-bottom: 0.5rem;
}
.gauge__value { color: var(--amber-bright); font-weight: 700; }

.gauge__track {
  height: 9px;
  border-radius: 999px;
  background: rgba(169, 190, 181, 0.18);
  overflow: hidden;
}
.gauge__fill {
  height: 100%;
  width: 63%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7FA38F 0%, var(--amber-bright) 100%);
  animation: gauge-fill 1100ms cubic-bezier(0.22, 0.75, 0.3, 1) both 220ms;
}
@keyframes gauge-fill { from { width: 0; } }

.record__meta {
  display: grid;
  gap: 0.55rem 1.25rem;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--deep-rule);
  font-family: var(--font-display);
  font-size: 0.88rem;
}
@media (min-width: 26rem) { .record__meta { grid-template-columns: auto 1fr; } }
.record__meta dt { color: var(--on-deep-soft); font-weight: 500; }
.record__meta dd { margin: 0; color: var(--on-deep); font-weight: 600; }

.record__caption {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--deep-rule);
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--on-deep-soft);
  background: rgba(0, 0, 0, 0.12);
}

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

.band { padding-block: var(--band); }
.band--deep { background: var(--deep); color: var(--on-deep); }
.band--sand { background: var(--sand); }
.band--rule { border-top: 1px solid var(--rule); }

.band__head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.band__lede {
  margin-top: 1.1rem;
  font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.18rem);
  color: var(--ink-soft);
}
.band--deep .band__lede { color: var(--on-deep-soft); }

/* ------------------------------------------------------------------- why */

.reasons {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 48rem) {
  .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 4vw, 4rem); }
}
@media (min-width: 72rem) {
  .reasons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.reason {
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.reason__title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.reason__title::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--amber-fill);
  transform: translateY(-0.1rem);
}
.reason__text { color: var(--ink-soft); font-size: 0.99rem; }

/* --------------------------------------------------------------- modules */

.modules {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 40rem) { .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.module {
  background: var(--surface);
  padding: 1.5rem clamp(1.25rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.module__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.module__badge {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--amber-text);
  border: 1px solid var(--amber-fill);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  line-height: 1.2;
  white-space: nowrap;
}
.module__text { color: var(--ink-soft); font-size: 0.99rem; }

.legend {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ------------------------------------------------------------ spec table */

.platform__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 62rem) {
  .platform__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
}

.spec {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.spec caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding-bottom: 0.7rem;
}
.spec th, .spec td {
  text-align: left;
  padding: 0.78rem clamp(0.85rem, 2vw, 1.25rem);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th {
  font-weight: 500;
  color: var(--ink-soft);
  width: 46%;
}
.spec td { font-weight: 600; color: var(--ink); }

/* ----------------------------------------------------------- open source */

.split { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 52rem) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.stack {
  margin: 0;
  padding: 0;
  list-style: none;
}
.stack__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  margin: 0 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--deep-rule);
  color: var(--amber-bright);
}
.stack li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--deep-rule);
  color: var(--on-deep-soft);
  font-size: 0.97rem;
}
.stack li:last-child { border-bottom: 0; }

.attribution {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--deep-rule);
  color: var(--on-deep-soft);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------- company */

.company__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 56rem) {
  .company__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; }
}

.details {
  display: grid;
  gap: 0;
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  border-top: 1px solid var(--rule);
}
@media (min-width: 26rem) { .details { grid-template-columns: auto 1fr; } }
.details dt {
  padding: 0.7rem 1rem 0.7rem 0;
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: 1px solid var(--rule);
}
.details dd {
  margin: 0;
  padding: 0.7rem 0;
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}
@media (max-width: 25.999rem) {
  .details dt { border-bottom: 0; padding-bottom: 0; }
}
.details a { color: var(--amber-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* --------------------------------------------------------------- contact */

.contact__grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: center; }
@media (min-width: 56rem) { .contact__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); } }

.contact__lines {
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 1rem;
  display: grid;
  gap: 0.4rem;
}
.contact__lines a { color: var(--amber-text); font-weight: 600; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- footer */

.footer {
  background: var(--deep);
  color: var(--on-deep-soft);
  padding-block: clamp(2.75rem, 5vw, 4rem);
  font-size: 0.92rem;
}
.footer__grid { display: grid; gap: 1.75rem; }
@media (min-width: 52rem) { .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer__title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--on-deep);
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}
.footer__title--spaced { margin-top: 1rem; }
.footer p { max-width: 40ch; margin-bottom: 0.4rem; }
.footer a { color: var(--on-deep); text-underline-offset: 3px; }
.footer__base {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--deep-rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.86rem;
}

/* -------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
