:root {
  --pink: #dd248d;
  --pink-dark: #b81c74;
  --pink-deep: #9e1763;
  --plum: #863e73;
  --black: #171717;
  --white: #fff;
  --bg: #f7f7fa;
  --border: #e4e6ed;
  --text: #2c3e50;
  --text-muted: #5f6c6d;
  --card: #fff;
  --border-subtle: #f0f1f5;
  --text-body: #555;
  --text-soft: #666;
  --success: #2e7d32;
  --success-bg: #e8f5e9;
  --danger: #c62828;
  --danger-bg: #ffebee;
  --fmt-svg: #2e7d32;
  --fmt-svg-bg: #edf7ed;
  --fmt-svg-hover: #c8e6c9;
  --fmt-png: #1565c0;
  --fmt-png-bg: #e3f2fd;
  --fmt-png-hover: #bbdefb;
  --fmt-pdf: #b71c1c;
  --fmt-pdf-bg: #ffebee;
  --fmt-pdf-hover: #ffcdd2;
  --fmt-ai: #b34000;
  --fmt-ai-bg: #fff3e0;
  --fmt-ai-hover: #ffe0b2;
  --pink-tint: #fce4f1;
  --black-soft: #272727;
  --hero-mid: #24212c;
  --hero-end: #2e2233;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', sans-serif;
}

/* Header */
.hero {
  background: linear-gradient(135deg, var(--black) 0%, var(--hero-mid) 60%, var(--hero-end) 100%);
  padding: 40px 48px 36px;
  color: white;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(221, 36, 141, 0.18) 0%, transparent 65%);
  border-radius: 50%;
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero-logos {
  display: flex;
  align-items: center;
}

.hero-text {
  margin-left: 8px;
}

.hero-text h1 {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-text p {
  font-size: 15px;
  opacity: 0.7;
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* Nav */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--white, var(--white));
  color: var(--pink-dark);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}

.skip-link:focus {
  left: 8px;
}

[id^='dl-'] {
  scroll-margin-top: 64px;
}

.nav-bar {
  background: white;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.nav {
  display: flex;
  gap: 0;
  padding: 0 48px;
  overflow-x: auto;
}

.nav a {
  padding: 14px 24px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.nav a:hover {
  color: var(--text);
}

.nav a.active {
  color: var(--pink-dark);
  border-bottom-color: var(--pink);
}

.nav a:focus-visible,
a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* Sections */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px 0;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.section-title {
  font-family: inherit;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 40px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.section-title-with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.section-title-zip,
.section-title-view-downloads {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
  color: var(--white);
  background: var(--pink-dark);
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.15s;
  white-space: nowrap;
}

.section-title-zip:hover,
.section-title-view-downloads:hover {
  background: var(--pink-deep);
}

.lead {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 720px;
  line-height: 1.7;
}

.lead strong {
  color: var(--text);
}

/* Color Palette */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 16px;
}

.palette-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.palette-swatch {
  height: 120px;
  display: flex;
  align-items: flex-end;
  padding: 12px 16px;
}

.palette-swatch .hex {
  font-size: 14px;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--white);
}

.palette-info {
  padding: 16px;
}

.palette-info h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.palette-info table {
  width: 100%;
  font-size: 12px;
}

.palette-info td {
  padding: 3px 0;
  vertical-align: top;
}

.palette-info td:first-child {
  color: var(--text-muted);
  font-weight: 600;
  width: 70px;
}

/* Typography */
.type-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 20px;
}

.aa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.aa-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.aa-card .aa-glyph {
  font-family: 'Poppins', sans-serif;
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
  color: var(--black);
  margin-bottom: 12px;
}

.aa-card .aa-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.aa-card .aa-role {
  font-size: 12px;
  color: var(--text-muted);
}

.type-sample-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  margin-bottom: 12px;
}

.type-sample-body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 640px;
}

.type-combo {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 20px;
}

.type-spec {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

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

.version-card {
  margin-bottom: 0;
  padding: 24px 28px;
}

.version-strip {
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}

.version-strip span {
  flex: 1;
}

.version-card h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.version-card p {
  font-size: 13px;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--pink-dark);
  background: var(--pink-tint);
  padding: 1px 7px;
  border-radius: 4px;
  vertical-align: 1px;
  font-family: 'Inter', sans-serif;
}

/* Rules */
.rule-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.rule-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.rule-do .rule-icon {
  background: var(--success-bg);
  color: var(--success);
}

.rule-dont .rule-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.rule-card h3 {
  font-size: 14px;
  margin-bottom: 2px;
}

.rule-card p {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

/* Downloads */
.dl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}

.dl-row:last-child {
  border-bottom: none;
}

.dl-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.dl-preview {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
}

.dl-preview svg,
.dl-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dl-preview-white {
  background: var(--black);
  border: 1px solid var(--black);
}

.dl-preview-color {
  background: var(--white);
  border: 1px solid var(--border);
}

.dl-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dl-name {
  font-size: 13px;
  font-weight: 600;
}

.dl-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.dl-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}

.dl-btn-svg {
  background: var(--fmt-svg-bg);
  color: var(--fmt-svg);
}

.dl-btn-svg:hover {
  background: var(--fmt-svg-hover);
}

.dl-btn-primary {
  background: var(--pink-dark);
  color: var(--white);
}

.dl-btn-primary:hover {
  background: var(--pink-deep);
}

.dl-btn-png {
  background: var(--fmt-png-bg);
  color: var(--fmt-png);
}

.dl-btn-png:hover {
  background: var(--fmt-png-hover);
}

.dl-btn-pdf {
  background: var(--fmt-pdf-bg);
  color: var(--fmt-pdf);
}

.dl-btn-pdf:hover {
  background: var(--fmt-pdf-hover);
}

.dl-btn-ai {
  background: var(--fmt-ai-bg);
  color: var(--fmt-ai);
}

.dl-btn-ai:hover {
  background: var(--fmt-ai-hover);
}

.dl-preview-wide {
  width: 96px;
  padding: 10px 12px;
}

.dl-preview-doc {
  padding: 12px;
}

.dl-group {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 18px 0 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.dl-group:first-child {
  padding-top: 0;
}

.dl-buttons .dl-btn {
  min-width: 56px;
  justify-content: center;
}

.dl-section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

/* Logo system (overview) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 20px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-card .mark {
  height: 96px;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.product-card .mark img {
  max-height: 100%;
  max-width: 100%;
  margin-left: -12px;
}

.product-card .tagline {
  font-size: 13px;
  font-weight: 600;
  color: var(--black-soft);
  margin-bottom: 12px;
}

.product-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.product-card p.example {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
}

.product-card p.example strong {
  color: var(--text);
}

.product-card-link {
  cursor: pointer;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease;
}

.product-card-link:hover,
.product-card-link:focus-visible {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: var(--pink);
  outline: none;
}

/* Footer */
.footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.5);
  padding: 40px 48px;
  margin-top: 60px;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  line-height: 1.8;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-left {
  max-width: 500px;
}

.footer a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
}

.footer a:hover {
  color: var(--white);
}

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

@media (max-width: 768px) {
  .hero {
    padding: 32px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-text {
    margin-left: 0;
  }

  .nav {
    padding: 0 20px;
  }

  .page {
    padding: 0 20px 0;
  }

  .palette-grid,
  .product-grid,
  .aa-grid,
  .version-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer .footer-right {
    text-align: left;
  }

  .dl-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-title-with-action {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Components & utilities (formerly inline styles) */
.icon-inline {
  margin-left: 6px;
  vertical-align: -1px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.footer-right {
  text-align: right;
}

.footer-updated {
  margin-top: 12px;
  font-size: 12px;
}

.lead--narrow {
  max-width: 560px;
}

.aa-card .aa-glyph--poppins {
  font-family: 'Poppins', sans-serif;
}

.aa-card .aa-glyph--inter {
  font-family: 'Inter', sans-serif;
}

.aa-card .aa-glyph--montserrat {
  font-family: 'Montserrat', sans-serif;
}

.type-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: stretch;
}

.type-row--spaced {
  margin-bottom: 20px;
}

.aa-card--side {
  max-width: 340px;
  flex: 1;
  min-width: 220px;
}

.aa-card--logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.type-card--grow {
  flex: 2;
  min-width: 280px;
  margin-bottom: 0;
  padding: 28px;
}

.type-card--montserrat {
  font-family: 'Montserrat', sans-serif;
}

.type-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.type-card-desc {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 16px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pink-dark);
  margin-bottom: 10px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--pink-dark);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

.aa-card-logo {
  width: auto;
  display: block;
  height: 58px;
  margin: 7px auto 19px;
}

.hero-logo {
  display: block;
  height: 40px;
  width: auto;
}

.product-card .mark .mark-logo {
  width: auto;
}

.product-card .mark .mark-logo--bycat {
  height: 50.86px;
  margin: 29.57px 18.82px 29.57px -6.14px;
}

.product-card .mark .mark-logo--standalone {
  height: 50.63px;
  margin: 29.57px 18.82px 29.8px -6.14px;
}

.sw-plum {
  background: var(--plum);
}

.sw-pink {
  background: var(--pink);
}

.sw-black {
  background: var(--black);
}

.sw-gradient {
  background: linear-gradient(44deg, var(--plum) 0%, var(--pink) 100%);
}

.version-strip .strip-gradient {
  background: linear-gradient(44deg, var(--plum), var(--pink));
  flex: 2;
}

.version-strip .strip-pink {
  background: var(--pink);
  flex: 2;
}

.version-strip .strip-white {
  background: var(--white);
  border: 1px solid var(--border);
}

.rule-card--flush {
  border: none;
  padding: 0;
  margin-bottom: 14px;
}

.rule-card--flush-last {
  border: none;
  padding: 0;
  margin-bottom: 0;
}

/* Headings keep the look of the elements they replaced (h2 inside .section-title) */

.section-title h2 {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}

/* Swatch labels on the light end of the brand pink need a backing for AA contrast */
.sw-pink .hex,
.sw-gradient .hex {
  background: rgb(23 23 23 / 72%);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Return to the brandbook collection. */
.brand-index-link {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-left: 24px;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
  text-underline-offset: 4px;
}
.brand-index-link:hover { text-decoration: underline; }
.brand-index-link:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
@media (max-width: 900px) {
  .hero { flex-wrap: wrap; gap: 20px; }
  .brand-index-link { margin-left: 0; }
}
