/* 
 * Goudplevier.ai Design System
 * Vintage-Modern Minimalist — "Consultancy-grade, not retro arcade"
 * Typography: Playfair Display (serif) + Inter (sans) + JetBrains Mono (mono)
 * Palette: Warm cream + dark goldenrod accent
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Base — warm monochrome */
  --color-ink: #1a1a1a;
  --color-ink-light: #2d2926;
  --color-paper: #faf8f5;
  --color-paper-alt: #f2efe9;
  --color-muted: #6b6560;
  --color-muted-light: #8a8580;
  --color-rule: #d4cfc8;
  --color-rule-light: #e8e4de;

  /* Accent — single warm gold */
  --color-accent: #b8860b;
  --color-accent-hover: #9a7209;
  --color-accent-light: #f5e6c8;

  /* Functional */
  --color-white: #ffffff;
  --color-error: #c53030;
  --color-success: #2f855a;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', 'Liberation Mono', monospace;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Line heights */
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Font weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Spacing – 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Borders & Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* Shadows — soft, vintage */
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow-md: 0 2px 8px rgba(26, 26, 26, 0.06);
  --shadow-lg: 0 4px 16px rgba(26, 26, 26, 0.08);

  /* Transitions */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --duration-slow: 300ms;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 720px;
  --container-pad: var(--space-6);
}

@media (min-width: 768px) {
  :root {
    --container-pad: var(--space-8);
  }
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background-color: var(--color-paper);
  /* Paper grain texture */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

a {
  color: var(--color-ink);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-default);
}

a:hover {
  color: var(--color-accent);
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-ink);
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }

  h2 {
    font-size: var(--text-4xl);
  }

  h3 {
    font-size: var(--text-3xl);
  }
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-ink-light);
  line-height: var(--leading-normal);
}

.text-muted {
  color: var(--color-muted);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
}

.text-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: var(--weight-medium);
}

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

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding: var(--space-16) 0;
}

.section-alt {
  background-color: var(--color-paper-alt);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header p {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-muted);
  font-size: var(--text-lg);
}

/* Fine divider rule */
.rule {
  border: none;
  border-top: 1px solid var(--color-rule);
  margin: var(--space-12) 0;
}

.rule-light {
  border-top-color: var(--color-rule-light);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 767px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-rule-light);
}

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

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-logo:hover {
  opacity: 0.85;
}

/* Footer logo */
.footer-logo {
  margin-bottom: var(--space-8);
}

.footer-logo img {
  height: 28px;
  width: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header-nav a {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--color-ink);
  border-bottom-color: var(--color-ink);
}

.header-nav a.external::after {
  content: ' ↗';
  font-size: 0.75em;
  opacity: 0.5;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--color-ink);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 767px) {
  .menu-toggle {
    display: block;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-paper);
    border-bottom: 1px solid var(--color-rule);
    padding: var(--space-6);
    gap: var(--space-4);
  }

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

  .header-nav a {
    font-size: var(--text-base);
    padding: var(--space-2) 0;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted-light);
  margin-bottom: var(--space-4);
  font-weight: var(--weight-medium);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-2);
}

.footer-col a {
  color: var(--color-rule);
  font-size: var(--text-sm);
  transition: color var(--duration-base) var(--ease-default);
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration-base) var(--ease-default);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Primary — dark ink */
.btn-primary {
  background-color: var(--color-ink);
  color: var(--color-white);
  border-color: var(--color-ink);
}

.btn-primary:hover {
  background-color: var(--color-ink-light);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Secondary — outlined */
.btn-secondary {
  background-color: transparent;
  color: var(--color-ink);
  border-color: var(--color-rule);
}

.btn-secondary:hover {
  border-color: var(--color-ink);
  color: var(--color-ink);
  transform: translateY(-1px);
}

/* Accent — goldenrod */
.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-rule-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default),
    transform var(--duration-base) var(--ease-default);
}

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

.card-muted {
  border-style: dashed;
  opacity: 0.6;
}

.card-muted:hover {
  transform: none;
  box-shadow: none;
}

.card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.card p {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-ink);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-ink);
  background-color: var(--color-white);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: var(--space-1);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: var(--space-24) 0 var(--space-16);
  text-align: center;
}

.hero h1 {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-6);
}

.hero p {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--text-lg);
  color: var(--color-muted);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-8);
}

/* ============================================
   CREDIBILITY STRIP
   ============================================ */
.credibility {
  display: flex;
  justify-content: center;
  gap: var(--space-10);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-rule-light);
  border-bottom: 1px solid var(--color-rule-light);
}

.credibility-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.credibility-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .credibility {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }
}

/* ============================================
   TOOL CARD
   ============================================ */
.tool-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-rule-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  transition: border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default),
    transform var(--duration-base) var(--ease-default);
}

.tool-card:hover {
  border-color: var(--color-rule);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  font-weight: var(--weight-medium);
}

.tool-card h3 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.tool-card p {
  color: var(--color-muted);
  font-size: var(--text-sm);
  flex-grow: 1;
  margin-bottom: var(--space-6);
}

.tool-card .tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  background-color: var(--color-paper-alt);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
}

.tool-card-coming {
  border-style: dashed;
  opacity: 0.65;
}

.tool-card-coming:hover {
  transform: none;
  box-shadow: none;
  cursor: default;
}

/* ============================================
   STEPS / HOW IT WORKS
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-rule);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.step h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.step p {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

@media (max-width: 767px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* ============================================
   FAQ / ACCORDION
   ============================================ */
.faq-item {
  border-bottom: 1px solid var(--color-rule-light);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: var(--space-5) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-ink);
  text-align: left;
  transition: color var(--duration-base) var(--ease-default);
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-question::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--color-muted);
  transition: transform var(--duration-base) var(--ease-default);
  flex-shrink: 0;
  margin-left: var(--space-4);
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-default);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding-bottom: var(--space-5);
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* ============================================
   NEWSLETTER BLOCK
   ============================================ */
.newsletter-block {
  background-color: var(--color-paper-alt);
  border: 1px solid var(--color-rule-light);
  border-radius: var(--radius-lg);
  padding: var(--space-12);
  text-align: center;
}

.newsletter-block h2 {
  margin-bottom: var(--space-3);
}

.newsletter-block p {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  color: var(--color-muted);
}

.newsletter-block .hero-cta {
  margin-top: var(--space-6);
}

/* ============================================
   ARCHIVE LIST
   ============================================ */
.archive-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-rule-light);
  transition: background-color var(--duration-base) var(--ease-default);
}

.archive-item:hover {
  background-color: var(--color-paper-alt);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  border-radius: var(--radius-sm);
}

.archive-issue {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  white-space: nowrap;
  min-width: 60px;
}

.archive-title {
  flex: 1;
  font-weight: var(--weight-medium);
}

.archive-title a {
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-default);
}

.archive-title a:hover {
  border-bottom-color: var(--color-ink);
}

.archive-date {
  font-size: var(--text-sm);
  color: var(--color-muted);
  white-space: nowrap;
}

.archive-excerpt {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: var(--space-1);
}

@media (max-width: 767px) {
  .archive-item {
    flex-direction: column;
    gap: var(--space-1);
  }
}

/* ============================================
   MICRO-ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--duration-slow) var(--ease-default),
    transform var(--duration-slow) var(--ease-default);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays */
.fade-delay-1 {
  transition-delay: 100ms;
}

.fade-delay-2 {
  transition-delay: 200ms;
}

.fade-delay-3 {
  transition-delay: 300ms;
}

/* ============================================
   UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mt-12 {
  margin-top: var(--space-12);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mb-12 {
  margin-bottom: var(--space-12);
}

.hidden {
  display: none !important;
}

/* ============================================
   PRINT
   ============================================ */
@media print {

  .site-header,
  .site-footer,
  .hero-cta {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}