/* Brand page (brand.html). Builds on the styles file (styles.<stamp>.css): the same wall, paint, line, type and
   tokens, in light and dark. The hero draws the logo on its guide lines once, then the
   pane lights and the dot follows, the same moment as the site's header. */

:root {
  --tile-day: #F2F3EF;     /* tiles show the files on fixed backgrounds, in both themes */
  --tile-night: #0F1A21;
  --tile-blue: #2C5F82;
  --rule: rgba(22, 36, 45, 0.16);
  --rule-strong: var(--ink);
  --no: #B3402A;           /* the cross on the "don't" examples */
}
@media (prefers-color-scheme: dark) {
  :root {
    --rule: rgba(233, 236, 230, 0.16);
    --no: #FF8F7A;
  }
}

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

.bp-home {
  padding: 10px 6px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 4px;
}
.bp-home:hover { color: var(--ink); }

/* This page's hero draws the logo and lights it, so the header's logo stays still here:
   one light comes on at a time. */
.bp-page .top .tunjan-lit, .bp-page .top .tunjan-dot { animation: none; }

/* Hero ---------------------------------------------------------------- */

.bp-hero {
  background: var(--wall);
  padding: clamp(28px, 6vh, 80px) var(--gutter) clamp(28px, 5vh, 56px);
}

.bp-kicker {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bp-hero h1 { font-size: clamp(2.5rem, 9vw, 6rem); }

.bp-lead {
  max-width: 34em;
  margin: clamp(14px, 2.4vh, 24px) 0 0;
  font-size: clamp(1.0625rem, 0.4vw + 0.95rem, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.bp-drawing { margin: clamp(32px, 6vh, 72px) 0 0; }
.bp-draw { display: block; width: 100%; max-width: 1040px; height: auto; overflow: visible; }

/* The drawing: guide lines first, then the window and the letters as outlines,
   then they fill, then the light comes on. Plays once. */
.g-line {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 3;
  opacity: 0.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: bp-draw 0.9s ease-out forwards;
}
.g0 { animation-delay: 0.1s; }
.g1 { animation-delay: 0.25s; }
.g2 { animation-delay: 0.4s; }
.g3 { animation-delay: 0.55s; }

.g-label {
  font-family: "Site Sans", "Noto Sans", sans-serif;
  font-size: 50px;
  font-weight: 600;
  fill: var(--ink-soft);
  opacity: 0;
  animation: bp-fade 0.6s 1s forwards;
}

.d-frame, .d-panes, .d-word {
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  fill-opacity: 0;
  animation: bp-draw 1.3s ease-in-out forwards, bp-fill 0.7s ease-out forwards;
}
.d-frame { fill: var(--logo-frame, #2C5F82); animation-delay: 0.7s, 2.5s; }
.d-panes { fill: var(--logo-panes, #F2F3EF); animation-delay: 1.1s, 2.5s; }
.d-word  { fill: var(--ink); animation-duration: 1.8s, 0.7s; animation-delay: 1.2s, 2.7s; }

.d-lit, .d-dot { fill: var(--lamp); animation: lamp-on 700ms ease-out both; }
.d-lit { animation-delay: 3.3s; }
.d-dot { animation-delay: 3.5s; }

@keyframes bp-draw { to { stroke-dashoffset: 0; } }
@keyframes bp-fill { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes bp-fade { to { opacity: 1; } }

/* Sections ------------------------------------------------------------- */

.bp-sec {
  background: var(--wall);
  padding: clamp(40px, 7vh, 88px) var(--gutter);
}

.bp-sec h2 {
  margin: 0;
  padding-top: 16px;
  border-top: 3px solid var(--rule-strong);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2rem, 3.2vw + 1rem, 3.25rem);
  line-height: 1;
  color: var(--ink);
}

.bp-intro { margin: 14px 0 0; max-width: 36em; font-size: 1.0625rem; color: var(--ink-soft); }

.bp-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 8px;
}
.bp-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 8%;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.tile img { display: block; width: 86%; height: auto; }
.bp-tiles.two .tile img { width: 26%; }
.tile-day { background: var(--tile-day); }
.tile-night { background: var(--tile-night); }
.tile-blue { background: var(--tile-blue); }

/* Download rows */
.bp-dl { list-style: none; margin: 0; padding: 0; }
.bp-dl li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.dl-name { min-width: 0; color: var(--ink); }
.dl-fmt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-soft); }
.dl-link {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent, #2C5F82);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.dl-link:hover { text-decoration-color: var(--lamp); }

/* Rules: title on the left, the rule on the right */
.bp-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 32px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.bp-dl + .bp-rule { margin-top: 28px; }
.bp-rule h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: 87.5%;
  font-size: clamp(1.25rem, 1vw + 1rem, 1.625rem);
  line-height: 1.15;
  color: var(--ink);
}
.bp-rule p { margin: 0; max-width: 36em; color: var(--ink-soft); text-wrap: pretty; }
.bp-rule .bp-dl { margin-top: 14px; }

/* The window section sits on the blue paint, under the line */
.bp-band {
  color: var(--on-paint);
  background: var(--paint);
  border-top: 6px solid var(--paint-edge);
  --ink: var(--on-paint);
  --ink-soft: var(--on-paint-soft);
  --rule: rgba(242, 243, 239, 0.22);
  --rule-strong: var(--on-paint);
  --accent: var(--on-paint-soft);
}
.bp-band .dl-link:hover { text-decoration-color: var(--lamp); }

/* Colour */
.bp-swatches {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 22px 14px;
}
@media (min-width: 1000px) { .bp-swatches { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.bp-swatches li { display: grid; gap: 4px; align-content: start; font-size: 0.875rem; overflow-wrap: anywhere; }
.bp-swatches .sw { display: block; aspect-ratio: 4 / 3; margin-bottom: 6px; box-shadow: inset 0 0 0 1px var(--rule); }
.bp-swatches b { font-weight: 700; color: var(--ink); }
.bp-swatches code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.8125rem; color: var(--ink-soft); }
.bp-swatches span:last-child { color: var(--ink-soft); }
.sw-wall { background: #F2F3EF; }
.sw-ink { background: #16242D; }
.sw-blue { background: #2C5F82; }
.sw-line { background: #1B4260; }
.sw-lamp { background: #F0A53A; }
.sw-night { background: #0F1A21; }
.sw-mist { background: #E9ECE6; }
.bp-note { margin: 24px 0 0; max-width: 40em; color: var(--ink-soft); }

/* Don't */
.bp-donts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 22px 14px;
}
.dont-fig {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 9%;
  overflow: hidden;
  background: var(--tile-day);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.dont-fig svg, .dont-fig img { display: block; width: 100%; height: auto; }
.dont-fig .dont-stretch { width: 76%; transform: scale(1.25, 0.66) skewX(-12deg); }
.bp-donts p { margin: 10px 0 0; font-size: 0.9375rem; color: var(--ink-soft); }
.bp-donts .x { color: var(--no); font-weight: 800; margin-right: 2px; }

.bp-legal { margin: 36px 0 0; max-width: 46em; font-size: 0.9375rem; color: var(--ink-soft); }

/* Contact band, the same as the home page's invite */
.bp-contact h2 {
  margin: 0;
  max-width: 24em;
  font-weight: 750;
  font-stretch: 87.5%;
  font-size: clamp(1.375rem, 1vw + 1rem, 1.875rem);
  line-height: 1.15;
  text-wrap: balance;
}

/* Phones */
@media (max-width: 700px) {
  .bp-tiles, .bp-tiles.two { grid-template-columns: minmax(0, 1fr); }
  .bp-tiles.two .tile img { width: 22%; }
  .bp-rule { grid-template-columns: minmax(0, 1fr); }
  .g-labels { display: none; }
  /* Without the labels, let the drawing use their space: the label column is 20.2 % of its width. */
  .bp-draw { width: 120.2%; max-width: none; margin-left: -20.2%; }
}

@media (prefers-reduced-motion: reduce) {
  .g-line, .g-label, .d-frame, .d-panes, .d-word, .d-lit, .d-dot { animation: none; }
  .g-line { stroke-dashoffset: 0; }
  .g-label { opacity: 1; }
  .d-frame, .d-panes, .d-word { fill-opacity: 1; stroke: none; }
}

@media print {
  .g-line, .g-label, .d-frame, .d-panes, .d-word, .d-lit, .d-dot { animation: none; }
  .g-line { stroke-dashoffset: 0; }
  .g-label { opacity: 1; }
  .d-frame, .d-panes, .d-word { fill-opacity: 1; stroke: none; }
}
