/* digcommunications.com — editorial communications blog */

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

/* ── Tokens ── */
:root {
  --bg-page: #ffffff;
  --bg-surface: #f9f4f1;
  --bg-hero-start: #fe4f08;
  --bg-hero-end: #ff7444;
  --text-primary: #501202;
  --text-muted: #9b7b6e;
  --accent: #ffbca5;
  --accent-strong: #fe4f08;
  --border: #ebddd5;
  --text-inverse: #ffffff;
  --surface-dark: #501202;
  --shadow-card: 0 1px 3px rgba(80, 18, 2, 0.06);
  --shadow-card-hover: 0 4px 12px rgba(80, 18, 2, 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 24px;
  --max-width: 1100px;
  --max-width-prose: 860px;
}

/* ── Base ── */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Archivo", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color 200ms ease;
}

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

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

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: var(--max-width-prose);
  margin: 0 auto;
}

/* ── Navigation ── */
.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.site-nav.scrolled {
  position: fixed;
  background: var(--bg-page);
  box-shadow: 0 1px 3px rgba(80, 18, 2, 0.08);
}

.site-nav.scrolled .wm-icon {
  background: var(--accent-strong);
  color: var(--text-inverse);
}

.site-nav.scrolled .wm-text {
  color: var(--text-primary);
}

.site-nav.scrolled .nav-links a {
  color: var(--text-muted);
}

.site-nav.scrolled .nav-links a:hover,
.site-nav.scrolled .nav-links a.active {
  color: var(--accent-strong);
}

.site-nav.scrolled .nav-toggle span {
  background: var(--text-primary);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.nav-wordmark:hover {
  opacity: 0.85;
}

.nav-wordmark .wm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--text-inverse);
  border-radius: 6px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: -0.02em;
  text-transform: lowercase;
  line-height: 1;
}

.nav-wordmark .wm-text {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-inverse);
  letter-spacing: -0.01em;
  transition: color 200ms ease;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: "Archivo", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 200ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-inverse);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-inverse);
  margin: 5px 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* Pages without hero get dark nav */
.page-interior .site-nav {
  position: sticky;
  background: var(--bg-page);
  box-shadow: 0 1px 0 var(--border);
}

.page-interior .wm-icon {
  background: var(--accent-strong);
  color: var(--text-inverse);
}

.page-interior .wm-text {
  color: var(--text-primary);
}

.page-interior .nav-links a {
  color: var(--text-muted);
}

.page-interior .nav-links a:hover,
.page-interior .nav-links a.active {
  color: var(--accent-strong);
}

.page-interior .nav-toggle span {
  background: var(--text-primary);
}

/* ── Hero ── */
.hero {
  background: var(--bg-hero-start);
  padding: 160px 24px 120px;
  text-align: center;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-bottom: 80px;
  position: relative;
  overflow: hidden;
}

/* Dot grid texture */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 88px;
  font-weight: 400;
  line-height: 0.95;
  color: var(--text-inverse);
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.hero-badge .badge-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--text-inverse);
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Section ── */
.section {
  padding: 80px 0;
}

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

.section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 48px;
}

/* ── Article Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 300ms ease, transform 300ms ease;
  display: flex;
  flex-direction: column;
}

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

.card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: none;
  padding: 0;
  margin-bottom: 16px;
  align-self: flex-start;
}

.card-badge::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent-strong);
  border-radius: 2px;
  flex-shrink: 0;
}

.card-title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card-excerpt {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.card-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: auto;
}

/* ── Feed Layout (homepage) ── */
.feed-post {
  max-width: 900px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.feed-post-header {
  background: var(--accent-strong);
  padding: 48px 40px 40px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.feed-post-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.feed-post-header .card-badge {
  color: rgba(255, 255, 255, 0.7);
}

.feed-post-header .card-badge::before {
  background: var(--text-inverse);
}

.feed-post-header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.feed-post-header h2 a {
  color: var(--text-inverse);
  text-decoration: none;
}

.feed-post-header h2 a:hover {
  color: var(--text-inverse);
  opacity: 0.85;
}

.feed-post-header .post-date {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.feed-post-body {
  padding: 36px 40px 48px;
  border-bottom: 1px solid var(--border);
}

.feed-post:last-child .feed-post-body {
  border-bottom: none;
}

.feed-post-body h3 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-top: 36px;
  margin-bottom: 16px;
}

.feed-post-body p {
  margin-bottom: 16px;
}

.feed-read-more {
  margin-top: 24px;
}

.feed-read-more a {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
}

/* ── Blog Post ── */
.post-header {
  text-align: center;
  padding: 64px 24px 48px;
}

.post-header .card-badge {
  margin-bottom: 20px;
}

.post-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  max-width: var(--max-width-prose);
  margin: 0 auto 16px;
}

.post-date {
  font-size: 14px;
  color: var(--text-muted);
}

.post-body {
  padding: 0 24px 80px;
}

.post-body h2 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-top: 48px;
  margin-bottom: 20px;
}

.post-body p {
  margin-bottom: 20px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

/* Cross-links card at end of post */
.post-crosslinks {
  margin-top: 64px;
  padding: 28px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.post-crosslinks h3 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.post-crosslinks ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-crosslinks a {
  font-size: 15px;
}

/* ── About Page ── */
.about-hero {
  background: var(--bg-hero-start);
  padding: 140px 24px 80px;
  text-align: center;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  margin-bottom: 64px;
  position: relative;
  overflow: hidden;
}

.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.about-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-inverse);
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}

.about-hero p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  margin: 16px auto 0;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.about-body {
  padding: 0 24px 80px;
}

.about-body h2 {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
}

.about-body p {
  margin-bottom: 20px;
}

/* ── 404 ── */
.error-page {
  text-align: center;
  padding: 120px 24px;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.error-page h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 96px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.error-page p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.error-page a {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-inverse);
  background: var(--accent-strong);
  padding: 12px 28px;
  border-radius: var(--radius-lg);
  transition: opacity 200ms ease;
}

.error-page a:hover {
  color: var(--text-inverse);
  opacity: 0.9;
}

/* ── Footer ── */
.site-footer {
  background: var(--surface-dark);
  padding: 48px 0 32px;
  color: var(--text-inverse);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-wordmark .wm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent-strong);
  border-radius: 5px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-inverse);
  letter-spacing: -0.02em;
  text-transform: lowercase;
  line-height: 1;
}

.footer-wordmark .wm-text {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-inverse);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 200ms ease;
}

.footer-links a:hover {
  color: var(--text-inverse);
}

.footer-copy {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
}

/* ── Blog Index ── */
.blog-header {
  text-align: center;
  padding: 64px 24px 48px;
}

.blog-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.blog-header p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero {
    padding: 120px 20px 72px;
    margin-bottom: 48px;
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero p {
    font-size: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 30px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .post-header h1,
  .blog-header h1 {
    font-size: 34px;
  }

  .about-hero h1 {
    font-size: 38px;
  }

  .post-body h2,
  .about-body h2 {
    font-size: 22px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-page);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(80, 18, 2, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links.open a {
    color: var(--text-muted);
  }

  .nav-links.open a:hover,
  .nav-links.open a.active {
    color: var(--accent-strong);
  }

  .nav-toggle {
    display: block;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-copy {
    text-align: center;
  }

  .about-hero {
    padding: 110px 20px 56px;
    margin-bottom: 40px;
  }

  .error-page h1 {
    font-size: 64px;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
