/* ==========================================================================
   Enso Styleguide — Page Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600&family=JetBrains+Mono:wght@400&display=swap');

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-relaxed);
  color: var(--theme-text);
  background-color: var(--theme-background);
}

code {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-book);
  background-color: rgba(109, 70, 70, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--light-100);
}

.site-nav__inner {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--site-margin);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}

.site-nav__links {
  display: flex;
  list-style: none;
  gap: 0;
}

.site-nav__link {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-decoration: none;
  text-transform: uppercase;
  padding: var(--nav-link-padding-y) var(--space-2);
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.site-nav__link:hover {
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Hero / Header Section
   -------------------------------------------------------------------------- */
.hero {
  background-color: var(--brand-warm);
  padding: var(--section-space-large) var(--site-margin);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
}

.hero__overline {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero__logo {
  display: flex;
  align-items: center;
}

.hero__title {
  font-family: var(--font-sans);
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
  color: var(--dark-900);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero__tagline {
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  color: var(--dark-900);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  background-color: var(--brand-600);
  color: var(--dark-900);
  font-family: var(--font-sans);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-small);
  line-height: 1.5;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: var(--section-space-main) var(--site-margin);
  max-width: var(--site-max-width);
  margin: 0 auto;
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.section__title {
  font-family: var(--font-sans);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-h1);
  color: var(--theme-text);
}

.section__description {
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  color: var(--theme-text);
  max-width: 65ch;
}

.section-divider {
  border: none;
  border-top: var(--border-width-main) solid var(--theme-border);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Typography Section
   -------------------------------------------------------------------------- */
.type-table {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.type-row {
  display: flex;
  align-items: center;
  gap: var(--site-gutter);
  padding: var(--space-5) 0;
  border-top: var(--border-width-main) solid var(--theme-border);
}

.type-row__meta {
  width: 211px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.type-row__label {
  font-size: var(--font-size-text-small);
  color: var(--rose-700);
  font-weight: var(--font-weight-semibold);
}

.type-row__specs {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  line-height: 1.6;
}

.type-row__sample {
  flex: 1;
  min-width: 0;
  color: var(--theme-text);
  overflow: hidden;
}

/* Type samples */
.sample-display {
  font-family: var(--font-sans);
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-display);
  letter-spacing: var(--letter-spacing-display);
}

.sample-h1 {
  font-family: var(--font-sans);
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-base);
  letter-spacing: var(--letter-spacing-h1);
}

.sample-h2 {
  font-family: var(--font-sans);
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.sample-h3 {
  font-family: var(--font-sans);
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.sample-h4 {
  font-family: var(--font-sans);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-base);
}

.sample-h5 {
  font-family: var(--font-sans);
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-base);
}

.sample-h6 {
  font-family: var(--font-sans);
  font-size: var(--font-size-h6);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-base);
}

.sample-text-large {
  font-family: var(--font-sans);
  font-size: var(--font-size-text-large);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-relaxed);
}

.sample-text-main {
  font-family: var(--font-sans);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-relaxed);
}

.sample-text-small {
  font-family: var(--font-sans);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  line-height: var(--line-height-relaxed);
}

.sample-mono-large {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-large);
  font-weight: var(--font-weight-book);
  line-height: var(--line-height-relaxed);
}

.sample-mono-main {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-book);
  line-height: var(--line-height-relaxed);
}

.sample-mono-small {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  line-height: var(--line-height-relaxed);
}

/* --------------------------------------------------------------------------
   Colors Section
   -------------------------------------------------------------------------- */
.color-themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--site-gutter);
}

.color-card {
  padding: var(--space-5);
  border-radius: var(--radius-small);
  border: var(--border-width-main) solid var(--theme-border);
  background-color: var(--theme-background);
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.color-card__header {
  padding-bottom: var(--space-3);
  border-bottom: var(--border-width-main) solid var(--theme-border);
}

.color-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.color-card__heading {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--theme-text);
}

.color-card__body {
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-relaxed);
  color: var(--theme-text);
}

.color-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Color palette swatches */
.color-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--site-gutter);
  margin-top: var(--space-5);
}

.color-swatch {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
  cursor: pointer;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  transition: opacity 0.15s;
}

.color-swatch:hover {
  opacity: 0.85;
}

.color-swatch__preview {
  height: 80px;
  border-radius: var(--radius-small);
  border: var(--border-width-main) solid var(--theme-border);
}

.color-swatch__name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--theme-text);
}

.color-swatch__value {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
}

.color-swatch__popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background-color: var(--rose-700);
  color: var(--light-100);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: var(--radius-small);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.color-swatch.is-copied .color-swatch__popover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Global Styles Section
   -------------------------------------------------------------------------- */
.global-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.subsection {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.subsection__title {
  font-size: var(--font-size-h6);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-base);
  color: var(--theme-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Spacing visualizer */
.spacing-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.spacing-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.spacing-item__bar {
  background-color: var(--mauve-400);
  height: 32px;
  border-radius: var(--radius-small);
  flex-shrink: 0;
}

.spacing-item__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--theme-text);
  white-space: nowrap;
}

/* Radius visualizer */
.radius-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--site-gutter);
}

.radius-card {
  background-color: var(--light-100);
  border: var(--border-width-main) solid var(--theme-border);
  border-radius: var(--radius-main);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

.radius-card__preview {
  background-color: var(--mauve-400);
  height: 80px;
  width: 100%;
}

.radius-card--small .radius-card__preview { border-radius: var(--radius-small); }
.radius-card--main .radius-card__preview { border-radius: var(--radius-main); }
.radius-card--round .radius-card__preview { border-radius: var(--radius-round); }

/* Border width visualizer */
.border-samples {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.border-sample {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.border-sample__preview {
  width: 120px;
  height: 48px;
  border-radius: var(--radius-small);
  background-color: var(--light-100);
}

.border-sample--main .border-sample__preview {
  border: var(--border-width-main) solid var(--dark-900);
}

.border-sample__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--theme-text);
}

/* --------------------------------------------------------------------------
   Buttons Section
   -------------------------------------------------------------------------- */
.button-demos {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.button-group {
  padding: var(--space-7);
  border-radius: var(--radius-small);
  border: var(--border-width-main) solid var(--theme-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.button-group__label {
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose-700);
  margin-bottom: var(--space-1);
}

.button-group__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

/* Base Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: var(--radius-round);
  border: var(--border-width-main) solid transparent;
  font-family: var(--font-sans);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  line-height: 1.5;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Focus Indicators (WCAG 2.1 AA — 2.4.7 Focus Visible)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
}

.site-nav__link:focus-visible,
.site-nav__hamburger:focus-visible,
.site-nav__mobile-link:focus-visible,
.site-footer__link:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: var(--radius-small);
}

/* Primary Button */
.btn-primary {
  background-color: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
  color: var(--btn-primary-text);
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
  color: var(--btn-secondary-text);
}

/* Icon inside a .btn */
.btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn__icon--left {
  margin-right: var(--space-1);
}

.btn__icon--right {
  margin-left: var(--space-1);
}

/* Copy-to-clipboard button (enso.no pattern) */
.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  background: none;
  border: var(--border-width-main) solid var(--mauve-400);
  border-radius: var(--radius-round);
  padding: 8px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-copy:hover {
  opacity: 0.7;
}

.theme-dark .btn-copy {
  color: var(--light-100);
}

.btn-copy__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Download Section
   -------------------------------------------------------------------------- */
.download-section {
  background-color: var(--light-100);
  padding: var(--section-space-main) var(--site-margin);
}

.download-card {
  max-width: 860px;
  margin: 0 auto;
  background-color: var(--rose-700);
  border-radius: var(--radius-main);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.download-card__title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--light-100);
}

.download-card__description {
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  color: rgba(255, 246, 246, 0.7);
  max-width: 55ch;
}

.download-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.download-card__curl {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.download-card__curl-label {
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  color: rgba(255, 246, 246, 0.7);
}

.download-card__curl-row {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.25);
  border: var(--border-width-main) solid rgba(255, 246, 246, 0.15);
  border-radius: var(--radius-small);
  padding: var(--space-2) var(--space-3);
}

.download-card__curl-code {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--light-100);
  background: none;
  border: none;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  flex: 1;
}

.download-card__curl-code code {
  color: inherit;
  background: none;
  font-size: inherit;
}

.download-card__curl-copy {
  position: relative;
  appearance: none;
  background: transparent;
  border: none;
  color: var(--light-100);
  opacity: 0.5;
  cursor: pointer;
  padding: var(--space-1);
  margin-left: var(--space-2);
  flex-shrink: 0;
  line-height: 1;
  transition: opacity 0.15s;
}

.download-card__curl-copy:hover {
  opacity: 1;
}

.download-card__curl-copy.is-copied {
  opacity: 1;
  color: var(--brand-600);
}

.download-card__curl-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background-color: var(--light-100);
  color: var(--rose-700);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: var(--radius-small);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.download-card__curl-copy.is-copied .download-card__curl-popover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--rose-700);
  padding: var(--space-8) var(--site-margin) var(--space-6);
}

.site-footer__inner {
  max-width: var(--site-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: var(--border-width-main) solid rgba(255, 246, 246, 0.15);
  margin-bottom: var(--space-5);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.site-footer__logo-link {
  display: inline-block;
}

.site-footer__logo {
  display: block;
}

.site-footer__address {
  font-family: var(--font-sans);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-semibold);
  color: rgba(255, 246, 246, 0.7);
  line-height: var(--line-height-relaxed);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.site-footer__link {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-semibold);
  color: var(--light-100);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.site-footer__link:hover {
  opacity: 0.7;
}

.site-footer__legal {
  max-width: var(--site-max-width);
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-semibold);
  color: rgba(255, 246, 246, 0.7);
}

/* --------------------------------------------------------------------------
   Grafiske former
   -------------------------------------------------------------------------- */
:root {
  --shape-h: 80px;
}

/* Individual shapes */
.shape {
  flex-shrink: 0;
  height: var(--shape-h);
}

.shape--circle {
  width: var(--shape-h);
  border-radius: 50%;
}

.shape--rect {
  width: 160px;
  border-radius: var(--radius-main);
}

.shape--pill {
  width: 160px;
  border-radius: var(--radius-round);
}

.shape--half-circle {
  width: calc(var(--shape-h) / 2);
  border-radius: 0 var(--radius-round) var(--radius-round) 0;
}

.shape--half-circle-left {
  border-radius: var(--radius-round) 0 0 var(--radius-round);
}

.shape--rect-right {
  width: 160px;
  border-radius: 0 var(--radius-main) var(--radius-main) 0;
}

.shape--d {
  width: 160px;
  border-radius: var(--radius-round) 0 0 var(--radius-round);
}

/* Shape vocabulary grid */
.shapes-vocab {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.shapes-vocab__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}

.shapes-vocab__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--theme-text);
  opacity: 0.6;
}

/* Composition and color rows */
.shapes-rule {
  margin-bottom: var(--space-6);
}

.shapes-rule__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.shapes-composition {
  display: flex;
  align-items: flex-end;
}

.shapes-colors {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.shapes-row {
  display: flex;
  align-items: flex-end;
}

/* --------------------------------------------------------------------------
   Logo & Identity Section
   -------------------------------------------------------------------------- */
.logo-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--site-gutter);
  margin-bottom: var(--space-8);
}

.logo-on-light,
.logo-on-dark,
.logo-on-brand {
  padding: var(--space-7) var(--space-5);
  border-radius: var(--radius-small);
  border: var(--border-width-main) solid var(--theme-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: center;
}

.logo-on-light {
  background-color: var(--light-100);
}

.logo-on-dark {
  background-color: var(--rose-700);
  border-color: rgba(255, 246, 246, 0.15);
}

.logo-on-brand {
  background-color: var(--brand-warm);
}

.logo-showcase-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo-on-dark .logo-showcase-label {
  color: rgba(255, 246, 246, 0.7);
}

.logo-clearspace {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: var(--border-width-main) dashed var(--mauve-400);
  border-radius: var(--radius-small);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-100);
}

.logo-clearspace__inner {
  outline: var(--border-width-main) solid var(--brand-600);
  padding: 22px;
}

.favicon-demo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border: var(--border-width-main) solid var(--theme-border);
  border-radius: var(--radius-small);
  background-color: var(--theme-background);
}

.favicon-demo__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--theme-text);
}

/* --------------------------------------------------------------------------
   Navigation Demo Section
   -------------------------------------------------------------------------- */
.nav-demo {
  background-color: var(--light-100);
  border: var(--border-width-main) solid var(--theme-border);
  border-radius: var(--radius-small);
  overflow: hidden;
  margin-bottom: var(--space-7);
}

.nav-demo__bar {
  display: flex;
  align-items: center;
  height: var(--nav-height);
  padding: 0 var(--site-margin);
  background-color: var(--light-100);
  border-bottom: var(--border-width-main) solid var(--mauve-400);
  gap: var(--space-6);
}

.nav-demo__logo {
  flex: 1;
  display: flex;
  align-items: center;
}

.nav-demo__links {
  display: flex;
  list-style: none;
  align-items: center;
}

.nav-demo__link {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-decoration: none;
  padding: var(--nav-link-padding-y) var(--nav-link-padding-x);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.nav-demo__link:hover {
  opacity: 0.85;
}

.nav-demo__link--active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-demo__states {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--site-gutter);
  padding: var(--space-5);
  background-color: var(--theme-background);
}

.nav-state {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.nav-state__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-state__link {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-decoration: none;
  text-transform: uppercase;
  padding: 4px 0;
}

.nav-state__link--hover {
  opacity: 0.85;
}

.nav-state__link--active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Links Section
   -------------------------------------------------------------------------- */
.link-demos {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.link-demo-row {
  display: flex;
  align-items: baseline;
  gap: var(--site-gutter);
  padding: var(--space-4) 0;
  border-top: var(--border-width-main) solid var(--theme-border);
}

.link-demo-row__meta {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.link-demo-row__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.link-demo-row__sample {
  flex: 1;
}

.link-demo-row__sample--dark {
  background-color: var(--rose-700);
  padding: var(--space-2);
  border-radius: var(--radius-small);
}

/* Link variants */
.link-nav {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.link-nav:hover {
  opacity: 0.85;
}

.link-inline {
  font-family: var(--font-sans);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  color: var(--rose-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-inline:hover {
  text-decoration-thickness: 3px;
}

.link-cta {
  font-family: var(--font-sans);
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  color: var(--rose-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.link-cta:hover {
  gap: var(--space-2);
}

.link-footer {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-semibold);
  color: var(--light-100);
  text-decoration: underline;
}

.link-footer:hover {
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Images & Media Section
   -------------------------------------------------------------------------- */
.image-demo {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.image-demo__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--site-gutter);
}

.image-ratio-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.image-ratio-card__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.image-ratio-card__frame {
  background-color: var(--mauve-400);
  width: 100%;
  border-radius: var(--radius-small);
  overflow: hidden;
  position: relative;
}

.image-ratio-card__frame--square { aspect-ratio: var(--img-aspect-ratio-square); }
.image-ratio-card__frame--wide   { aspect-ratio: var(--img-aspect-ratio-wide); }
.image-ratio-card__frame--port   { aspect-ratio: var(--img-aspect-ratio-portrait); }
.image-ratio-card__frame--land   { aspect-ratio: var(--img-aspect-ratio-landscape); }

.image-ratio-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-overlay-demo {
  position: relative;
  border-radius: var(--radius-small);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--rose-700);
}

.image-overlay-demo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.6;
}

.image-overlay-demo__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: var(--space-5);
}

.image-overlay-demo__caption {
  color: var(--light-100);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  max-width: 60%;
}

.image-caption-demo {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.image-caption-demo__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-small);
  display: block;
  background-color: var(--mauve-400);
}

.image-caption-demo__caption {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  padding-top: var(--space-1);
}

/* --------------------------------------------------------------------------
   Components Section
   -------------------------------------------------------------------------- */
.component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--site-gutter);
}

.component-card {
  border: var(--border-width-main) solid var(--theme-border);
  border-radius: var(--radius-small);
  overflow: hidden;
  background-color: var(--theme-background);
  display: flex;
  flex-direction: column;
}

.component-card__image {
  width: 100%;
  aspect-ratio: var(--img-aspect-ratio-square);
  object-fit: cover;
  display: block;
  background-color: var(--mauve-400);
}

.component-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.component-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.component-card__title {
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-base);
  color: var(--theme-text);
}

.component-card__meta {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  margin-top: auto;
}

/* Tag / category chip */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-round);
  border: var(--border-width-main) solid var(--theme-border);
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--theme-text);
  background-color: transparent;
  white-space: nowrap;
  line-height: 1.5;
}

.tag--brand {
  background-color: var(--brand-600);
  border-color: var(--brand-600);
  color: var(--dark-900);
}

.tag--dark {
  background-color: var(--rose-700);
  border-color: var(--rose-700);
  color: var(--light-100);
}

.tag-demo {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-5);
  border: var(--border-width-main) solid var(--theme-border);
  border-radius: var(--radius-small);
  margin-top: var(--space-6);
}

/* --------------------------------------------------------------------------
   Page Layout Patterns Section
   -------------------------------------------------------------------------- */
.layout-demo {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.layout-demo__frame {
  border: var(--border-width-main) solid var(--theme-border);
  border-radius: var(--radius-small);
  overflow: hidden;
}

.layout-demo__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-3) var(--space-4);
  background-color: var(--theme-background);
  border-bottom: var(--border-width-main) solid var(--theme-border);
}

/* Hero layout mock */
.layout-hero-mock {
  background-color: var(--brand-warm);
  padding: var(--space-8) var(--site-margin);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: var(--space-5);
}

.layout-hero-mock__overline {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.layout-hero-mock__h1 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--dark-900);
  max-width: 12ch;
}

/* Two-column layout mock */
.layout-two-col-mock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--light-100);
}

.layout-two-col-mock__text {
  padding: var(--space-7) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
}

.layout-two-col-mock__h2 {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--dark-900);
}

.layout-two-col-mock__p {
  font-size: var(--font-size-text-main);
  font-weight: var(--font-weight-semibold);
  color: var(--dark-900);
  line-height: var(--line-height-relaxed);
}

.layout-two-col-mock__image {
  background-color: var(--mauve-400);
  min-height: 200px;
  aspect-ratio: var(--img-aspect-ratio-square);
}

/* Grid layout mock */
.layout-grid-mock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--site-gutter);
  padding: var(--space-6) var(--site-margin);
  background-color: var(--theme-background);
}

.layout-grid-mock__item {
  background-color: var(--mauve-400);
  border-radius: var(--radius-small);
  aspect-ratio: var(--img-aspect-ratio-square);
  opacity: 0.5;
}

.layout-grid-mock__item:first-child {
  opacity: 0.8;
}

.layout-grid-mock__item:nth-child(2) {
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.full-width {
  max-width: 100%;
  margin: 0;
  padding-left: var(--site-margin);
  padding-right: var(--site-margin);
}

/* --------------------------------------------------------------------------
   Hamburger Button (mobile nav toggle — hidden on desktop)
   -------------------------------------------------------------------------- */
.site-nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: var(--nav-height);
  height: var(--nav-height);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.site-nav__hamburger span {
  display: block;
  width: 22px;
  height: var(--border-width-main);
  background-color: var(--dark-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav__hamburger.is-active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.site-nav__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}
.site-nav__hamburger.is-active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Mobile Menu Overlay
   -------------------------------------------------------------------------- */
.site-nav__mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  background-color: var(--light-100);
  border-bottom: var(--border-width-main) solid var(--mauve-400);
}

.site-nav__mobile-menu.is-open {
  display: block;
}

.site-nav__mobile-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  list-style: none;
}

.site-nav__mobile-link {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: block;
  padding: var(--space-3) var(--space-4);
  width: 100%;
  text-align: right;
  transition: opacity 0.2s;
  border-top: var(--border-width-main) solid var(--mauve-400);
}

.site-nav__mobile-link:hover {
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Mobile Section Styles
   -------------------------------------------------------------------------- */
.mobile-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--site-gutter);
  margin-bottom: var(--space-7);
}

.mobile-frame {
  border: var(--border-width-main) solid var(--theme-border);
  border-radius: var(--radius-small);
  overflow: hidden;
  background-color: var(--light-100);
}

.mobile-frame__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-2) var(--space-3);
  background-color: var(--theme-background);
  border-bottom: var(--border-width-main) solid var(--theme-border);
}

/* Mock nav for mobile demos */
.mobile-nav-mock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 var(--space-4);
  background-color: var(--light-100);
  border-bottom: var(--border-width-main) solid var(--mauve-400);
}

.mobile-hamburger-mock {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.mobile-hamburger-mock span {
  display: block;
  height: var(--border-width-main);
  background-color: var(--dark-900);
  border-radius: 1px;
}

/* Open menu list inside mobile demo */
.mobile-menu-mock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0;
  background-color: var(--light-100);
}

.mobile-menu-mock__link {
  font-family: var(--font-mono);
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  color: var(--rose-700);
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  width: 100%;
  text-align: right;
  border-top: var(--border-width-main) solid var(--mauve-400);
}

.mobile-page-mock {
  padding: var(--space-5) var(--space-4);
  min-height: 120px;
}

.mobile-page-mock__heading {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  color: var(--dark-900);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-2);
}

.mobile-page-mock__body {
  font-size: var(--font-size-text-small);
  font-weight: var(--font-weight-book);
  font-family: var(--font-mono);
  color: var(--dark-900);
  line-height: var(--line-height-relaxed);
}

/* --------------------------------------------------------------------------
   Responsive — main breakpoint: 991px (matches enso.no)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {

  /* ── Token overrides ── */
  :root {
    --site-margin: 20px;
    --nav-height: 60px;
    --font-size-display: 40px;
    --font-size-h1: 36px;
    --font-size-h2: 28px;
    --font-size-h3: 24px;
    --font-size-h4: 20px;
    --section-space-small: 48px;
    --section-space-main: 64px;
    --section-space-large: 80px;
  }

  /* ── Nav: fixed + hamburger ── */
  .site-nav {
    position: fixed;
  }

  body {
    padding-top: var(--nav-height);
  }

  .site-nav__links {
    display: none;
  }

  .site-nav__hamburger {
    display: flex;
  }

  /* ── Typography ── */
  .type-row__meta {
    width: 120px;
  }

  /* ── Grids → single column ── */
  .color-themes {
    grid-template-columns: 1fr;
  }

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

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

  .logo-showcase {
    grid-template-columns: 1fr;
  }

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

  .layout-two-col-mock {
    grid-template-columns: 1fr;
  }

  .layout-grid-mock {
    grid-template-columns: 1fr 1fr;
  }

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

  /* ── Nav demo ── */
  .nav-demo__bar {
    padding: 0 var(--space-3);
  }

  .nav-demo__links {
    display: none;
  }

  .nav-demo__states {
    grid-template-columns: 1fr;
  }

  /* ── Hero ── */
  .hero {
    min-height: 280px;
    padding: var(--section-space-large) var(--site-margin) var(--space-8);
  }

  .hero__title {
    font-size: var(--font-size-display);
  }

  /* ── Footer ── */
  .site-footer__inner {
    flex-direction: column;
    gap: var(--space-5);
    align-items: flex-start;
  }

  .site-footer__links {
    align-items: flex-start;
  }

  /* ── Mobile demo grid → single column ── */
  .mobile-demo-grid {
    grid-template-columns: 1fr;
  }

  /* ── Download ── */
  .download-card {
    padding: var(--space-6);
    border-radius: var(--radius-small);
  }

  .download-card__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
