/* barayas.com. No build step, no framework, no script: edit and reload. */

@font-face { font-family: 'Plex Serif'; src: url(fonts/ibm-plex-serif-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Serif'; src: url(fonts/ibm-plex-serif-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex Serif'; src: url(fonts/ibm-plex-serif-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Sans'; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }

/* The company's page is paper and ink. Colour belongs to the products: each brings its own. */
:root {
  --bg: #f5f3ee;
  --surface: #fbfaf7;
  --line: #dedad0;
  --line-strong: #b9b4a6;
  --fg: #17191a;
  --muted: #4b4f4e;
  --subtle: #6b6f6c;
  --timepile: #0e7c6b;
  --serif: 'Plex Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Plex Sans', system-ui, sans-serif;
  --mono: 'Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111312;
    --surface: #181b1a;
    --line: #2a2e2c;
    --line-strong: #474d4a;
    --fg: #ebe9e3;
    --muted: #b7b9b3;
    --subtle: #8e918b;
    --timepile: #159a86;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 6px; text-decoration: none; }
.skip:focus { left: 8px; }

/* Top */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 16px/1 var(--sans); letter-spacing: 0.01em; }
.mark svg { width: 26px; height: 26px; }
.mark rect { fill: var(--fg); }
.mark path { fill: none; stroke: var(--bg); stroke-width: 1.9; stroke-linejoin: round; }
.top-link { font-size: 15px; color: var(--muted); text-decoration: none; }
.top-link:hover { color: var(--fg); text-decoration: underline; }

/* Hero */
.hero { padding: clamp(48px, 12vw, 120px) 0 clamp(56px, 10vw, 104px); }
h1 { margin: 0; font: 400 clamp(2.6rem, 9.5vw, 5.25rem)/1.02 var(--serif); letter-spacing: -0.025em; text-wrap: balance; }
h1 span { display: block; color: var(--subtle); font-style: italic; }
.lead { margin: 28px 0 0; max-width: 31em; font-size: clamp(1.06rem, 2.4vw, 1.25rem); line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* Section labels: a rule with a small heading sitting on it */
.label { margin: 0; padding-top: 14px; border-top: 1px solid var(--fg); font: 400 12.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
section + section { margin-top: clamp(56px, 9vw, 88px); }

/* Products: a catalogue. One entry today; the layout holds more. */
.catalog { list-style: none; margin: 20px 0 0; padding: 0; }
.catalog li + li { margin-top: 12px; }
.product {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: start;
  gap: 4px 18px;
  padding: 22px 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product:hover { border-color: var(--line-strong); }
.product .no { font: 400 12.5px/44px var(--mono); color: var(--subtle); }
.product .icon { width: 44px; height: 44px; }
.icon.timepile rect { fill: var(--timepile); }
.icon.timepile path { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.what { display: grid; gap: 6px; min-width: 0; }
.what strong { font: 500 1.45rem/1.25 var(--serif); letter-spacing: -0.01em; }
.what > span { color: var(--muted); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.what .where { margin-top: 4px; font: 400 12.5px/1.4 var(--mono); letter-spacing: 0.02em; color: var(--subtle); }
.go { align-self: center; white-space: nowrap; font-size: 15px; font-weight: 500; }
.go span { display: inline-block; transition: transform 0.15s ease; }
.product:hover .go span { transform: translateX(3px); }
.product:hover .go { text-decoration: underline; text-underline-offset: 0.25em; }
@media (prefers-reduced-motion: reduce) { .go span { transition: none; } }

/* Company facts */
.facts { margin: 8px 0 0; }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--subtle); font-size: 15px; }
.facts dd { margin: 0; }

/* Foot */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: clamp(64px, 10vw, 112px); padding-top: 20px; padding-bottom: 32px; font-size: 14px; color: var(--subtle); }

/* The 404 page */
.lost { padding: clamp(64px, 16vw, 160px) 0; }
.lost h1 { font-size: clamp(2.2rem, 7vw, 3.5rem); }
.lost p { margin: 20px 0 0; color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .product { grid-template-columns: auto 1fr; padding: 20px; gap: 14px 14px; }
  .product .no { display: none; }
  .what { grid-column: 1 / -1; }
  .product .icon { grid-row: 1; }
  .go { grid-row: 1; grid-column: 2; justify-self: end; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
}
