/* Brushroom — paper, pigment and a little room to paint. */
@font-face {
  font-family: "Onest";
  src: url("/fonts/Onest-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/Onest-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --chalk: #fbfaf6;
  --paper: #f2f0ea;
  --ink: #17150f;
  --graphite: #6f6b62;
  --line: rgba(23, 21, 15, .12);
  --accent: #10344f;
  --gutter: clamp(24px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--chalk); }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 17px/1.6 "Onest", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
}
img { display: block; max-width: 100%; height: auto; }

.top, main, .foot {
  width: calc(100% - 2 * var(--gutter));
  max-width: 1200px;
  margin-inline: auto;
}
.top {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -.8px;
  text-decoration: none;
}
.brand img { width: 52px; height: 52px; }
.lang {
  display: inline-flex;
  flex-shrink: 0;
  min-height: 36px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--chalk);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
}
.lang a:first-child { border-radius: 999px 0 0 999px; }
.lang a:last-child { border-radius: 0 999px 999px 0; }
.lang a:hover { background: var(--paper); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }
.lang a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main { flex: 1; padding-block: 48px 80px; }

h1, h2, h3 { font-weight: 400; }
h1 {
  margin: 0 0 28px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
h2 { margin: 44px 0 16px; font-size: 28px; line-height: 1.25; letter-spacing: -.025em; }
h3 { margin: 28px 0 12px; font-size: 21px; line-height: 1.4; }
p { margin: 0 0 20px; }
b, strong { font-weight: 600; }
.lead, .muted { color: var(--graphite); }

/* Home */
.page-index main { display: grid; align-items: center; padding-block: 12px 52px; }
.hero { width: 100%; text-align: center; }
.hero-art {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 13 / 8;
  margin: 0 auto 26px;
}
.paint { position: absolute; width: 100%; height: auto; inset: 0; }
.hero-mark {
  position: absolute;
  width: 75%;
  height: auto;
  max-width: none;
  left: 11%;
  /* Keep the mark in the existing 520 × 280 paint composition. */
  top: -21%;
}
/* Show the original bitmap immediately when motion is reduced. */
.swirl-paint, .swirl-guides { display: none; }
/* Cadmium 0–.65s, cobalt .1–.7s, then three tone regions .7–2.5s.
   Matching inverse masks erase each region's outline and number as it fills. */
@media (prefers-reduced-motion: no-preference) {
  .swirl-paint, .swirl-guides {
    display: inline;
    opacity: 0;
    animation: marker-clear 2500ms step-end backwards;
  }
  .paint-stroke, .swirl-stroke {
    stroke-dasharray: 1;
    animation: marker-draw 650ms cubic-bezier(.3, 0, .5, 1) backwards;
  }
  .paint-stroke:nth-child(2) { animation-duration: 600ms; animation-delay: 100ms; }
  .swirl-stroke { animation-duration: 600ms; animation-delay: 700ms; }
  .swirl-stroke-2 { animation-delay: 1300ms; }
  .swirl-stroke-3 { animation-delay: 1900ms; }
  .paint-complete { animation: marker-complete 700ms step-end backwards; }
  .swirl-complete { animation: marker-complete 1300ms step-end backwards; }
  .swirl-complete-2 { animation-duration: 1900ms; }
  .swirl-complete-3, .swirl-final { animation: marker-complete 2500ms step-end backwards; }
}
@keyframes marker-draw {
  0% { stroke-dashoffset: 1; opacity: 0; }
  0.1% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes marker-complete {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes marker-clear {
  from { opacity: 1; }
  to { opacity: 0; }
}
.hero h1 {
  max-width: 1000px;
  margin: 0 auto;
  font-size: clamp(36px, 4.3vw, 62px);
  line-height: 1.12;
  letter-spacing: -.045em;
  overflow-wrap: normal;
}
.hero h1 span { display: block; color: var(--accent); }
.hero .lead { max-width: 620px; margin: 24px auto 0; font-size: 17px; line-height: 1.65; }
.soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 22px;
  border: 2px solid #0a2233;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: default;
}

/* Text pages */
.doc { max-width: 680px; margin-inline: auto; overflow-wrap: anywhere; }
.doc > h1::before {
  content: "";
  display: block;
  width: 32px;
  height: 5px;
  margin-bottom: 22px;
  border-radius: 65% 35% 55% 45%;
  background: var(--accent);
  transform: rotate(-4deg);
}
.doc ul { padding-left: 1.2em; }
.doc li { margin-block: 8px; }
.card { margin-block: 28px; }
.card p { margin-bottom: 12px; }
.mail { font-size: 17px; }
details { border-top: 1px solid var(--line); padding-block: 18px; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; }
details p { margin: 12px 0 0; }

.foot {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 24px 28px;
  border-top: 1px solid var(--line);
  color: var(--graphite);
  font-size: 14px;
}
.foot nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover, .foot nav a[aria-current="page"] { text-decoration: underline; }
.foot p { margin: 0; }
.foot p a { text-decoration: none; }
.foot p a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .top { padding-block: 16px; }
  .brand { font-size: 21px; }
  .brand img { width: 44px; height: 44px; }
  main { padding-block: 36px 56px; }
  .page-index main { padding-block: 22px 44px; }
  .hero-art { margin-bottom: 30px; }
  .hero h1 { font-size: clamp(32px, 8.7vw, 48px); line-height: 1.16; }
  .hero .lead { margin-top: 22px; font-size: 16px; }
  .foot { gap: 14px; font-size: 13px; }
}

@media (min-width: 601px) and (max-height: 820px) {
  .page-index .top { padding-block: 20px; }
  .page-index main { padding-block: 8px 28px; }
  .hero-art { width: 400px; margin-bottom: 18px; }
  .hero h1 { font-size: clamp(36px, 4.1vw, 58px); }
}
