/* 0. Local fonts */
@font-face {
  font-family: 'Monsal Gothic';
  src: url('../fonts/Monsal Gothic Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Monsal Gothic';
  src: url('../fonts/Monsal Gothic Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Monsal Gothic';
  src: url('../fonts/Monsal Gothic Medium Italic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: 'Monsal Gothic';
  src: url('../fonts/Monsal Gothic Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}


/* 1. Custom properties */
:root {
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: 150ms ease;
  --color-bg: #FFFEF5;
  --color-text: #121926;
  --color-gray: #4B5565;
  --color-border: #CDD5DF;
  --nav-width: 220px;
  --font-family: 'Monsal Gothic', Tahoma, sans-serif;
}

/* 2. Reset + base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  font-family: var(--font-family);
  color: var(--color-text);
  display: flex;
  min-height: 100vh;
}

.button {
  display: inline-block;
  padding: var(--space-md) 64px var(--space-md) 28px;
  border-radius: var(--radius-md);
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
  transition: all 200ms ease-out;
  position: relative;
  cursor: pointer;
}

.button::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: url('../images/arrow-right.svg') center center no-repeat;
  background-size: contain;
}

.button.button-yellow {
  color: var(--color-text);
  background: #FAC515;
  border: 2px solid #FAC515;
}

.button.button-yellow:hover {
  border: 2px solid var(--color-text);
}

.button.button-dark {
  color: #FAC515;
  background: var(--color-text);
  border: 2px solid var(--color-text);
}

.button.button-dark:hover {
  border: 2px solid #FAC515;
}

.button.button-dark::after {
  background: url('../images/arrow-right-yellow.svg') center center no-repeat;
}

.button.button-white {
  color: var(--color-text);
  background: #ffffff;
  border: 2px solid var(--color-text);
}

.button.button-white:hover {
  background: #FAC515;
}

/* 3. Nav */
#nav {
  width: var(--nav-width);
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid var(--color-border);
  padding: var(--space-xl) 0;
  position: fixed;
  top: 0;
  left: 0;
}

#nav img {
  display: block;
  max-height: 28px;
  width: 100%;
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-xl);
}

#nav nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav nav ul li a {
  display: block;
  padding: 12px var(--space-lg);
  text-decoration: none;
  color: var( --color-gray);
  font-size: 16px;
  line-height: 24px;
  transition: background var(--transition);
}

#nav nav ul li a:hover {
  background: #F8FAFC;
}

#nav nav ul li a.active {
  background: #FEFBE8;
}

#main {
  margin-left: var(--nav-width);
  padding: var(--space-2xl);
  flex: 1;
  word-break: break-all
}

/* 4. Swatch grid — colours page */
.color-group {
  margin-bottom: var(--space-xl);
}

.group-label {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  margin: 0 0 var(--space-md);
  text-transform: capitalize;
}

.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.swatch-card {
  width: 136px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition);
}

.swatch-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.swatch-color {
  height: 90px;
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.swatch-name {
  padding: 0 var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}

.swatch-values {
  padding: 0 var(--space-sm) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mono {
  font-size: 14px;
  line-height: 20px;
}

.gradient-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.gradient-strip {
  height: 165px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  width: 250px;
  max-width: 100%;
  cursor: pointer;
}

.gradient-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.gradient-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gradient-chip-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.gradient-sep {
  color: var(--color-gray);
  font-size: 14px;
}

.gradient-item {
  margin-bottom: var(--space-lg);
}


.gradient-stop {
  color: var(--color-gray);
}

/* 5. Typography page */
.typography-meta {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.meta-label,
.meta-value {
  font-size: 16px;
  line-height: 24px;
}

a.meta-value {
  color: var(--color-text);
  text-decoration: underline;
}

a.meta-value:hover {
  text-decoration: none;
}

.meta-label {
  min-width: 140px;
  padding-top: 2px;
}

.typekit-snippet {
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-family: 'Courier New', monospace;
  font-size: 16px;
  line-height: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.copy-btn {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
  font-family: 'Courier New', monospace;
  transition: background var(--transition);
}

.copy-btn:hover {
  background: #EEF2F6;
}

.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  vertical-align: middle;
  margin-right: 4px;
}

.type-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.type-column-label {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.type-specimen {
  margin-bottom: var(--space-xl);
}

.specimen-text {
  margin: 0 0 12px;
}

.type-meta {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-gray);
}

.type-usage {
  margin: 0 0 12px;
}

.font-prompt {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2xl);
  background: #fff;
  overflow: hidden;
}

.font-prompt-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xl);
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 16px;
  line-height: 24px;
}

.font-prompt-summary::-webkit-details-marker { display: none; }

.font-prompt-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.font-prompt-chevron {
  transition: transform var(--transition);
  color: var(--color-text);
}

.font-prompt[open] .font-prompt-chevron {
  transform: rotate(180deg);
}

.font-prompt-body {
  padding: var(--space-xl);
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  line-height: 20px;
}

.font-prompt-heading {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  margin: 0 0 var(--space-md);
}

.font-prompt-text {
  margin: 0 0 var(--space-sm);
}

.font-prompt-pre {
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 20px;
  margin: 0 0 var(--space-md);
  overflow-x: auto;
  white-space: pre;
}

.font-prompt-body code {
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1px 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 20px;
}

.font-prompt-pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.font-prompt-list {
  margin: 0;
  padding-left: var(--space-lg);
}

.font-prompt-list li {
  margin-bottom: var(--space-xs);
}

/* 6. Logos page */
.logo-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.logo-section {
  margin-bottom: 0;
}

.logo-section-label {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  margin: 0 0 var(--space-md);
  text-transform: capitalize;
}

.logo-row {
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
  align-items: end;
}

.logo-row.logo-email {
  gap: 12px;
  flex-direction: column;
  align-items: start;
}

.logo-email p {
  font-size: 16px;
  line-height: 24px;
  color: #ffffff;
  margin: 0;
}

.logo-light {
  background: #FFFEF5;
  border: 1px solid var(--color-border);
}

.logo-dark {
  background: #121926;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}


.logo-item > a:first-child {
  display: block;
  line-height: 0;
  cursor: pointer;
}


/* 7. Components page */
.card-schema-group {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.card-schema-group-label {
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  margin: 0 0 var(--space-md);
}

.card-schema-group-label.linkedin {
  font-style: italic;
}

.card-schema-group-sublabel {
  font-size: 16px;
  line-height: 24px;
  color: var(--color-gray);
  margin-bottom: var(--space-xl);
}

.card-schema-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.card-schema {
  width: calc(50% - 8px);
  border-radius: 10px;
  border-width: 1px;
  border-style: solid;
  padding: var(--space-md) 0;
  display: flex;
  flex-direction: column;
}

.card-schema-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md) var(--space-sm);
}

.card-schema-body {
  padding: 0 var(--space-md);
}

.card-schema-xl {
  font-size: 20px;
  line-height: 30px;
}

.card-schema-sm {
  font-size: 14px;
  line-height: 20px;
}

.card-schema-bold {
  font-weight: 700;
  padding: 12px 0;
  margin-bottom: 12px;
}

.card-schema-link {
  text-decoration: underline;
}

.card-schema-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 40px;
  font-size: 12px;
  line-height: 18px;
  margin: var(--space-sm) 0 12px;
}

.card-schema-footer {
  font-size: 14px;
  line-height: 28px;
  padding: 12px var(--space-md) 0 var(--space-md);
}

.button-demo {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.button-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}


/* 8. Downloads page */
.download-buttons {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

/* 9. Toast */
#toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #121926;
  color: #FAC515;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}

#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Desktop: hide mobile-only elements */
#topbar,
#nav-scrim,
#nav-close {
  display: none;
}

/* 10. Mobile nav — < 1024px */
@media (max-width: 1023px) {

  /* Drawer: override sidebar defaults */
  #nav {
    width: 320px;
    height: 100%;
    transform: translateX(-100%);
    transition: transform 250ms ease;
    z-index: 300;
    overflow-y: auto;
    padding-top: 20px;
  }

  #nav.nav-open {
    transform: translateX(0);
  }

  /* Close button inside drawer */
  #nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: var( --space-md);
    right: 20px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  #nav-close span {
    display: block;
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
  }

  #nav-close span:first-child { transform: rotate(45deg); }
  #nav-close span:last-child  { transform: rotate(-45deg); }

  /* Top bar */
  #topbar {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 0 var(--space-lg);
    z-index: 100;
  }

  #topbar img {
    height: 28px;
    width: auto;
    display: block;
  }

  /* Hamburger button */
  #nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }

  #nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
  }

  /* Scrim */
  #nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
  }

  #nav-scrim.nav-open {
    opacity: 1;
    pointer-events: auto;
  }

  #nav img {
    width: auto;
  }

  /* Scroll lock */
  body.nav-open {
    overflow: hidden;
  }

  /* Main content: clear topbar, remove sidebar margin */
  #main {
    margin-left: 0;
    padding: var(--space-lg);
    padding-top: calc(56px + var(--space-lg));
  }

  /* Single-column layout for type and logo grids */
  .type-columns,
  .logo-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .card-schema {
    width: 100%;
  }

  .logo-row.logo-email img {
    width: 100%;
  }
}
