/*
 * SnagATime brand page styles
 * Page-specific layout for /brand. Reads tokens from styles.css :root.
 */

.brand-page {
  padding-bottom: var(--sp-24);
}

/* Hero */
.brand-hero {
  background: linear-gradient(180deg, var(--teal-tint) 0%, var(--paper) 100%);
  padding: var(--sp-16) 0 var(--sp-12);
  border-bottom: 1px solid var(--rule);
}

.brand-hero-copy {
  max-width: 760px;
}

.brand-eyebrow {
  font-family: var(--display);
  font-size: var(--size-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: var(--sp-4);
}

.brand-hero h1 {
  font-family: var(--display);
  font-size: var(--size-h1);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: var(--sp-5);
}

.brand-lede {
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: var(--sp-8);
}

.brand-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.brand-toc a {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-full);
  font-family: var(--body);
  font-size: var(--size-label);
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--paper);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  min-height: var(--touch-target-min);
}

.brand-toc a:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

/* Sections */
.brand-section {
  padding: var(--sp-16) 0;
}

.brand-section-alt {
  background: var(--surface-raised);
}

.brand-section-head {
  margin-bottom: var(--sp-10);
  max-width: 720px;
}

.brand-section-head h2 {
  font-family: var(--display);
  font-size: var(--size-h2);
  font-weight: 700;
  color: var(--ink);
  margin: var(--sp-2) 0 var(--sp-4);
}

.brand-section-head p {
  font-family: var(--body);
  font-size: var(--size-body);
  color: var(--ink-muted);
  line-height: 1.6;
}

.brand-section-note {
  font-family: var(--body);
  font-size: var(--size-label);
  color: var(--ink-muted);
  line-height: 1.6;
  margin: var(--sp-2) 0 var(--sp-6);
  max-width: 640px;
}

.brand-section-note code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 1px 6px;
}

.brand-subhead {
  font-family: var(--display);
  font-size: var(--size-h3);
  font-weight: 600;
  color: var(--ink);
  margin: var(--sp-10) 0 var(--sp-5);
}

.brand-subhead:first-of-type {
  margin-top: var(--sp-2);
}

/* §1 Color swatches */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.swatch {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  text-align: left;
  font: inherit;
  width: 100%;
  padding: 0;
}

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

.swatch-chip {
  height: 88px;
  width: 100%;
  display: block;
  position: relative;
}

.swatch-chip--bordered {
  box-shadow: inset 0 0 0 1px var(--rule);
}

.swatch-meta {
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: var(--touch-target-min);
}

.swatch-name {
  font-family: var(--display);
  font-size: var(--size-label);
  font-weight: 600;
  color: var(--ink);
}

.swatch-token {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-soft);
}

.swatch-hex {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-muted);
  margin-top: 2px;
}

.swatch-copied {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ink) 85%, transparent);
  color: var(--paper);
  font-family: var(--display);
  font-size: var(--size-label);
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

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

/* §2 Typography */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.type-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.type-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.type-card-label {
  font-family: var(--display);
  font-size: var(--size-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.type-card-name {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.type-card-weights {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-soft);
}

.type-card-sample {
  font-size: 2.75rem;
  line-height: 1;
  color: var(--ink);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.type-card-use {
  font-family: var(--body);
  font-size: var(--size-label);
  line-height: 1.55;
  color: var(--ink-muted);
}

.type-scale {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-6);
}

.type-scale-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  gap: var(--sp-6);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--rule);
}

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

.type-scale-label {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-soft);
}

.type-scale-sample {
  color: var(--ink);
  line-height: 1.2;
}

/* §3 Logos */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}

.logo-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.logo-card-preview {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
}

.logo-card-preview--light {
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
}

.logo-card-preview--dark {
  background: var(--navy);
  border-bottom: 1px solid var(--navy);
}

.logo-card-preview img {
  max-width: 100%;
  height: auto;
}

.logo-card-meta {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}

.logo-card-meta h4 {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.logo-card-meta p {
  font-family: var(--body);
  font-size: var(--size-label);
  line-height: 1.55;
  color: var(--ink-muted);
  flex: 1;
}

.logo-card-downloads {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0;
  margin: 0;
}

.logo-card-downloads a,
.icon-card-downloads a {
  display: inline-flex;
  align-items: center;
  padding: 6px var(--sp-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-muted);
  background: var(--paper);
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
}

.logo-card-downloads a:hover,
.icon-card-downloads a:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

/* §4 Icons */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}

.icon-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.icon-card-preview {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  border-bottom: 1px solid var(--rule);
}

.icon-card-meta {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}

.icon-card-meta h4 {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.icon-card-default {
  font-family: var(--display);
  font-size: var(--size-eyebrow);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-tint);
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.icon-card-meta p {
  font-family: var(--body);
  font-size: var(--size-label);
  line-height: 1.55;
  color: var(--ink-muted);
  flex: 1;
}

.icon-card-downloads {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0;
  margin: 0;
}

/* §5 Tokens */
.space-scale {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-6);
}

.space-row {
  display: grid;
  grid-template-columns: 100px 1fr 80px;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--rule);
}

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

.space-label {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-soft);
}

.space-bar {
  display: block;
  height: 16px;
  background: var(--teal);
  border-radius: var(--r-sm);
}

.space-val {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-muted);
  text-align: right;
}

.radii-row,
.shadow-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
}

.radius-sample,
.shadow-sample {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 140px;
}

.radius-sample--pill {
  padding: var(--sp-4) var(--sp-8);
}

.shadow-sample {
  background: var(--paper);
}

.radius-label,
.shadow-label {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink);
  font-weight: 500;
}

.radius-val,
.shadow-val {
  font-family: var(--body);
  font-size: var(--size-caption);
  color: var(--ink-soft);
}

.layout-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-4);
}

.layout-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
}

.layout-card-label {
  font-family: var(--mono);
  font-size: var(--size-caption);
  color: var(--ink-soft);
  margin-bottom: var(--sp-2);
}

.layout-card-val {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-3);
}

.layout-card p {
  font-family: var(--body);
  font-size: var(--size-label);
  line-height: 1.55;
  color: var(--ink-muted);
}

/* §6 In-progress placeholders */
.tbd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}

.tbd-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  position: relative;
}

.tbd-card::before {
  content: 'In progress';
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  font-family: var(--display);
  font-size: var(--size-eyebrow);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warning);
  background: #FEF3C7;
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.tbd-card h4 {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-3);
  padding-right: 80px;
}

.tbd-card p {
  font-family: var(--body);
  font-size: var(--size-label);
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Responsive tightening */
@media (max-width: 720px) {
  .type-scale-row {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
  .space-row {
    grid-template-columns: 80px 1fr 60px;
  }
  .brand-hero {
    padding: var(--sp-10) 0 var(--sp-8);
  }
  .brand-section {
    padding: var(--sp-10) 0;
  }
}
