/* Tim's Whiteboards — Ghost Theme CSS */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@400&display=swap');

:root {
  --ink: #0f0e0c;
  --paper: #f5f0e8;
  --chalk: #ffffff;
  --accent: #c8390a;
  --accent-soft: #f0d5cc;
  --mid: #7a7260;
  --rule: #d4cfc4;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-nav .nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav .nav-logo span { color: var(--accent); }

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

.nav-links a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk);
  background: var(--accent);
  padding: 10px 20px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  padding: 140px 48px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  animation: fadeUp 0.8s ease forwards 0.1s;
  opacity: 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.hero-kicker::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(52px, 6vw, 84px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 32px;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--mid);
  max-width: 460px;
  margin-bottom: 44px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk);
  background: var(--ink);
  padding: 16px 32px;
  text-decoration: none;
  transition: background 0.2s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* Whiteboard widget */
.hero-right { position: relative; height: 520px; }

.whiteboard {
  position: absolute;
  inset: 0;
  background: #fafaf8;
  border: 2px solid var(--rule);
  box-shadow: 8px 8px 0 var(--rule), 16px 16px 0 #e8e2d8;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
}

.wb-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.wb-dot { width: 10px; height: 10px; border-radius: 50%; }
.wb-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-left: 4px;
  text-transform: uppercase;
}

.wb-line { height: 1px; background: #e0dbd0; margin: 4px 0; opacity: 0; animation: drawLine 0.4s ease forwards; }
.wb-text { font-family: var(--mono); font-size: 13px; color: var(--ink); opacity: 0; animation: fadeIn 0.5s ease forwards; }
.wb-text.accent { color: var(--accent); font-weight: 500; }
.wb-text.mid { color: var(--mid); font-size: 11px; }
.wb-arrow { font-family: var(--mono); font-size: 18px; color: var(--accent); opacity: 0; animation: fadeIn 0.4s ease forwards; }
.wb-box { border: 1px solid var(--accent); padding: 10px 14px; opacity: 0; animation: fadeIn 0.5s ease forwards; }
.wb-box-text { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.wb-line:nth-child(1)  { animation-delay: 0.6s; }
.wb-text:nth-child(2)  { animation-delay: 0.8s; }
.wb-line:nth-child(3)  { animation-delay: 1.0s; }
.wb-text:nth-child(4)  { animation-delay: 1.1s; }
.wb-arrow:nth-child(5) { animation-delay: 1.3s; }
.wb-text:nth-child(6)  { animation-delay: 1.5s; }
.wb-arrow:nth-child(7) { animation-delay: 1.7s; }
.wb-box:nth-child(8)   { animation-delay: 1.9s; }
.wb-text:nth-child(9)  { animation-delay: 2.2s; }

/* ── TICKER ── */
.ticker-wrap {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
  overflow: hidden;
  padding: 14px 0;
}
.ticker-track {
  display: flex;
  animation: ticker 28s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 0 40px;
  opacity: 0.7;
}
.ticker-item span { color: var(--accent); margin-right: 40px; }

/* ── SECTIONS ── */
.site-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px 48px;
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  display: block;
  height: 1px; width: 48px;
  background: var(--accent);
}

.site-section h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 60px;
}
.site-section h2 em { font-style: italic; color: var(--accent); }

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.pillar {
  background: var(--chalk);
  padding: 44px 36px;
  border: 1px solid var(--rule);
  transition: border-color 0.2s, transform 0.2s;
}
.pillar:hover { border-color: var(--accent); transform: translateY(-4px); }
.pillar-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 20px; }
.pillar h3 { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.pillar p { font-size: 15px; line-height: 1.7; color: var(--mid); font-weight: 300; }

/* Method strip */
.method-strip {
  background: var(--ink);
  padding: 80px 48px;
}
.method-inner { max-width: 1280px; margin: 0 auto; }
.method-strip .section-label { color: #c8a96e; }
.method-strip .section-label::after { background: #c8a96e; }
.method-strip h2 { color: var(--paper); }
.method-strip h2 em { color: #c8a96e; }

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #2a2520;
  border: 1px solid #2a2520;
  margin-top: 20px;
}
.method-step { background: var(--ink); padding: 36px 28px; position: relative; }
.method-step::after {
  content: '→';
  position: absolute;
  right: -14px; top: 50%;
  transform: translateY(-50%);
  color: #c8a96e;
  font-size: 18px;
  z-index: 2;
}
.method-step:last-child::after { display: none; }
.step-num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: #c8a96e; margin-bottom: 14px; }
.step-title { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--paper); margin-bottom: 10px; }
.step-body { font-size: 13px; line-height: 1.6; color: #7a7060; font-weight: 300; }

/* ── POST FEED ── */
.post-feed {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2px;
}

.post-card {
  background: var(--chalk);
  border: 1px solid var(--rule);
  padding: 36px;
  transition: border-color 0.2s;
  text-decoration: none;
  display: block;
  color: inherit;
}
.post-card:hover { border-color: var(--accent); }

.post-card.featured {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--ink);
  border-color: var(--ink);
  padding: 48px;
  min-height: 420px;
}

.card-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.post-card.featured .card-tag { color: #c8a96e; }

.card-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 12px;
}
.post-card.featured .card-title { font-size: 30px; color: var(--paper); }

.card-excerpt { font-size: 14px; line-height: 1.6; color: var(--mid); font-weight: 300; }
.post-card.featured .card-excerpt { color: #7a7060; }

.card-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--mid); margin-top: 20px; }
.post-card.featured .card-meta { color: #4a4030; }

/* ── SINGLE POST ── */
.post-header {
  max-width: 760px;
  margin: 140px auto 60px;
  padding: 0 48px;
}
.post-header .card-tag { margin-bottom: 20px; }
.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.post-header .post-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mid);
  text-transform: uppercase;
  display: flex;
  gap: 20px;
}

.post-content {
  max-width: 760px;
  margin: 0 auto 100px;
  padding: 0 48px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
  font-weight: 300;
}
.post-content p { margin-bottom: 1.6em; }
.post-content h2 { font-family: var(--serif); font-size: 32px; font-weight: 700; margin: 2em 0 0.8em; }
.post-content h3 { font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 1.8em 0 0.6em; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  margin: 2em 0;
  font-style: italic;
  color: var(--mid);
  font-family: var(--serif);
  font-size: 22px;
}
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content strong { font-weight: 500; }

/* ── EMAIL CTA ── */
.email-cta {
  background: var(--accent-soft);
  border-top: 1px solid #e8ccc4;
  border-bottom: 1px solid #e8ccc4;
  padding: 80px 48px;
  text-align: center;
}
.email-cta h2 { font-family: var(--serif); font-size: clamp(32px, 4vw, 48px); font-weight: 700; margin-bottom: 16px; }
.email-cta p { font-size: 17px; color: var(--mid); font-weight: 300; margin-bottom: 36px; }

.email-form { display: flex; max-width: 480px; margin: 0 auto; }
.email-form input {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid #d4b8b0;
  border-right: none;
  background: var(--chalk);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.email-form input::placeholder { color: #b0a090; }
.email-form button {
  padding: 16px 28px;
  background: var(--accent);
  color: var(--chalk);
  border: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}
.email-form button:hover { opacity: 0.85; }

/* ── FOOTER ── */
.site-footer {
  background: var(--ink);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--paper); opacity: 0.6; }
.footer-links { display: flex; gap: 28px; list-style: none; }
.footer-links a {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a7060;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--paper); }
.footer-copy { font-family: var(--mono); font-size: 11px; color: #4a4030; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes drawLine {
  from { opacity: 0; transform: scaleX(0); transform-origin: left; }
  to   { opacity: 1; transform: scaleX(1); }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .site-nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding: 120px 24px 60px; gap: 48px; }
  .hero-right { height: 340px; }
  .site-section, .post-header, .post-content { padding: 64px 24px; }
  .pillars { grid-template-columns: 1fr; }
  .method-steps { grid-template-columns: 1fr 1fr; }
  .method-step::after { display: none; }
  .post-feed { grid-template-columns: 1fr; }
  .post-card.featured { min-height: 280px; grid-row: span 1; }
  .method-strip, .email-cta { padding: 60px 24px; }
  .site-footer { padding: 32px 24px; flex-direction: column; gap: 20px; text-align: center; }
}

/* ── GHOST CARD REQUIREMENTS ── */
.gh-content .kg-width-wide {
  margin-left: calc(50% - 50vw + 48px);
  margin-right: calc(50% - 50vw + 48px);
  width: auto;
  max-width: 1100px;
}

.gh-content .kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  max-width: 100vw;
}

.gh-content .kg-image { max-width: 100%; height: auto; display: block; }
.gh-content .kg-image-card { margin: 2em 0; }
.gh-content .kg-image-card figcaption { font-family: var(--mono); font-size: 12px; color: var(--mid); text-align: center; margin-top: 8px; }

.gh-content .kg-gallery-container { display: flex; flex-direction: column; max-width: 100%; }
.gh-content .kg-gallery-row { display: flex; flex-direction: row; justify-content: center; gap: 4px; margin-bottom: 4px; }
.gh-content .kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

.gh-content .kg-bookmark-card { border: 1px solid var(--rule); padding: 20px; margin: 2em 0; text-decoration: none; display: block; color: inherit; }
.gh-content .kg-bookmark-title { font-family: var(--serif); font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.gh-content .kg-bookmark-description { font-size: 14px; color: var(--mid); }
.gh-content .kg-bookmark-url { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-top: 8px; }

.gh-content .kg-callout-card {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  margin: 2em 0;
}
.gh-content .kg-callout-emoji { font-size: 20px; }
.gh-content .kg-callout-text { font-size: 16px; line-height: 1.6; }

.gh-content .kg-toggle-card { border: 1px solid var(--rule); padding: 20px; margin: 2em 0; }
.gh-content .kg-toggle-heading { font-family: var(--serif); font-size: 20px; font-weight: 700; cursor: pointer; }
.gh-content .kg-toggle-content { margin-top: 12px; font-size: 16px; line-height: 1.7; color: var(--mid); }

.gh-content .kg-divider { border: none; border-top: 1px solid var(--rule); margin: 2.5em 0; }

.gh-content .kg-video-card { margin: 2em 0; }
.gh-content .kg-video-card video { width: 100%; height: auto; display: block; }

.gh-content .kg-audio-card { margin: 2em 0; border: 1px solid var(--rule); padding: 16px; }

.gh-content .kg-button-card { margin: 2em 0; text-align: center; }
.gh-content .kg-btn {
  display: inline-block;
  padding: 14px 28px;
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}
.gh-content .kg-btn:hover { background: var(--accent); }
.gh-content .kg-btn-accent { background: var(--accent); }

.gh-content .kg-header-card {
  padding: 60px 48px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  margin: 2em 0;
}
.gh-content .kg-header-card h2 { font-family: var(--serif); font-size: 36px; color: var(--paper); margin-bottom: 0; }

.gh-content .kg-product-card { border: 1px solid var(--rule); padding: 28px; margin: 2em 0; }
.gh-content .kg-product-card-image { width: 100%; height: auto; margin-bottom: 16px; }
.gh-content .kg-product-card-title { font-family: var(--serif); font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.gh-content .kg-product-card-description { font-size: 15px; color: var(--mid); line-height: 1.6; }

.gh-content pre {
  background: var(--ink);
  color: var(--paper);
  padding: 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  margin: 2em 0;
}
.gh-content code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 2px 6px;
  color: var(--accent);
}
.gh-content pre code { background: none; padding: 0; color: inherit; }

@media (max-width: 900px) {
  .gh-content .kg-width-wide,
  .gh-content .kg-width-full {
    margin-left: -24px;
    margin-right: -24px;
    width: calc(100% + 48px);
    max-width: calc(100% + 48px);
  }
}
