/* ============================================
   DLR TOOLKIT — Design-Led Research & HCD Toolkit
   Fonts: Fraunces (serif headings) + Space Grotesk (sans body)
   Palette: Ink #1a1a2e, Paper #f5f3ee, Clay #c8553d, Sage #4a7c59
   ============================================ */

:root {
  --ink: #1a1a2e;
  --ink-soft: #2d2d44;
  --paper: #f5f3ee;
  --paper-warm: #efebe2;
  --clay: #c8553d;
  --clay-dark: #a8442f;
  --sage: #4a7c59;
  --sage-light: #6b9b7a;
  --muted: #8a8a9a;
  --line: #d9d4c7;
  --white: #ffffff;
  --radius: 4px;
  --max: 1200px;
  --max-narrow: 760px;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Space Grotesk', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
p { margin-bottom: 1em; }
.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  display: inline-block;
  margin-bottom: 0.75rem;
}
.accent-word {
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
}

/* HEADER */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  white-space: nowrap;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.header-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--clay);
  transition: width 0.3s ease;
}
.header-nav a:hover::after,
.header-nav a.active::after { width: 100%; }
.header-nav a:hover { color: var(--clay); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 101;
  position: relative;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
}
.hero-background {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}
.hero-background img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.45;
}
.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.7) 0%, rgba(26,26,46,0.5) 50%, rgba(200,85,61,0.2) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem 1.5rem 4rem;
  width: 100%;
}
.hero-eyebrow {
  color: var(--clay);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
}
.hero h1 {
  color: var(--paper);
  max-width: 16ch;
  margin-bottom: 1.5rem;
}
.hero h1 .accent-word {
  color: var(--clay);
  font-style: italic;
  font-weight: 400;
}
.hero-subtitle {
  color: rgba(245,243,238,0.85);
  font-size: 1.15rem;
  max-width: 52ch;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--clay);
  color: var(--paper);
}
.btn-primary:hover { background: var(--clay-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid rgba(245,243,238,0.5);
}
.btn-outline:hover { border-color: var(--paper); background: rgba(245,243,238,0.1); }
.btn-dark {
  background: var(--ink);
  color: var(--paper);
}
.btn-dark:hover { background: var(--ink-soft); transform: translateY(-2px); }

/* SECTIONS */
.section {
  padding: 5rem 1.5rem;
}
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
}
.section-intro {
  margin-bottom: 3rem;
}
.section-intro h2 {
  max-width: 18ch;
  margin-bottom: 1rem;
}

/* WHAT IS HCD */
.hcd-intro {
  background: var(--paper);
}
.hcd-intro .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hcd-intro-text h2 { margin-bottom: 1.25rem; }
.hcd-intro-text p { color: var(--ink-soft); margin-bottom: 1rem; }
.hcd-intro-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.hcd-intro-image img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

/* PRINCIPLES GRID */
.principles {
  background: var(--paper-warm);
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.principle-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.25s, box-shadow 0.25s;
}
.principle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,26,46,0.08);
}
.principle-number {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--clay);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.principle-card h3 { margin-bottom: 0.6rem; font-size: 1.25rem; }
.principle-card p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 0; }

/* FEATURED ARTICLES */
.featured {
  background: var(--paper);
}
.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.featured-header a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clay);
  border-bottom: 2px solid var(--clay);
  padding-bottom: 2px;
}

/* BLOG CARDS GRID */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.blog-grid[data-blog-listing="featured-home"] {
  grid-template-columns: repeat(2, 1fr);
}
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.25s, box-shadow 0.25s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,26,46,0.08);
}
.blog-card-link { display: block; }
.blog-card-image {
  overflow: hidden;
}
.blog-card-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-card-body { padding: 1.5rem 1.5rem 1.75rem; }
.blog-card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clay);
  display: block;
  margin-bottom: 0.5rem;
}
.blog-card-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}
.blog-card-excerpt {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.blog-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* FLY ON THE WALL PAGE */
.page-hero {
  background: var(--ink);
  padding: 8rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}
.page-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(74,124,89,0.3) 100%);
  z-index: 1;
}
.page-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}
.page-hero-bg img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.4;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
}
.page-hero h1 {
  color: var(--paper);
  max-width: 14ch;
  margin-bottom: 1rem;
}
.page-hero p {
  color: rgba(245,243,238,0.85);
  font-size: 1.15rem;
  max-width: 55ch;
}

.fotw-method {
  padding: 4rem 1.5rem;
  background: var(--paper);
}
.fotw-method .section-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: start;
}
.fotw-method-image {
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 100px;
}
.fotw-method-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.fotw-method-text h2 { margin-bottom: 1rem; }
.fotw-method-text p { color: var(--ink-soft); margin-bottom: 1rem; }

.fotw-steps {
  padding: 4rem 1.5rem;
  background: var(--paper-warm);
}
.fotw-steps-list {
  list-style: none;
  counter-reset: step;
  max-width: var(--max-narrow);
  margin: 0 auto;
}
.fotw-steps-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.fotw-steps-list li:last-child { border-bottom: none; }
.fotw-steps-list li::before {
  content: counter(step, decimal-leading-zero);
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--clay);
  line-height: 1;
}
.fotw-steps-list h3 { margin-bottom: 0.4rem; font-size: 1.2rem; }
.fotw-steps-list p { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 0; }

.fotw-tips {
  padding: 4rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
}
.fotw-tips h2 { color: var(--paper); margin-bottom: 0.5rem; }
.fotw-tips .eyebrow { color: var(--clay); }
.fotw-tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.tip-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.tip-card h3 { color: var(--paper); font-size: 1.15rem; margin-bottom: 0.5rem; }
.tip-card p { color: rgba(245,243,238,0.75); font-size: 0.9rem; margin-bottom: 0; }

/* CONTACT */
.contact {
  background: var(--paper-warm);
  padding: 5rem 1.5rem;
}
.contact .section-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: start;
}
.contact-info h2 { margin-bottom: 1rem; }
.contact-info p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}
.contact-detail .label {
  font-weight: 600;
  color: var(--ink);
}
.contact-detail .value { color: var(--ink-soft); }

/* FORM */
.contact-form {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clay);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.contact-form button[type="submit"] {
  background: var(--clay);
  color: var(--paper);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.contact-form button[type="submit"]:hover { background: var(--clay-dark); transform: translateY(-2px); }
.contact-form button[type="submit"]:disabled { opacity: 0.6; transform: none; }

/* BLOG POST PAGES */
.breadcrumb-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem 1.5rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb-bar a { color: var(--ink-soft); }
.breadcrumb-bar a:hover { color: var(--clay); }
.breadcrumb-bar .sep { margin: 0 0.5rem; }

.blog-main {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}
.blog-post-header {
  margin-bottom: 2.5rem;
}
.blog-post-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  display: block;
  margin-bottom: 0.75rem;
}
.blog-post-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
  line-height: 1.15;
}
.blog-post-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.blog-post-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
}

/* BLOG TOC */
.blog-toc {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.blog-toc::before {
  content: 'Contents';
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.5rem;
}
.blog-toc ul {
  list-style: none;
  padding: 0;
}
.blog-toc li { margin-bottom: 0.3rem; }
.blog-toc a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.blog-toc a:hover { color: var(--clay); }

/* BLOG ARTICLE CONTENT */
.blog-article h2 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 100px;
}
.blog-article h3 {
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
.blog-article p {
  color: var(--ink-soft);
  margin-bottom: 1.1em;
  font-size: 1.02rem;
  line-height: 1.75;
}
.blog-article ul, .blog-article ol {
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}
.blog-article li {
  color: var(--ink-soft);
  margin-bottom: 0.5em;
  line-height: 1.7;
}
.blog-article blockquote {
  border-left: 3px solid var(--clay);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.blog-article img {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.blog-article figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.callout {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}
.callout strong { color: var(--ink); }
.callout p { margin-bottom: 0; color: var(--ink-soft); }

/* RELATED POSTS */
.blog-related {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.blog-related::before {
  content: 'Related reading';
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1.25rem;
}
.blog-related .blog-grid { grid-template-columns: 1fr; gap: 1.5rem; }
.blog-related .blog-card-image img { aspect-ratio: 16/9; }

/* ARTICLES LISTING PAGE */
.articles-listing {
  padding: 5rem 1.5rem;
  background: var(--paper);
}
.articles-listing .blog-grid {
  max-width: var(--max);
  margin: 0 auto;
}

/* FOOTER */
.site-footer {
  background: var(--ink);
  color: rgba(245,243,238,0.8);
  padding: 3rem 1.5rem 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}
.footer-brand .logo-mark { background: var(--clay); }
.footer-brand .logo-text { color: var(--paper); }
.footer-tagline {
  font-size: 0.9rem;
  color: rgba(245,243,238,0.6);
  margin-bottom: 1.25rem;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.88rem;
  color: rgba(245,243,238,0.7);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--clay); }
.footer-copy {
  font-size: 0.82rem;
  color: rgba(245,243,238,0.5);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hcd-intro .section-inner,
  .fotw-method .section-inner,
  .contact .section-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .fotw-method-image { position: static; }
  .principles-grid { grid-template-columns: 1fr; }
  .fotw-tips-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 5rem 1.75rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    z-index: 99;
  }
  .header-nav.open { transform: translateX(0); }
  .header-nav a { font-size: 1rem; }
  .nav-toggle { display: flex; }

  .hero { min-height: 90vh; }
  .hero-content { padding-top: 5rem; }
  .principles-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid[data-blog-listing="featured-home"] { grid-template-columns: 1fr; }
  .featured-header { flex-direction: column; align-items: flex-start; }
  .fotw-steps-list li { grid-template-columns: 1fr; gap: 0.5rem; }
  .contact-form { padding: 1.75rem; }
  .section { padding: 3.5rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .blog-post-meta { flex-direction: column; gap: 0.3rem; }
}
