/* Photo Colorization Guide - Custom Styles */
:root {
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F0EB;
  --color-text: #2C2420;
  --color-text-muted: #6B5D54;
  --color-text-light: #9A8B7E;
  --color-primary: #8B5E3C;
  --color-primary-dark: #6B4528;
  --color-primary-light: #D4A574;
  --color-accent: #4A6741;
  --color-accent-light: #6B8E6B;
  --color-border: #E0D8D0;
  --color-success: #4A6741;
  --color-warning: #C4883C;
  --color-error: #A84848;
  --shadow-sm: 0 1px 3px rgba(44, 36, 32, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 36, 32, 0.1);
  --shadow-lg: 0 8px 24px rgba(44, 36, 32, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --max-width: 1100px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.05rem;
}

.logo:hover {
  color: var(--color-primary);
}

.logo-icon {
  flex-shrink: 0;
}

.site-header nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.site-header nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.site-header nav a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary-light);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-surface-alt) 0%, var(--color-bg) 100%);
  padding: 80px 24px;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: white;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Sections */
section {
  padding: 64px 24px;
}

section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
  color: var(--color-text);
}

.section-intro {
  color: var(--color-text-muted);
  max-width: 680px;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

/* Workflow */
.workflow-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.step-card {
  display: flex;
  gap: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.2s;
}

.step-card:hover {
  box-shadow: var(--shadow-md);
}

.step-card.completed {
  border-color: var(--color-success);
  background: #F5F8F4;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.step-card.completed .step-number {
  background: var(--color-success);
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--color-text);
}

.step-content p {
  color: var(--color-text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.step-tip {
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-primary-light);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.decade-select {
  width: 100%;
  max-width: 300px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--color-surface);
  color: var(--color-text);
  margin-bottom: 16px;
  cursor: pointer;
}

.decade-select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.palette-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 32px;
}

.palette-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}

.palette-swatch:hover {
  transform: scale(1.15);
}

.palette-swatch::after {
  content: attr(data-name);
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  white-space: nowrap;
  background: var(--color-text);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.palette-swatch:hover::after {
  opacity: 1;
}

.tool-list {
  list-style: none;
  margin-bottom: 12px;
}

.tool-list li {
  padding: 6px 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding-left: 20px;
  position: relative;
}

.tool-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.review-list {
  list-style: none;
  margin-bottom: 16px;
}

.review-list li {
  padding: 6px 0;
}

.review-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.review-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

/* Progress Bar */
.progress-bar {
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
  height: 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-sm);
  transition: width 0.4s ease;
  width: 0%;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.workflow-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Color Reference */
.reference-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.reference-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.2s;
}

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

.reference-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--color-text);
}

.color-swatches {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: block;
}

.swatch-border {
  border-color: #CCC;
}

.reference-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Examples */
.examples-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.example-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.example-header h3 {
  font-size: 1.1rem;
  color: var(--color-text);
}

.example-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.example-tag.good {
  background: #E8F5E9;
  color: #2E7D32;
}

.example-tag.medium {
  background: #FFF8E1;
  color: #F57F17;
}

.example-tag.fair {
  background: #FFF3E0;
  color: #E65100;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.ba-side {
  text-align: center;
}

.ba-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ba-image {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.original-example {
  background: linear-gradient(135deg, #888 0%, #AAA 50%, #888 100%);
  position: relative;
}

.original-example::after {
  content: "B&W Original";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 600;
}

.colorized-example {
  position: relative;
}

.colorized-example.good-example {
  background: linear-gradient(135deg, #D4A574 0%, #8B5E3C 30%, #4A6741 70%, #6B8E6B 100%);
}

.colorized-example.medium-example {
  background: linear-gradient(135deg, #C4A882 0%, #8B6B4A 30%, #5A7A5A 70%, #7A9A7A 100%);
}

.colorized-example.fair-example {
  background: linear-gradient(135deg, #B8A090 0%, #9B8070 30%, #7A8A7A 70%, #9AAA9A 100%);
}

.colorized-example::after {
  content: "Colorized";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-weight: 600;
}

.example-card > p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Tips */
.tips-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.tip-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  border-left: 4px solid var(--color-border);
}

.tip-card.mistake {
  border-left-color: var(--color-error);
}

.tip-card.success {
  border-left-color: var(--color-success);
}

.tip-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--color-text);
}

.tip-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.scanning-checklist {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
}

.scanning-checklist h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.scanning-checklist > p {
  color: var(--color-text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.scanning-checklist ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.scanning-checklist li {
  font-size: 0.95rem;
}

.scanning-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--color-text);
}

.scanning-checklist input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

/* FAQ */
.faq-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--color-primary);
  font-weight: 400;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 24px 18px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 48px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  display: block;
  margin-bottom: 8px;
}

.footer-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

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

.footer-meta {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--color-text-light);
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 12px;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .hero {
    padding: 48px 16px;
  }

  section {
    padding: 40px 16px;
  }

  .step-card {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .before-after {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 8px;
  }

  .workflow-actions {
    flex-direction: column;
  }

  .workflow-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .reference-grid,
  .example-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .scanning-checklist ul {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .workflow-actions {
    display: none;
  }

  .step-card {
    break-inside: avoid;
    border: 1px solid #CCC;
  }

  body {
    background: white;
    color: black;
  }

  section {
    padding: 20px 0;
  }
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
