/* ==========================================================================
   Amore Loui brand portal
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-1: #f9f8f4;
  --bg-2: #f0efe9;
  --bg-3: #e6e5df;
  --fg: #000000;
  --fg-2: #4f4d4c;
  --fg-3: #706e6c;
  --fg-4: #9a9895;
  --border: rgba(23, 18, 15, 0.1);
  --border-2: rgba(23, 18, 15, 0.2);
  --selected: rgba(23, 18, 15, 0.04);

  --accent: #cfc971;
  --accent-ink: #7a762d;
  --black: #000000;
  --white: #ffffff;
  --off-white: #f9f8f4;
  --paper: #f0efe9;
  --sand: #bebcac;
  --sunset: #f0722a;
  --rust: #b24a0e;
  --vibrant: #3ca362;
  --forest: #146231;
  --pink: #cea2c4;
  --plum: #a56d98;
  --crimson: #d8422e;
  --wine: #a1191b;
  --sky: #adcce8;
  --steel: #7299bc;

  --font: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-logo: 'Anton SC', Impact, 'Arial Narrow', sans-serif;
  --font-decor: 'Lisu Bosa', Georgia, 'Times New Roman', serif;

  --sidebar: 250px;
  --layout-max: 1240px;
  --layout-gap: 64px;
  --content-max: 870px;
  --body-max: 720px;
  --section-gap: 140px;
  --block-gap: 96px;
  --top-offset: 96px;
  --reach: 60px;

  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --fast: 0.18s;
  --smooth: 0.32s;
}

:root[data-theme='dark'] {
  --bg: #0f0f0e;
  --bg-1: #171716;
  --bg-2: #1f1f1d;
  --bg-3: #2a2a27;
  --fg: #f5f4f0;
  --fg-2: #cfcdc7;
  --fg-3: #9e9c96;
  --fg-4: #6f6d68;
  --border: rgba(255, 255, 255, 0.1);
  --border-2: rgba(255, 255, 255, 0.2);
  --selected: rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--top-offset);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.015em;
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

p a,
li a:not(.nav-link),
.text-link {
  text-decoration: underline;
  text-decoration-color: var(--border-2);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--fast);
}

p a:hover,
.text-link:hover {
  text-decoration-color: var(--fg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  letter-spacing: inherit;
}

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent);
  color: var(--black);
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 26px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 16px;
}

p {
  margin: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 100;
}

.skip:focus {
  top: 16px;
}

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

/* --------------------------------------------------------------------------
   Marks (SVG masks coloured by currentColor)
   -------------------------------------------------------------------------- */
.mark {
  display: block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.mark--lockup {
  -webkit-mask-image: url('/assets/logo/lockup-black.svg');
  mask-image: url('/assets/logo/lockup-black.svg');
  aspect-ratio: 992.259 / 377;
}

.mark--wordmark {
  -webkit-mask-image: url('/assets/logo/wordmark-black.svg');
  mask-image: url('/assets/logo/wordmark-black.svg');
  aspect-ratio: 992.259 / 198.231;
}

.mark--pizza {
  -webkit-mask-image: url('/assets/logo/pizza-black.svg');
  mask-image: url('/assets/logo/pizza-black.svg');
  aspect-ratio: 548.818 / 129.737;
}

.mark--emblem {
  -webkit-mask-image: url('/assets/emblem/emblem-black.svg');
  mask-image: url('/assets/emblem/emblem-black.svg');
  aspect-ratio: 1;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  column-gap: var(--layout-gap);
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 40px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--top-offset);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-brand {
  display: block;
  width: 96px;
  color: var(--fg);
  margin-bottom: 8px;
}

.nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: block;
  padding: 7px 0 7px 14px;
  color: var(--fg-3);
  font-size: 15px;
  transition: color var(--fast);
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 14px;
  transform: translateY(-50%) scaleY(0);
  background: var(--fg);
  transition: transform var(--smooth) var(--ease);
}

.nav-link:hover {
  color: var(--fg);
}

.nav-link[aria-current='true'] {
  color: var(--fg);
}

.nav-link[aria-current='true']::before {
  transform: translateY(-50%) scaleY(1);
}

.sidebar-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--fg-3);
  transition: color var(--fast);
  text-align: left;
}

.action:hover {
  color: var(--fg);
}

.action svg {
  width: 15px;
  height: 15px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action + .action--theme {
  margin-top: 12px;
}

.content {
  max-width: var(--content-max);
  padding-top: var(--top-offset);
  padding-bottom: 120px;
  min-width: 0;
}

/* Mobile top bar */
.topbar {
  display: none;
}

/* --------------------------------------------------------------------------
   Page header & brand kit module
   -------------------------------------------------------------------------- */
.page-header {
  margin-bottom: var(--section-gap);
}

.page-header .lede {
  margin-top: 10px;
  color: var(--fg-3);
  font-size: 17px;
}

.kit {
  margin-top: 48px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
}

.kit-copy {
  padding: 28px 32px;
}

.kit-copy h2 {
  font-size: 20px;
}

.kit-copy p {
  color: var(--fg-3);
  margin-top: 6px;
  font-size: 15px;
}

.kit-steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kit-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: baseline;
  font-size: 15px;
}

.kit-steps .n {
  font-size: 12px;
  color: var(--fg-4);
  letter-spacing: 0.04em;
}

kbd {
  font: inherit;
  font-size: 12.5px;
  padding: 1px 6px;
  border: 1px solid var(--border-2);
  border-radius: 3px;
  color: var(--fg-2);
  margin-left: 4px;
}

.kit-actions {
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.kit-actions .btn {
  flex: 1;
  justify-content: flex-start;
  padding: 0 24px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.kit-actions .btn:last-child {
  border-bottom: 0;
}

.kit-actions .btn:hover {
  background: var(--selected);
}

.kit-status {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 14px;
  min-height: 1.4em;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  transition: background var(--fast), border-color var(--fast);
}

.btn:hover {
  background: var(--bg-1);
  border-color: var(--fg);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--black);
}

.btn--primary:hover {
  background: #d9d485;
  border-color: #d9d485;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-3);
  transition: color var(--fast), border-color var(--fast);
}

.icon-btn:hover {
  color: var(--fg);
  border-color: var(--border-2);
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   Sections & blocks
   -------------------------------------------------------------------------- */
.section {
  margin-bottom: var(--section-gap);
}

.section > .block + .block {
  margin-top: var(--block-gap);
}

.block-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 0;
}

.block-head::after {
  content: '';
  position: absolute;
  left: calc(-1 * var(--reach));
  right: calc(-1 * var(--reach));
  bottom: 0;
  height: 1px;
  background: var(--border);
}

.block-head .tools {
  display: flex;
  gap: 6px;
}

.body {
  max-width: var(--body-max);
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.62;
}

.body + .body {
  margin-top: 18px;
}

.block .body:first-of-type,
.block > .body {
  margin-top: 28px;
}

.block .body + .figure,
.block .body + .grid,
.block .body + .tiles {
  margin-top: 32px;
}

.caption {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 10px;
}

.label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
}

.frame {
  position: relative;
}

.frame::before,
.frame::after {
  content: '';
  position: absolute;
  left: calc(-1 * var(--reach));
  right: calc(-1 * var(--reach));
  height: 1px;
  background: var(--border);
}

.frame::before {
  top: 0;
}

.frame::after {
  bottom: 0;
}

/* Hero */
.hero {
  margin-top: 0;
  background: var(--accent);
  color: var(--black);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.hero .mark--lockup {
  width: 46%;
}

.hero-emblem {
  position: absolute;
  right: -8%;
  bottom: -22%;
  width: 46%;
  color: var(--accent-ink);
  opacity: 0.35;
}

.hero-links {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-3);
}

/* --------------------------------------------------------------------------
   Foundation
   -------------------------------------------------------------------------- */
.found {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 28px;
}

.found > div {
  background: var(--bg);
  padding: 26px 28px 30px;
}

.found .label {
  display: block;
  margin-bottom: 14px;
}

.found .statement {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.found .statement.big {
  font-size: 28px;
}

.found .note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.55;
}

.found .span2 {
  grid-column: 1 / -1;
}

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 12px;
}

.values h4 {
  font-size: 18px;
  margin-bottom: 6px;
}

.values p {
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.5;
}

.whw {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 28px;
}

.whw > div {
  background: var(--bg-1);
  padding: 24px 26px 28px;
}

.whw .n {
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--fg-4);
}

.whw h4 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 18px 0 8px;
}

.whw p {
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.arch {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.arch-card {
  border: 1px solid var(--border);
  padding: 26px 28px;
  background: var(--bg-1);
}

.arch-card .label {
  display: block;
  margin-bottom: 16px;
}

.arch-card .mark {
  width: 180px;
  margin-bottom: 20px;
}

.fundamenta {
  font-family: var(--font-logo);
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fundamenta-sub {
  font-family: var(--font-decor);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12.5px;
  margin-top: 6px;
  margin-bottom: 20px;
}

.arch-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--fg-3);
  font-size: 14.5px;
  line-height: 1.55;
}

.arch-card li + li {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Marks section
   -------------------------------------------------------------------------- */
.scale {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.scale li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.scale li .mark {
  max-width: 100%;
}

.scale .label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  color: var(--fg-3);
}

.scale .mark {
  color: var(--fg);
}

/* Konstruktionszeichnung: exakte Geometrie aus den Vektordaten, animierter Aufbau */
.construction {
  position: relative;
  margin-top: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--fg);
  overflow: hidden;
}

.c-svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--font);
}

.c-grid line,
.c-outline {
  fill: none;
  stroke: var(--border-2);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.c-outline {
  stroke-dasharray: 3 4;
}

.c-clear {
  color: var(--fg);
  opacity: 0.16;
}

.c-dims line {
  stroke: var(--fg-2);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.c-labels text {
  font-size: 22px;
  fill: var(--fg-3);
  paint-order: stroke;
  stroke: var(--bg-1);
  stroke-width: 10px;
  stroke-linejoin: round;
}

.c-labels .c-note {
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c-lockup {
  color: var(--fg);
}

/* Ausgangszustand vor dem Sichtbarwerden */
.c-lockup {
  opacity: 0;
  transition: opacity 0.7s var(--ease) 0.1s;
}

.c-grid line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.9s var(--ease) calc(0.55s + var(--i, 0) * 0.07s);
}

.c-dims > g {
  opacity: 0;
  transition: opacity 0.4s ease calc(1.3s + var(--i, 0) * 0.12s);
}

.c-labels text {
  opacity: 0;
  transition: opacity 0.4s ease calc(1.4s + var(--i, 0) * 0.12s);
}

.c-clear {
  transition: opacity 0.9s ease 2.3s;
}

.construction:not(.is-visible) .c-clear {
  opacity: 0;
}

.construction.is-visible .c-lockup,
.construction.is-visible .c-dims > g,
.construction.is-visible .c-labels text {
  opacity: 1;
}

.construction.is-visible .c-grid line {
  stroke-dashoffset: 0;
}

.construction.is-reset .c-lockup,
.construction.is-reset .c-grid line,
.construction.is-reset .c-dims > g,
.construction.is-reset .c-labels text,
.construction.is-reset .c-clear {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .c-lockup,
  .c-dims > g,
  .c-labels text {
    opacity: 1;
  }
  .c-grid line {
    stroke-dashoffset: 0;
  }
  .construction:not(.is-visible) .c-clear {
    opacity: 0.16;
  }
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tiles--2 {
  grid-template-columns: repeat(2, 1fr);
}

.tiles--4 {
  grid-template-columns: repeat(4, 1fr);
}

.tiles--5 {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tile-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  overflow: hidden;
}

.tile-visual.square {
  aspect-ratio: 1;
}

.tile-visual.tall {
  aspect-ratio: 3 / 4;
}

.tile-visual .mark--lockup {
  width: 62%;
}

.tile-visual .mark--wordmark {
  width: 70%;
}

.tile-visual .mark--pizza {
  width: 55%;
}

.tile-visual .mark--emblem {
  width: 58%;
}

.tile-visual.photo {
  background: url('/assets/applications/table.webp') center / cover;
}

.tile-visual.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.tile-visual.photo .mark {
  position: relative;
  z-index: 1;
}

.tile-visual .rotated {
  transform: rotate(-90deg);
  width: 86%;
}

.tile-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
  font-size: 13.5px;
}

.tile-meta .links {
  display: flex;
  gap: 10px;
  color: var(--fg-3);
  flex: none;
}

.tile-meta .links a:hover {
  color: var(--fg);
}

.bg-white {
  background: var(--white);
  color: var(--black);
}

.bg-black {
  background: var(--black);
  color: var(--white);
}

.bg-accent {
  background: var(--accent);
  color: var(--black);
}

.bg-accent.ink {
  color: var(--accent-ink);
}

.bg-off {
  background: var(--off-white);
  color: var(--black);
}

.bg-paper {
  background: var(--paper);
  color: var(--black);
}

.bg-sand {
  background: var(--sand);
  color: var(--black);
}

.bg-surface {
  background: var(--bg-1);
  color: var(--fg);
}

/* Favicon: Größen von X-Large bis X-Small und Browser-Tabs */
.favicon-scale {
  list-style: none;
  margin: 32px 0 0;
  padding: 36px 32px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 32px 48px;
  border: 1px solid var(--border);
  background: var(--bg-1);
}

.favicon-scale li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.favicon-scale img {
  display: block;
  max-width: 100%;
  height: auto;
}

.favicon-scale .fav-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

.favicon-scale .fav-size {
  color: var(--fg);
}

.favicon-scale .fav-px {
  color: var(--fg-3);
}

.tabs-demo {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.tab-bar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 10px 0;
  border: 1px solid var(--border);
  font-size: 12.5px;
  letter-spacing: 0;
  overflow: hidden;
}

.tab-bar .tab {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 240px;
  padding: 9px 14px 10px;
  border-radius: 8px 8px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-bar .tab img {
  flex: none;
  width: 16px;
  height: 16px;
}

.tab-bar.light {
  background: #e7e6e2;
  color: #4f4d4c;
}

.tab-bar.light .tab.is-active {
  background: #ffffff;
  color: #000000;
}

.tab-bar.dark {
  background: #1f1f1f;
  color: #a8a6a1;
  border-color: #1f1f1f;
}

.tab-bar.dark .tab.is-active {
  background: #353535;
  color: #f5f4f0;
}

/* (Pizza) device samples */
.device {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.device-sample {
  border: 1px solid var(--border);
  background: var(--bg-1);
  padding: 32px 28px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.device-sample .deco {
  font-family: var(--font-decor);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 30px;
  line-height: 1.15;
}

.device-sample .brackets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: baseline;
}

.device-sample .brackets .deco {
  font-size: 26px;
}

.device-sample .caption {
  margin-top: 16px;
}

.typewriter::after {
  content: '|';
  animation: blink 1s steps(1) infinite;
  font-family: var(--font);
  font-weight: 300;
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Misuse */
.donts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.dont {
  font-size: 13.5px;
}

.dont-visual {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-1);
  overflow: hidden;
  position: relative;
  color: var(--fg);
}

.dont-visual .mark {
  width: 60%;
}

.dont-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 0.5px), var(--crimson) calc(50% - 0.5px), var(--crimson) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  opacity: 0.8;
  pointer-events: none;
}

.dont p {
  margin-top: 10px;
  color: var(--fg-2);
}

.dont-stretch .mark {
  transform: scaleX(1.5);
}

.dont-color .dont-visual {
  background: var(--black);
}

.dont-color .mark {
  color: var(--accent);
}

.dont-shadow .mark {
  filter: drop-shadow(4px 6px 0 var(--sand));
}

.dont-busy .dont-visual {
  background: url('/assets/applications/vegetable-pizza.webp') center / cover;
}

.dont-busy .mark {
  color: var(--white);
  opacity: 0.9;
}

.dont-inline .fake {
  font-family: var(--font-logo);
  font-size: 28px;
  text-transform: uppercase;
  line-height: 1;
}

.dont-inline .fake span {
  font-family: var(--font-decor);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.dont-font .fake {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Colour palette
   -------------------------------------------------------------------------- */
.swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.swatch {
  position: relative;
  aspect-ratio: 1 / 1.05;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  text-align: left;
  transition: transform var(--smooth) var(--ease);
}

.swatch.primary {
  grid-column: span 2;
  aspect-ratio: auto;
  min-height: 300px;
}

.swatch .name {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.swatch .role {
  font-size: 12.5px;
  opacity: 0.7;
  margin-top: 2px;
}

.swatch dl {
  margin: 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  row-gap: 4px;
  font-size: 13px;
}

.swatch dt {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  align-self: center;
}

.swatch dd {
  margin: 0;
}

.swatch .copied {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 12px;
  opacity: 0;
  transition: opacity var(--fast);
}

.swatch.is-copied .copied {
  opacity: 0.85;
}

.swatch.light-ink {
  color: var(--white);
}

.swatch.dark-ink {
  color: var(--black);
}

.swatch .pair {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 22%;
}

.swatch .pair-label {
  position: absolute;
  right: 22%;
  top: 20px;
  transform: translateX(-10px);
  font-size: 11px;
  opacity: 0.7;
  text-align: right;
}

.proportions {
  margin-top: 32px;
}

.bar {
  display: flex;
  height: 120px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.bar > div {
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

.bar .pct {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
}

.bar .what {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

.combos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}

.combo {
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.combo .aa {
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.combo .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
}

.combo .ratio {
  font-size: 15px;
}

.combo .grade {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.85;
}

.combo .grade.fail {
  opacity: 0.6;
}

.combo .who {
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.typeface {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.typeface:last-of-type {
  border-bottom: 0;
}

.typeface .sample {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.typeface .sample.logo {
  font-family: var(--font-logo);
  font-size: 46px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.typeface .sample.decor {
  font-family: var(--font-decor);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 30px;
}

.typeface .body {
  margin-top: 0;
}

.typeface .rules {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.typeface .rules li {
  font-size: 12.5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--fg-3);
}

.alphabet {
  margin-top: 36px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  word-break: break-all;
}

.scale-controls {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  margin-top: 32px;
}

.scale-controls .row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
}

.scale-controls .row + .row {
  border-top: 1px solid var(--border);
}

.scale-controls input[type='range'] {
  width: 100%;
  accent-color: var(--fg);
}

.scale-controls select {
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border-2);
  padding: 6px 8px;
  width: 100%;
  min-width: 0;
}

.scale-controls output {
  text-align: right;
  font-size: 14px;
}

.type-scale {
  list-style: none;
  margin: 0;
  padding: 0;
}

.type-scale li {
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.type-scale .meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.type-scale .meta .spec {
  font-size: 12px;
  color: var(--fg-4);
}

.type-scale .sample {
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.type-scale .sample.body-sample {
  line-height: 1.6;
  letter-spacing: -0.015em;
  max-width: 640px;
  color: var(--fg-2);
}

/* --------------------------------------------------------------------------
   Tone of voice
   -------------------------------------------------------------------------- */
.quote {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  max-width: 720px;
  margin-top: 28px;
}

.quote cite {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 12px;
  letter-spacing: 0;
}

.messages {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}

.messages li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}

.messages li:last-child {
  border-bottom: 1px solid var(--border);
}

.messages .text {
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.messages .text.small {
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.5;
  color: var(--fg-2);
}

.tones {
  display: grid;
  gap: 48px;
  margin-top: 36px;
}

.tone {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.tone .head {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.tone .num {
  font-size: 13px;
  color: var(--fg-4);
}

.tone h3 {
  font-size: 24px;
}

.tone .line {
  font-size: 20px;
  letter-spacing: -0.025em;
  line-height: 1.3;
  max-width: 640px;
}

.sayavoid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  margin-top: 6px;
}

.sayavoid > div {
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.5;
}

.sayavoid .hd {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-4);
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}

.sayavoid .say {
  border-right: 1px solid var(--border);
}

.sayavoid .avoid {
  color: var(--fg-3);
}

.tone .guard {
  font-size: 14px;
  color: var(--fg-3);
}

.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 32px;
}

.principles > div {
  background: var(--bg);
  padding: 24px 26px 28px;
}

.principles .letter {
  font-size: 12px;
  color: var(--fg-4);
  letter-spacing: 0.08em;
}

.principles h3 {
  font-size: 22px;
  margin: 10px 0 10px;
}

.principles p {
  font-size: 14.5px;
  color: var(--fg-3);
  line-height: 1.55;
}

.keylines {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}

.keylines li {
  break-inside: avoid;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.facts {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.facts span {
  font-family: var(--font-decor);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Applications
   -------------------------------------------------------------------------- */
.packs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 32px;
}

.packs figure {
  margin: 0;
}

.packs img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  width: 100%;
}

.packs figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.4;
}

.packs figcaption .swatch-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.packs figcaption span.c {
  display: block;
  color: var(--fg-3);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.gallery figure {
  margin: 0;
}

.gallery figure.wide {
  grid-column: span 2;
}

.gallery figure.wide img {
  aspect-ratio: 3 / 2;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--bg-2);
}

.gallery figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 13.5px;
}

.gallery figcaption a {
  color: var(--fg-3);
  flex: none;
}

.gallery figcaption a:hover {
  color: var(--fg);
}

.photo-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.photo-rules img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo-rules h4 {
  margin: 14px 0 6px;
  font-size: 16px;
}

.photo-rules p {
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.5;
}

.motion {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.motion li {
  border: 1px solid var(--border);
  padding: 20px 22px;
  font-size: 14.5px;
  color: var(--fg-2);
  line-height: 1.5;
}

.motion li strong {
  display: block;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Exports
   -------------------------------------------------------------------------- */
.export-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.export-actions .btn {
  justify-content: flex-start;
  background: var(--bg-1);
  border-color: var(--border);
}

.export-group {
  margin-top: 40px;
}

.export-group h3 {
  font-size: 17px;
  margin-bottom: 16px;
}

.tiles--export .tile-visual {
  aspect-ratio: 1;
}

.tiles--export .tile-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.files {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.files li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}

.files li span {
  color: var(--fg-3);
}

.files .links {
  display: flex;
  gap: 14px;
  color: var(--fg-3);
}

.files .links a:hover {
  color: var(--fg);
}

.files .file-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.files .file-icon img {
  flex: none;
  width: 28px;
  height: 28px;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

pre {
  margin: 0;
  padding: 18px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  overflow: auto;
  line-height: 1.5;
  color: var(--fg-2);
}

.code-block {
  position: relative;
  margin-top: 16px;
}

.code-block .icon-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 40px 40px 60px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  column-gap: var(--layout-gap);
  font-size: 13px;
  color: var(--fg-3);
}

.footer .mark {
  width: 72px;
  color: var(--fg);
}

.footer p + p {
  margin-top: 8px;
}

.footer .fine {
  max-width: var(--body-max);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  :root {
    --layout-gap: 40px;
    --sidebar: 210px;
    --reach: 24px;
  }
}

@media (max-width: 900px) {
  :root {
    --top-offset: 80px;
    --section-gap: 96px;
    --block-gap: 64px;
    --reach: 16px;
  }

  .layout {
    display: block;
    padding: 0 16px;
  }

  .topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 50;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .topbar .mark {
    width: 64px;
    color: var(--fg);
  }

  .topbar .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
  }

  .sidebar {
    position: fixed;
    inset: 56px 0 0 0;
    height: auto;
    padding: 24px 16px 32px;
    background: var(--bg);
    z-index: 40;
    overflow: auto;
    transform: translateX(-100%);
    transition: transform var(--smooth) var(--ease);
  }

  .sidebar.is-open {
    transform: none;
  }

  .sidebar-brand {
    display: none;
  }

  .nav-link {
    font-size: 18px;
    padding: 10px 0 10px 14px;
  }

  .sidebar-actions {
    margin-top: 32px;
  }

  .action {
    font-size: 16px;
    padding: 8px 0;
  }

  .content {
    max-width: none;
    padding-top: 40px;
  }

  h1 {
    font-size: 32px;
  }

  .kit {
    grid-template-columns: 1fr;
  }

  .kit-actions {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .kit-actions .btn {
    min-height: 52px;
  }

  .hero .mark--lockup {
    width: 60%;
  }

  .found,
  .whw,
  .arch,
  .device,
  .principles,
  .sayavoid,
  .combos,
  .photo-rules,
  .motion,
  .export-actions {
    grid-template-columns: 1fr;
  }

  .sayavoid .say {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .values {
    grid-template-columns: 1fr 1fr;
  }

  .tiles,
  .tiles--4,
  .tiles--5,
  .donts,
  .swatches,
  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .swatch.primary {
    grid-column: 1 / -1;
  }

  .gallery figure.wide {
    grid-column: 1 / -1;
  }

  .packs {
    grid-template-columns: repeat(3, 1fr);
  }

  .keylines {
    columns: 1;
  }

  .messages li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .scale li {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .scale-controls .row {
    grid-template-columns: 50px minmax(0, 1fr) 64px;
    gap: 10px;
    padding: 12px 14px;
  }

  .typeface {
    grid-template-columns: 1fr;
  }

  .alphabet {
    font-size: 36px;
  }

  .bar {
    height: 100px;
  }

  .bar > div {
    padding: 8px 10px;
  }

  .bar .pct {
    font-size: 16px;
  }

  .bar .what {
    display: none;
  }

  .footer {
    display: block;
    padding: 32px 16px 48px;
  }

  .footer .mark {
    margin-bottom: 16px;
  }
}

@media (max-width: 520px) {
  .tiles--4,
  .tiles--5 {
    grid-template-columns: 1fr 1fr;
  }

  .packs {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero .mark--lockup {
    width: 70%;
  }

  .construction .dim {
    font-size: 9px;
  }
}

/* --------------------------------------------------------------------------
   Print (PDF guidelines)
   -------------------------------------------------------------------------- */
@media print {
  :root {
    --section-gap: 48px;
    --block-gap: 32px;
    --reach: 0px;
    --top-offset: 0px;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11.5px;
  }

  .topbar,
  .sidebar,
  .kit,
  .tools,
  .skip,
  .export-actions,
  .copied,
  .scale-controls,
  .hero-links {
    display: none !important;
  }

  .layout {
    display: block;
    padding: 0;
    max-width: none;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .section {
    break-before: page;
  }

  .section:first-of-type {
    break-before: auto;
  }

  .block,
  .tile,
  .swatch,
  .combo,
  .tone,
  figure {
    break-inside: avoid;
  }

  .mark {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .c-lockup,
  .c-dims > g,
  .c-labels text {
    opacity: 1 !important;
    transition: none !important;
  }

  .c-grid line {
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }

  .c-clear {
    opacity: 0.16 !important;
    transition: none !important;
  }

  .hero,
  .swatch,
  .bg-black,
  .bg-accent,
  .bg-white,
  .bg-off,
  .bg-paper,
  .bg-sand,
  .tile-visual,
  .dont-visual,
  .bar > div {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .footer {
    display: block;
    padding: 24px 0;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .packs {
    grid-template-columns: repeat(6, 1fr);
  }

  a[href]::after {
    content: '';
  }
}
