/* ============================================================
   ABOUT PAGE — Editorial Redesign
   ============================================================ */

/* --- Page Shell --- */
.about-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}


.about-main {
  flex: 1;
  padding-top: 60px; /* fixed header clearance */
}

/* --- Sections --- */
.about-section {
  width: 100%;
  padding: 5rem 2rem;
}

.about-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Alternating backgrounds */
body.light-mode .about-section:nth-child(odd)  { background-color: #f5f5f7; }
body.light-mode .about-section:nth-child(even) { background-color: #ffffff; }
body.dark-mode .about-section:nth-child(odd)   { background-color: #121212; }
body.dark-mode .about-section:nth-child(even)  { background-color: #1a1a1a; }

/* --- Scroll Reveal --- */
.about-section[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.about-section[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Typography --- */
.about-display {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

.brand-accent {
  background: linear-gradient(135deg, #0066cc, #3399ff, #00ccaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.dark-mode .brand-accent {
  background: linear-gradient(135deg, #3399ff, #66ccff, #00ffcc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}
body.light-mode .about-eyebrow { color: #0066cc; }
body.dark-mode .about-eyebrow  { color: #3399ff; }

.about-heading {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.about-subheading {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

.about-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 540px;
  margin: 1rem 0 0;
}
body.light-mode .about-lead { color: #555; }
body.dark-mode .about-lead  { color: #aaa; }

.about-body {
  font-size: 1rem;
  line-height: 1.7;
  max-width: 640px;
  margin: 0 0 1.25rem;
}
body.light-mode .about-body { color: #333; }
body.dark-mode .about-body  { color: #d1d1d1; }

.about-muted { font-size: 0.9rem; }
body.light-mode .about-muted { color: #666; }
body.dark-mode .about-muted  { color: #aaa; }

/* --- Links --- */
.about-section a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
body.light-mode .about-section a         { color: #0066cc; }
body.light-mode .about-section a:not(.about-cta):hover   { color: #004999; }
body.dark-mode .about-section a          { color: #8ab4ff; }
body.dark-mode .about-section a:not(.about-cta):hover    { color: #a9c7ff; }



/* ============================================================
   HERO
   ============================================================ */
.about-hero {
  padding: 7rem 2rem 5rem;
}

.about-hero-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-hero-left {
  flex: 1 1 auto;
  min-width: 0;
}

.about-hero-card {
  flex: 0 0 350px;
  width: 350px;
}

.hero-swatches {
  display: flex;
  gap: 1.25rem;
  margin-top: 3rem;
}

.hero-swatch {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  animation: hero-float 3s ease-in-out infinite alternate;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
@keyframes hero-float {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.06); }
}
.hero-swatch:nth-child(2) { animation-delay: 0.3s; }
.hero-swatch:nth-child(3) { animation-delay: 0.6s; }
.hero-swatch:nth-child(4) { animation-delay: 0.9s; }
.hero-swatch:nth-child(5) { animation-delay: 1.2s; }


.about-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e5e5e7;
  margin-bottom: 2rem;
}
body.dark-mode .about-tabs { border-bottom-color: #333; }

.about-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s;
}
body.light-mode .about-tab { color: #666; }
body.dark-mode .about-tab  { color: #999; }

.about-tab.active {
  font-weight: 600;
}
body.light-mode .about-tab.active { color: #0066cc; border-bottom-color: #0066cc; }
body.dark-mode .about-tab.active  { color: #3399ff; border-bottom-color: #3399ff; }

body.light-mode .about-tab:hover:not(.active) { color: #333; }
body.dark-mode .about-tab:hover:not(.active)  { color: #ccc; }

.about-tab-panel {
  display: none;
}
.about-tab-panel.active {
  display: block;
  animation: tab-fade 0.3s ease;
}
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-visual {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.tab-swatch-large {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  flex-shrink: 0;
}

.tab-mini-palette {
  display: flex;
  gap: 6px;
}
.tab-mini-palette > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}
.tab-mini-palette .tab-palette-swatch {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}
.tab-mini-palette .tab-palette-label {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.7;
}

.tab-harmony-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.tab-harmony-swatches {
  display: flex;
  gap: 3px;
}
.tab-harmony-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
.tab-harmony-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.tab-offset-diagram {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.tab-offset-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-family: monospace;
}
.tab-offset-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

/* ============================================================
   WHY SECTION
   ============================================================ */
.about-why-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.about-why-card {
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid #e5e5e7;
}

body.dark-mode .about-why-card {
  border-color: #333;
}

body.light-mode .about-why-card {
  background: rgba(255, 255, 255, 0.65);
}

body.dark-mode .about-why-card {
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================================
   HARMONY TYPES
   ============================================================ */
.harmony-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}

.harmony-wheel-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#harmony-wheel {
  width: 320px;
  height: 320px;
}

.harmony-cards {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.harmony-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border: 2px solid #e5e5e7;
  border-radius: 12px;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.2s, background-color 0.2s;
  font-family: inherit;
}
body.dark-mode .harmony-card { border-color: #333; }

body.light-mode .harmony-card:hover { border-color: #ccc; }
body.dark-mode .harmony-card:hover  { border-color: #555; }

body.light-mode .harmony-card.active {
  border-color: #0066cc;
  background-color: rgba(0, 102, 204, 0.04);
}
body.dark-mode .harmony-card.active {
  border-color: #3399ff;
  background-color: rgba(51, 153, 255, 0.08);
}

.harmony-card-swatches {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.mini-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transition: background-color 0.4s ease;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
}
body.dark-mode .mini-swatch { border-color: rgba(255, 255, 255, 0.15); }

.harmony-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
body.dark-mode .harmony-card-text { color: #ddd; }

.harmony-card-text strong {
  font-size: 0.95rem;
  font-weight: 600;
}
.harmony-card-text span {
  font-size: 0.8rem;
}
body.light-mode .harmony-card-text span { color: #777; }
body.dark-mode .harmony-card-text span  { color: #888; }

/* ============================================================
   OKLCH VISUAL
   ============================================================ */
.oklch-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 1.5rem;
}

.oklch-definitions {
  margin: 1.5rem 0 0;
}
.oklch-def {
  margin-bottom: 1rem;
}
.oklch-def dt {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.oklch-def dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
body.light-mode .oklch-def dd { color: #666; }
body.dark-mode .oklch-def dd  { color: #999; }

.oklch-bar-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.oklch-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.oklch-bar-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
body.light-mode .oklch-bar-label { color: #666; }
body.dark-mode .oklch-bar-label  { color: #999; }

.oklch-bar {
  position: relative;
  height: 28px;
  border-radius: 8px;
  overflow: visible;
}
.oklch-bar-gradient {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}
.oklch-bar-marker {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 36px;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 8px rgba(0, 0, 0, 0.3);
}
body.light-mode .oklch-bar-marker { background: #1d1d1f; }
body.dark-mode .oklch-bar-marker  { background: #ffffff; }

.oklch-bar-value {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: monospace;
}

/* ============================================================
   EXAMPLE PALETTE
   ============================================================ */
.about-example .palettes-grid {
  grid-template-columns: 1fr;
  max-width: 520px;
}
.about-example .palette-card:hover {
  transform: none;
  box-shadow: none;
}
.about-btn-disabled {
  pointer-events: none;
  opacity: 0.75;
  cursor: not-allowed;
}

/* ============================================================
   VARIANT CARDS
   ============================================================ */
.variant-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.variant-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e5e7;
  transition: transform 0.2s, box-shadow 0.2s;
}
body.dark-mode .variant-card { border-color: #333; }

.variant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.variant-card-swatches {
  display: flex;
  height: 72px;
}
.variant-card-swatches > div {
  flex: 1;
  transition: background-color 0.4s ease;
}

.variant-card-label {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.variant-card-desc {
  padding: 0 1rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
body.light-mode .variant-card-desc { color: #777; }
body.dark-mode .variant-card-desc  { color: #888; }

.variant-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.variant-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
}
.variant-icon svg {
  width: 100%;
  height: 100%;
}
body.light-mode .variant-icon svg { fill: #555; }
body.dark-mode .variant-icon svg  { fill: #aaa; }

/* ============================================================
   WCAG DEMO
   ============================================================ */
.wcag-demo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.wcag-demo-card {
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  overflow: hidden;
}
body.dark-mode .wcag-demo-card { border-color: #333; }

.wcag-demo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wcag-demo-info {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wcag-demo-ratio {
  font-size: 0.85rem;
  font-weight: 500;
  font-family: monospace;
}

.wcag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.wcag-badge--aaa  { background: #15803d; color: #fff; }
.wcag-badge--aa   { background: #b45309; color: #fff; }
.wcag-badge--fail { background: #dc2626; color: #fff; }

/* ============================================================
   TOOLS (Editor + Library)
   ============================================================ */
.about-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
}

.about-tool-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border: 1px solid #e5e5e7;
  border-radius: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
body.dark-mode .about-tool-card { border-color: #333; }

.about-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.about-cta {
  display: inline-block;
  margin-top: auto;
  align-self: flex-start;
  padding: 0.625rem 1.5rem;
  border: 2px solid #0066cc;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  transition: background-color 0.2s, color 0.2s;
}
body.light-mode .about-cta       { color: #0066cc; }
body.light-mode .about-cta:hover { background-color: #0066cc; color: #fff; }
body.dark-mode .about-cta        { color: #3399ff; border-color: #3399ff; }
body.dark-mode .about-cta:hover  { background-color: #3399ff; color: #121212; }

/* ============================================================
   FOOTER
   ============================================================ */
.about-footer {
  padding: 1.5rem 2rem 2rem;
  text-align: center;
  font-size: 0.8rem;
}
body.light-mode .about-footer { color: #999; }
body.dark-mode .about-footer  { color: #666; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .harmony-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .harmony-wheel-container {
    order: -1;
  }
  .oklch-layout {
    grid-template-columns: 1fr;
  }
  .about-tools-grid {
    grid-template-columns: 1fr;
  }
  .about-why-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .about-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .about-hero-card {
    flex: none;
    width: 100%;
  }
  .about-display {
    font-size: 3rem;
  }
  .about-heading {
    font-size: 2rem;
  }
  .about-section {
    padding: 3.5rem 1.5rem;
  }
  .about-hero {
    padding: 5rem 1.5rem 3.5rem;
  }
  .variant-cards {
    grid-template-columns: 1fr;
  }
  .wcag-demo {
    grid-template-columns: 1fr;
  }
  .about-tabs {
    gap: 0;
  }
  .about-tab {
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .about-display {
    font-size: 2.25rem;
  }
  .about-heading {
    font-size: 1.6rem;
  }
  .hero-swatches {
    gap: 0.75rem;
  }
  .hero-swatch {
    width: 40px;
    height: 40px;
  }
}

/* ============================================================
   SIDE NAVIGATION
   ============================================================ */
.about-side-nav {
  position: fixed;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.about-side-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  text-decoration: none !important;
}

.about-side-nav-label {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.about-side-nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

body.light-mode .about-side-nav-label {
  color: #333;
}

body.dark-mode .about-side-nav-label {
  color: #f1f1f1;
}

body.light-mode .about-side-nav-dot {
  background: #a1a1a6;
  opacity: 0.9;
}

body.dark-mode .about-side-nav-dot {
  background: #888888;
  opacity: 0.9;
}

.about-side-nav-link:hover .about-side-nav-label,
.about-side-nav-link:focus-visible .about-side-nav-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.about-side-nav-link:hover .about-side-nav-dot,
.about-side-nav-link:focus-visible .about-side-nav-dot {
  transform: scale(1.15);
}

/* ACTIVE STATE */
body.light-mode .about-side-nav-link.active .about-side-nav-label {
  color: #111;
}

body.dark-mode .about-side-nav-link.active .about-side-nav-label {
  color: #ffffff;
}

.about-side-nav-link.active .about-side-nav-dot {
  transform: scale(1.35);
}

body.light-mode .about-side-nav-link.active .about-side-nav-dot {
  background: #3a3a3c;
  opacity: 1;
}

body.dark-mode .about-side-nav-link.active .about-side-nav-dot {
  background: #f1f1f1;
  opacity: 1;
}

.about-main section[id] {
  scroll-margin-top: 60px;
}

@media (max-width: 1100px) {
  .about-side-nav {
    left: 0.6rem;
  }
}

@media (max-width: 900px) {
  .about-side-nav {
    display: none;
  }
}