/* ============================================
   BRAND BOOK — Components
   Nav, swatches, specimens, cards, logo cells,
   do/don't grids, download blocks
   ============================================ */

/* ========== NAVIGATION ========== */

/* ---- Burger Button ---- */
.nav-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: calc(var(--z-modal) + 1);
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle__line {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  position: relative;
  transition: background var(--duration-fast) var(--ease-default);
}

.nav-toggle__line::before,
.nav-toggle__line::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: inherit;
  transition: transform var(--duration-normal) var(--ease-spring),
              opacity var(--duration-fast) var(--ease-default);
}

.nav-toggle__line::before { transform: translateY(-6px); }
.nav-toggle__line::after  { transform: translateY(6px); }

/* Burger → X animation */
.nav-open .nav-toggle__line {
  background: transparent;
}
.nav-open .nav-toggle__line::before {
  transform: rotate(45deg);
  background: var(--text-primary);
}
.nav-open .nav-toggle__line::after {
  transform: rotate(-45deg);
  background: var(--text-primary);
}

/* ---- Navigation Overlay ---- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--surface-page);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) var(--ease-out),
              visibility var(--duration-slow) var(--ease-out);
}

.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

.nav-overlay__inner {
  text-align: left;
  width: 100%;
  max-width: 560px;
  padding: var(--page-gutter);
}

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

.nav-overlay__item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-spring);
}

.nav-open .nav-overlay__item {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for nav items */
.nav-open .nav-overlay__item:nth-child(1) { transition-delay: 80ms; }
.nav-open .nav-overlay__item:nth-child(2) { transition-delay: 120ms; }
.nav-open .nav-overlay__item:nth-child(3) { transition-delay: 160ms; }
.nav-open .nav-overlay__item:nth-child(4) { transition-delay: 200ms; }
.nav-open .nav-overlay__item:nth-child(5) { transition-delay: 240ms; }
.nav-open .nav-overlay__item:nth-child(6) { transition-delay: 280ms; }
.nav-open .nav-overlay__item:nth-child(7) { transition-delay: 320ms; }
.nav-open .nav-overlay__item:nth-child(8) { transition-delay: 360ms; }

.nav-overlay__link {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-default);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-overlay__link:hover {
  opacity: 0.5;
}

.nav-overlay__link.is-active {
  opacity: 1;
}

.nav-overlay__number {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  min-width: 2ch;
}

.nav-overlay__text {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

/* ---- Top Bar Nav (variant) ---- */
.nav-topbar {
  display: none;
}

body.nav-topbar-active .nav-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

body.nav-topbar-active .nav-toggle {
  display: none;
}

.nav-topbar__link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--duration-fast) var(--ease-default);
}

.nav-topbar__link:hover,
.nav-topbar__link.is-active {
  color: var(--text-primary);
}

.nav-topbar__link.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--text-primary);
}

@media (max-width: 1024px) {
  body.nav-topbar-active .nav-topbar {
    display: none;
  }
  body.nav-topbar-active .nav-toggle {
    display: flex;
  }
}


/* ---- Sidebar Navigation ---- */
.nav-sidebar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  z-index: var(--z-sticky, 20);
  background: var(--surface-primary, #fff);
  border-right: 1px solid var(--border-subtle, #e5e7eb);
  padding: var(--space-8) 0;
  overflow-y: auto;
}

body.nav-sidebar-active .nav-sidebar {
  display: flex;
  flex-direction: column;
}

.nav-sidebar__brand {
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-heading, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary, #1a1a1a);
  text-decoration: none;
  margin-bottom: var(--space-6);
}

.nav-sidebar__list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}

.nav-sidebar__link {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm, 0.875rem);
  color: var(--text-secondary, #6b7280);
  text-decoration: none;
  transition: color 200ms ease, background 200ms ease;
}

.nav-sidebar__link:hover {
  color: var(--text-primary, #1a1a1a);
  background: var(--surface-subtle, #f9fafb);
}

.nav-sidebar__link.is-active {
  color: var(--text-primary, #1a1a1a);
  font-weight: 500;
  border-right: 2px solid var(--brand-accent, #2563eb);
}

.nav-sidebar__number {
  font-size: var(--text-xs, 0.75rem);
  color: var(--text-tertiary, #9ca3af);
  min-width: 1.5em;
}

/* Sidebar active — shift page content */
body.nav-sidebar-active .page__header {
  left: 240px;
}

body.nav-sidebar-active .page__main,
body.nav-sidebar-active .page__footer {
  margin-left: 240px;
}

body.nav-sidebar-active .nav-toggle {
  display: none;
}

@media (max-width: 1024px) {
  body.nav-sidebar-active .nav-sidebar {
    display: none;
  }
  body.nav-sidebar-active .page__header {
    left: 0;
  }
  body.nav-sidebar-active .page__main,
  body.nav-sidebar-active .page__footer {
    margin-left: 0;
  }
  body.nav-sidebar-active .nav-toggle {
    display: flex;
  }
}


/* ---- Page Banner ---- */
.page-banner {
  width: 100%;
  max-height: 400px;
  border-radius: var(--ui-radius, 8px);
  overflow: hidden;
  margin-bottom: var(--section-gap, 4rem);
}

.page-banner img {
  width: 100%;
  height: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}


/* ========== HOME PAGE ========== */

/* ---- Contents Directory ---- */
.contents-list {
  display: flex;
  flex-direction: column;
}

.contents-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: opacity var(--duration-fast) var(--ease-default);
}

.contents-item:first-child {
  border-top: 1px solid var(--border-subtle);
}

.contents-item:hover {
  opacity: 0.5;
}

.contents-item__number {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  min-width: 3ch;
}

.contents-item__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.contents-item__arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--text-lg);
  transition: transform var(--duration-fast) var(--ease-spring);
}

.contents-item:hover .contents-item__arrow {
  transform: translateX(4px);
}


/* ========== LOGO COMPONENTS ========== */

/* ---- Logo Cell ---- */
.logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-8);
  border-radius: var(--ui-radius);
  min-height: 240px;
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.logo-cell:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.logo-cell--light {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}

.logo-cell--dark {
  background: var(--surface-dark);
}

.logo-cell--brand {
  background: var(--brand-primary);
}

.logo-cell--hero {
  min-height: 320px;
  padding: var(--space-16) var(--space-12);
}

.logo-cell img {
  max-width: 280px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-cell--hero img {
  max-width: 360px;
  max-height: 140px;
}

.logo-cell__label {
  position: absolute;
  bottom: var(--space-4);
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

.logo-cell--dark .logo-cell__label {
  color: rgba(255, 255, 255, 0.5);
}

.logo-cell__download {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-default);
  color: var(--text-secondary);
}

.logo-cell:hover .logo-cell__download {
  opacity: 1;
}

.logo-cell--dark .logo-cell__download {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-inverse);
}

/* ---- Do / Don't Grid ---- */
.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.rule-card {
  border-radius: var(--ui-radius);
  overflow: hidden;
}

.rule-card__visual {
  aspect-ratio: 4 / 3;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--ui-radius) var(--ui-radius) 0 0;
  position: relative;
}

.rule-card__visual img {
  max-width: 140px;
  max-height: 80px;
  object-fit: contain;
}

.rule-card__body {
  padding: var(--space-4);
}

.rule-card__badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.rule-card__badge--do {
  color: var(--color-success);
}

.rule-card__badge--dont {
  color: var(--color-error);
}

.rule-card__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* ---- Rule Card: Overlay Icon Badge ---- */
.rule-card__icon {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
  z-index: 2;
  flex-shrink: 0;
}

/* ---- Rule Visual Manipulations ---- */

/* DO: Clean — correct usage, logo on neutral bg */
.rule-visual--clean {
  background: var(--surface-subtle);
}

/* DO: Clear Space — dashed border showing safe zone */
.rule-visual--clearspace {
  background: var(--surface-subtle);
}
.rule-visual--clearspace img {
  outline: 2px dashed var(--color-success);
  outline-offset: 16px;
}
.rule-visual--clearspace::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px dashed var(--color-success);
  border-radius: 4px;
  opacity: 0.5;
  pointer-events: none;
}

/* DO: Approved Colors — dark bg showing correct contrast */
.rule-visual--approved-colors {
  background: var(--color-primary, #1A1A1A);
}

/* DON'T: Distorted — rotated and skewed */
.rule-visual--distorted {
  background: var(--surface-subtle);
}
.rule-visual--distorted img {
  transform: rotate(15deg) scaleX(1.3);
}

/* DON'T: Busy Background — noisy pattern behind logo */
.rule-visual--busy-bg {
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      rgba(0, 0, 0, 0.06) 8px,
      rgba(0, 0, 0, 0.06) 16px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 8px,
      rgba(0, 0, 0, 0.06) 8px,
      rgba(0, 0, 0, 0.06) 16px
    ),
    linear-gradient(
      135deg,
      #e2e8f0 0%, #94a3b8 25%, #e2e8f0 50%, #94a3b8 75%, #e2e8f0 100%
    );
}

/* DON'T: Wrong Colors — hue-shifted to incorrect palette */
.rule-visual--wrong-colors {
  background: var(--surface-subtle);
}
.rule-visual--wrong-colors img {
  filter: hue-rotate(180deg) saturate(1.8);
}

@media (max-width: 1024px) {
  .rule-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .rule-grid {
    grid-template-columns: 1fr;
  }
}


/* ========== COLOR COMPONENTS ========== */

/* ---- Color Swatch ---- */
.color-swatch {
  border-radius: var(--ui-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  position: relative;
}

.color-swatch:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.color-swatch__fill {
  height: 160px;
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
}

.color-swatch--large .color-swatch__fill {
  height: 220px;
}

.color-swatch__info {
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius);
}

.color-swatch__name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

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

.color-swatch__value {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: flex;
  gap: var(--space-2);
}

.color-swatch__value span:first-child {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  min-width: 4ch;
  color: var(--text-secondary);
}

/* Copy feedback */
.color-swatch__copied {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-spring);
}

.color-swatch__copied.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---- Color Combo Grid ---- */
.color-combos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

.color-combo {
  border-radius: var(--ui-radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.color-combo__preview {
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.color-combo__text {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
}

.color-combo__labels {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
}

/* ---- Color Fades ---- */
.color-fades {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.color-fade-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.color-fade-row__label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.color-fade-row__steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-radius: var(--ui-radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.color-fade-step {
  position: relative;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out);
}

.color-fade-step:hover {
  z-index: 1;
  transform: scaleY(1.08);
}

.color-fade-step__fill {
  height: 80px;
}

.color-fade-step__info {
  padding: var(--space-2) var(--space-3);
  background: var(--surface-card);
  border-top: 1px solid var(--border-subtle);
}

.color-fade-step__percent {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  display: block;
}

.color-fade-step__hex {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: block;
}

.color-fade-step__copied {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-spring);
  white-space: nowrap;
}

.color-fade-step__copied.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 600px) {
  .color-fade-row__steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .color-fade-step__fill {
    height: 60px;
  }
}

/* ---- Gradient Strips ---- */
.color-gradients {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.gradient-strip {
  border-radius: var(--ui-radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  position: relative;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.gradient-strip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.gradient-strip__preview {
  height: 100px;
}

.gradient-strip__info {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.gradient-strip__name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.gradient-strip__css {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.gradient-strip__copied {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-spring);
}

.gradient-strip__copied.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 600px) {
  .gradient-strip__preview {
    height: 70px;
  }
  .gradient-strip__info {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
  .gradient-strip__css {
    max-width: 100%;
  }
}


/* ========== TYPOGRAPHY COMPONENTS ========== */

/* ---- Type Specimen ---- */
.type-specimen {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-10);
  margin-bottom: var(--space-10);
}

.type-specimen:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.type-specimen__header {
  margin-bottom: var(--space-6);
}

.type-specimen__name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.type-specimen__meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.type-specimen__sample {
  margin-bottom: var(--space-6);
  word-break: break-word;
  overflow-wrap: break-word;
}

.type-specimen__alphabet {
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
  margin-bottom: var(--space-4);
}

.type-specimen__weights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.type-specimen__weight {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.type-specimen__weight-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.type-specimen__weight-sample {
  font-size: var(--text-3xl);
}

.type-specimen__source {
  margin-top: var(--space-4, 1rem);
}

/* ---- Type Scale ---- */
.type-scale {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.type-scale__row {
  display: flex;
  align-items: baseline;
  gap: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.type-scale__label {
  min-width: 100px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  flex-shrink: 0;
}

.type-scale__sample {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-scale__size {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}


/* ========== CARD COMPONENTS ========== */

/* ---- Content Card ---- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--ui-radius);
  padding: var(--space-8);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card--flat:hover {
  transform: none;
  box-shadow: none;
}

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-5);
  color: var(--brand-accent);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.card__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* ---- Pull Quote ---- */
.pull-quote {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  color: var(--text-primary);
  padding-left: var(--space-8);
  border-left: 3px solid var(--brand-accent);
  margin: var(--space-10) 0;
  max-width: 50ch;
}


/* ========== IMAGE / MEDIA COMPONENTS ========== */

/* ---- Image Cell ---- */
.image-cell {
  border-radius: var(--ui-radius);
  overflow: hidden;
  position: relative;
}

.image-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-cell--aspect-16-9 { aspect-ratio: 16 / 9; }
.image-cell--aspect-4-3  { aspect-ratio: 4 / 3; }
.image-cell--aspect-1-1  { aspect-ratio: 1 / 1; }
.image-cell--aspect-3-4  { aspect-ratio: 3 / 4; }
.image-cell--aspect-9-16 { aspect-ratio: 9 / 16; }
.image-cell--aspect-3-1  { aspect-ratio: 3 / 1; }
.image-cell--aspect-auto { aspect-ratio: auto; }

/* ---- Image Cell Caption ---- */
.image-cell__caption {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
  text-align: center;
}

/* ---- Download Card ---- */
.download-card {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--ui-radius);
  transition: border-color var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
}

.download-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.download-card__preview {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.download-card__preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.download-card__info {
  flex: 1;
  min-width: 0;
}

.download-card__name {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.download-card__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.download-card__btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-default);
  color: var(--text-secondary);
}

.download-card__btn:hover {
  background: var(--border-default);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  color: var(--text-muted);
}

.badge--accent {
  background: var(--brand-accent);
  color: var(--text-inverse);
}


/* ========== PLACEHOLDER ========== */

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--surface-subtle);
  border: 2px dashed var(--border-default);
  border-radius: var(--ui-radius);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-align: center;
  padding: var(--space-6);
}


/* ========== VOICE & TONE ========== */

.tone-spectrum {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

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

.tone-row__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  min-width: 100px;
  text-align: right;
}

.tone-row__bar {
  flex: 1;
  height: 6px;
  background: var(--surface-muted);
  border-radius: var(--radius-full);
  position: relative;
}

.tone-row__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--brand-accent);
  transition: width var(--duration-slower) var(--ease-out);
}

.tone-row__label-end {
  font-size: var(--text-sm);
  color: var(--text-muted);
  min-width: 100px;
}


/* ============================================
   LIGHTBOX — Fullscreen Image Gallery
   ============================================ */

/* -- Zoom cursor on clickable gallery images -- */
#moodboard img,
#graphics-grid img,
#brand-mockups img {
  cursor: zoom-in;
}

/* -- Overlay -- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-default),
              visibility var(--duration-normal) var(--ease-default);
}

.lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

/* -- Backdrop -- */
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: default;
}

/* -- Image -- */
.lightbox__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90vw;
  height: 85vh;
  pointer-events: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: auto;
  border-radius: var(--radius-sm);
  user-select: none;
  -webkit-user-select: none;
}

/* -- Shared button base -- */
.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--duration-fast) var(--ease-default),
              border-color var(--duration-fast) var(--ease-default);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* -- Close button -- */
.lightbox__close {
  top: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  line-height: 1;
}

/* -- Nav arrows -- */
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox__nav--prev { left: var(--space-6); }
.lightbox__nav--next { right: var(--space-6); }

.lightbox__nav[hidden] { display: none; }

/* -- Toolbar (bottom bar) -- */
.lightbox__toolbar {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  z-index: 2;
}

.lightbox__counter {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
  min-width: 3em;
  text-align: center;
}

.lightbox__download {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--duration-fast) var(--ease-default),
              border-color var(--duration-fast) var(--ease-default);
}

.lightbox__download:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.lightbox__download:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.lightbox__download svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* -- Responsive: mobile -- */
@media (max-width: 767px) {
  .lightbox__content {
    width: 95vw;
    height: 80vh;
  }

  .lightbox__close {
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
  }

  .lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .lightbox__nav--prev { left: var(--space-3); }
  .lightbox__nav--next { right: var(--space-3); }

  .lightbox__toolbar {
    bottom: var(--space-4);
    gap: var(--space-3);
  }
}

/* -- Reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  .lightbox {
    transition: none;
  }
}

/* -- PDF export: hide lightbox entirely -- */
.pdf-export-mode .lightbox {
  display: none !important;
}

/* -- PDF export: remove zoom cursor -- */
.pdf-export-mode #moodboard img,
.pdf-export-mode #graphics-grid img,
.pdf-export-mode #brand-mockups img {
  cursor: default;
}
