/* ==========================================================================
   Matter — shared stylesheet
   Edit colours and type in the :root tokens below.
   ========================================================================== */

:root {
  /* Colour */
  --bg: #f8f8f3;            /* warm off-white; matches the logo artwork's own background */
  --ink: #383838;           /* body text */
  --ink-strong: #1d1d1d;    /* titles, headline */
  --ink-soft: #5c5c5c;      /* secondary text (≥ 6:1 on --bg) */
  --ink-muted: #666;        /* labels, footer (≥ 5.4:1 on --bg) */
  --rule: rgba(29, 29, 29, 0.14);
  --focus: #6e1239;         /* burgundy from the mark, used for focus outlines */
  --accent-a: #d0307a;      /* gradient underline: pink … */
  --accent-b: #ee6a92;      /* … to rose … */
  --accent-c: #f1a46a;      /* … to soft peach */
  --gradient: linear-gradient(90deg, var(--accent-a), var(--accent-b) 55%, var(--accent-c));

  /* Type */
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body-size: 18px;
  --body-leading: 1.7;
  --nav-size: 16px;
  --title-size: 34px;
  --intro-size: 22px;
  --product-size: 46px;
  --small-size: 14px;

  /* Layout */
  --column: 620px;
  --gutter: 24px;
}

@media (max-width: 640px) {
  :root {
    --body-size: 17px;
    --title-size: 30px;
    --intro-size: 20px;
    --product-size: 38px;
  }
}
@media (max-width: 360px) {
  :root { --gutter: 20px; }
}

/* ---------- 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);
  font-size: var(--body-size);
  font-weight: 400;
  font-stretch: normal;
  line-height: var(--body-leading);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; color: var(--ink-strong); }
img, video { display: block; max-width: 100%; }
a { color: inherit; }

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

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

.skip-link {
  position: absolute;
  left: var(--gutter); top: 12px;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--ink-strong);
  font-size: var(--small-size);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Emphasis underline (content phrases; not links) ---------- */
.gradient-underline {
  background-image: var(--gradient);
  background-repeat: no-repeat;
  background-size: 100% 1.5px;
  background-position: 0 100%;
  padding-bottom: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  font-weight: inherit;
  cursor: auto;
}

/* ---------- Quiet text link with growing gradient underline ---------- */
.text-link {
  position: relative;
  display: inline-block;
  padding: 10px 0 12px;       /* comfortable touch target, no visual artwork */
  color: var(--ink-strong);
  text-decoration: none;
}
.text-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 6px;
  width: 100%; height: 1.5px;
  background: var(--gradient);
  transform-origin: left center;
  transform: scaleX(var(--rest, 0.22));
  transition: transform 260ms ease;
}
.text-link:hover::after,
.text-link:focus-visible::after,
.text-link[aria-current="page"]::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .text-link::after { transition: none; }
}

/* ==========================================================================
   Homepage
   ========================================================================== */
.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}
.home-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 0 15vh;       /* sits slightly above the vertical midpoint */
}
.home-group,
.home-footer-inner {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.brand-mark {
  position: relative;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 964 / 206;
  margin-left: -5px;          /* optical: aligns the M with the text edge */
}
.brand-mark img,
.brand-mark video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.brand-mark video {
  object-fit: contain;
  mix-blend-mode: multiply;   /* the video's white background disappears into --bg */
  opacity: 0;
  transition: opacity 700ms ease;
}
.brand-mark.is-playing video { opacity: 1; }
.brand-mark.is-playing img { opacity: 0; transition: opacity 700ms ease; }

.home-headline {
  margin-top: 48px;
  font-size: 40px;
  line-height: 1.22;
  letter-spacing: -0.005em;
  max-width: 15.5em;
}
.home-support {
  margin-top: 16px;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.home-nav { margin-top: 44px; }
.home-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 52px;
  padding: 0;
  list-style: none;
}
.home-nav .text-link { font-size: 21px; --rest: 0.2; }

.home-footer {
  padding: 0 0 40px;
  font-size: var(--small-size);
  line-height: 1.6;
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .home-main { padding: 72px 0 12vh; }
  .brand-mark { width: 240px; margin-left: -4px; }
  .home-headline { margin-top: 36px; font-size: 30px; line-height: 1.25; }
  .home-support { font-size: 18px; margin-top: 14px; }
  .home-nav { margin-top: 32px; }
  .home-nav ul { gap: 4px 40px; }
  .home-nav .text-link { font-size: 19px; }
  .home-footer { padding-bottom: 28px; }
}

/* ==========================================================================
   Internal pages (Story, Work) — one shared header component
   ========================================================================== */
.site-header {
  padding: 44px var(--gutter) 0;
  text-align: center;
}
.site-header__logo {
  display: inline-block;
  border-radius: 6px;
}
.site-header__logo img {
  width: 172px;
  height: auto;
}
.site-nav { margin-top: 26px; }
.site-nav ul {
  display: flex;
  justify-content: center;
  gap: 0 32px;
  padding: 0;
  list-style: none;
}
.site-nav .text-link {
  font-size: var(--nav-size);
  color: var(--ink-soft);
  --rest: 0;
}
.site-nav .text-link[aria-current="page"] { color: var(--ink-strong); }

.page {
  padding: 0 var(--gutter);
}
.page-title {
  margin-top: 72px;
  text-align: center;
  font-size: var(--title-size);
  line-height: 1.25;
}
.column {
  max-width: var(--column);
  margin: 0 auto;
}
.intro {
  margin: 56px auto 0;
  max-width: 560px;
  text-align: center;
  font-size: var(--intro-size);
  line-height: 1.5;
  color: var(--ink-strong);
  text-wrap: balance;
}
.prose { margin-top: 48px; }
.prose p + p { margin-top: 1.2em; }

@media (max-width: 640px) {
  .site-header { padding-top: 32px; }
  .site-header__logo img { width: 148px; }
  .site-nav { margin-top: 18px; }
  .page-title { margin-top: 52px; }
  .intro { margin-top: 40px; }
  .prose { margin-top: 36px; }
}

/* ---------- Contact block (Story + Work) ---------- */
.contact {
  margin: 112px auto 0;
  padding-bottom: 72px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
}
.contact dl { display: grid; gap: 20px; }
.contact dt {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.contact dd { margin-top: 2px; }
.contact a {
  color: var(--ink-strong);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 200ms ease;
}
.contact a:hover { text-decoration-color: var(--accent-a); }
.contact address {
  margin-top: 36px;
  font-style: normal;
  font-size: var(--small-size);
  color: var(--ink-muted);
}
.contact address a { color: inherit; }

@media (max-width: 640px) {
  .contact { margin-top: 88px; padding-bottom: 56px; }
}

/* ==========================================================================
   Our work — products
   ========================================================================== */
.product-jump {                 /* no-JS fallback only */
  margin-top: 40px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-muted);
}
.product-jump ul {
  display: inline-flex;
  gap: 24px;
  padding: 0;
  list-style: none;
}
.js .product-jump { display: none; }

.product { padding-top: 64px; }
.product + .product { margin-top: 48px; }
.js[data-product="weevs"] .product[data-id="qerra"],
.js[data-product="qerra"] .product[data-id="weevs"] { display: none; }
.js .product + .product { margin-top: 0; }

.product__head { text-align: center; }
.product__category {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.product__name {
  margin-top: 8px;
  font-size: var(--product-size);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Product selector (disclosure) */
.picker { position: relative; display: inline-block; }
.picker__button {
  display: inline-flex;
  align-items: center;
  gap: 0.22em;
  margin: 0;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  cursor: pointer;
  border-radius: 8px;
}
.picker__chevron {
  width: 0.34em;
  height: 0.34em;
  margin-top: 0.08em;
  color: var(--ink-muted);
  transition: transform 200ms ease;
}
.picker__button[aria-expanded="true"] .picker__chevron { transform: rotate(180deg); }
.picker__panel {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 156px;
  padding: 6px;
  background: #fdfdfa;
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-align: left;
}
.picker__panel[hidden] { display: none; }
.picker__panel ul { padding: 0; list-style: none; }
.picker__panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}
.picker__panel a:hover { background: rgba(29, 29, 29, 0.05); }
.picker__panel a:focus-visible { outline-offset: -2px; }
.picker__panel a[aria-current="true"] { color: var(--ink-strong); }
.picker__panel a[aria-current="true"]::after {
  content: "";
  width: 14px; height: 1.5px;
  background: var(--gradient);
}
@media (prefers-reduced-motion: reduce) {
  .picker__chevron { transition: none; }
}

.product .intro { margin-top: 28px; }

.product__site { margin-top: 32px; }
.product__site a {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 6px 0;
  font-size: 16px;
  color: var(--ink-strong);
  text-decoration: none;
  background-image: var(--gradient);
  background-repeat: no-repeat;
  background-size: calc(100% - 14px) 1.5px;
  background-position: 0 calc(100% - 3px);
}
.product__site a:hover { color: #000; }
.product__site svg { width: 9px; height: 9px; color: var(--accent-a); }

.progress { margin-top: 72px; }
.progress h3 {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.progress ol {
  margin-top: 24px;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.55;
}
.progress li {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 4px 24px;
  padding: 10px 0;
}
.progress time { color: var(--ink-muted); }

@media (max-width: 480px) {
  .progress li { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 640px) {
  .product { padding-top: 48px; }
}
