/* ============================================================
   DAVIDBARRY.NET — Shared Stylesheet
   Ancient Wisdom. Modern Science. Better Human.
   ============================================================ */

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

/* ---- TOKENS ---- */
:root {
  --blue:        #1B3A8C;
  --blue-dark:   #112570;
  --blue-mid:    #2a4faa;
  --blue-pale:   #eef2fc;
  --gold:        #C49A22;
  --gold-light:  #e8b930;
  --gold-pale:   #fdf7e6;
  --white:       #ffffff;
  --off-white:   #f8f9fc;
  --ink:         #1a1a2e;
  --ink-mid:     #46465f;
  --ink-light:   #8a8aaa;
  --border:      #e2e4f0;
  --shadow-sm:   0 2px 10px rgba(27,58,140,.07);
  --shadow:      0 4px 24px rgba(27,58,140,.10);
  --shadow-lg:   0 8px 40px rgba(27,58,140,.16);
  --radius:      10px;
  --radius-sm:   6px;
  --max:         1100px;
  --serif:       'Playfair Display', Georgia, serif;
  --sans:        'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); color: var(--ink); background: var(--white); line-height: 1.72; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

/* ---- UTILITIES ---- */
.container  { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.text-center { text-align: center; }
.text-mid   { color: var(--ink-mid); }
.serif      { font-family: var(--serif); }
.gold       { color: var(--gold); }
.blue       { color: var(--blue); }

/* ---- TYPOGRAPHY ---- */
.eyebrow {
  display: block; font-size: 12px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.section-title {
  font-family: var(--serif); font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700; line-height: 1.2; color: var(--ink);
  margin-bottom: 18px;
}
.section-sub {
  font-size: 18px; color: var(--ink-mid); line-height: 1.75;
  max-width: 600px;
}
.section-sub.wide { max-width: 780px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block; font-weight: 700; font-size: 16px;
  padding: 14px 32px; border-radius: var(--radius);
  transition: all .2s; cursor: pointer; border: none;
  font-family: var(--sans);
}
.btn-gold  { background: var(--gold); color: var(--ink); }
.btn-gold:hover  { background: var(--gold-light); color: var(--ink); transform: translateY(-1px); }
.btn-blue  { background: var(--blue); color: var(--white); }
.btn-blue:hover  { background: var(--blue-dark); color: var(--white); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: var(--white); color: var(--white); }
.btn-outline-blue { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline-blue:hover { background: var(--blue); color: var(--white); }

/* ---- NAV ---- */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 2px 12px rgba(27,58,140,.08);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 68px;
}
.nav-logo {
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  color: var(--blue); letter-spacing: -.3px;
}
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-mid);
  letter-spacing: .2px;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a.active { color: var(--blue); font-weight: 600; }
.nav-cta {
  background: var(--blue) !important; color: var(--white) !important;
  padding: 9px 22px; border-radius: var(--radius-sm);
  font-weight: 600 !important; font-size: 14px !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; color: var(--white) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { width: 24px; height: 2px; background: var(--blue); border-radius: 2px; transition: all .2s; }

/* ---- PAGE HEADER ---- */
.page-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white); padding: 72px 0 64px; position: relative; overflow: hidden;
}
.page-header::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
}
.page-header .eyebrow { color: rgba(255,255,255,.6); }
.page-header .section-title { color: var(--white); margin-bottom: 14px; }
.page-header p { font-size: 19px; color: rgba(255,255,255,.82); max-width: 580px; line-height: 1.7; }

/* ---- SECTIONS ---- */
section { padding: 80px 0; }
.section-bg    { background: var(--off-white); }
.section-blue  { background: var(--blue); color: var(--white); }
.section-gold  { background: var(--gold-pale); }
.section-blue .section-title  { color: var(--white); }
.section-blue .section-sub    { color: rgba(255,255,255,.8); }
.section-blue .eyebrow        { color: var(--gold); }

/* ---- CARDS ---- */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 32px;
  transition: box-shadow .25s, transform .25s;
  border: 1px solid var(--border);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 28px; }

/* ---- PILLAR CARDS ---- */
.pillar-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--blue-pale); display: flex; align-items: center;
  justify-content: center; font-size: 26px; margin-bottom: 20px;
}
.pillar-title {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  color: var(--blue); margin-bottom: 10px;
}
.pillar-text { color: var(--ink-mid); line-height: 1.75; font-size: 16px; }
.pillar-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--blue); font-weight: 600; font-size: 15px; }
.pillar-link:hover { color: var(--gold); }
.pillar-link::after { content: '→'; }

/* ---- DIMENSION WHEEL (7 areas) ---- */
.dim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 40px; }
.dim-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
  transition: background .2s, transform .2s;
}
.dim-card:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
.dim-icon { font-size: 32px; margin-bottom: 12px; display: block; }
.dim-title { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--white); margin-bottom: 8px; }
.dim-text  { font-size: 14px; color: rgba(255,255,255,.72); line-height: 1.6; }

/* ---- QUOTE ---- */
.blockquote {
  border-left: 4px solid var(--gold); padding: 24px 32px;
  background: var(--blue-pale); border-radius: 0 var(--radius) var(--radius) 0;
  margin: 36px 0;
}
.blockquote p { font-family: var(--serif); font-size: 22px; color: var(--ink); line-height: 1.6; font-style: italic; }
.blockquote cite { display: block; font-size: 14px; color: var(--ink-light); margin-top: 12px; font-weight: 600; font-style: normal; letter-spacing: .5px; }

/* ---- ABOUT STRIP ---- */
.about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.about-img {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4; background: var(--blue-pale); position: relative;
}
.about-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.about-img-placeholder {
  width: 100%; height: 100%; min-height: 420px;
  background: linear-gradient(160deg, var(--blue-pale) 0%, var(--border) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; color: var(--blue);
}
.about-text { }
.about-text p { color: var(--ink-mid); line-height: 1.8; margin-bottom: 18px; }
.about-text p em { color: var(--ink); font-style: italic; }
.about-text p strong { color: var(--blue); }
.about-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.stat { }
.stat-num { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--blue); display: block; }
.stat-label { font-size: 13px; color: var(--ink-light); margin-top: 2px; }

/* ---- BOOK CARDS ---- */
.book-card {
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 28px;
  border: 1px solid var(--border);
  transition: box-shadow .25s, transform .25s;
}
.book-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.book-cover {
  min-width: 90px; width: 90px; height: 128px;
  border-radius: 5px; box-shadow: 3px 3px 12px rgba(0,0,0,.2);
  flex-shrink: 0; overflow: hidden; background: #1B3A8C;
}
.book-cover a { display: block; width: 100%; height: 100%; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-info { flex: 1; }
.book-title  { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.book-author { font-size: 14px; color: var(--ink-light); margin-bottom: 12px; font-weight: 500; }
.book-synopsis { font-size: 15px; color: var(--ink-mid); line-height: 1.7; margin-bottom: 12px; }
.book-takeaway { font-size: 15px; color: var(--ink); line-height: 1.65; border-left: 3px solid var(--gold); padding-left: 14px; margin-bottom: 14px; font-style: italic; }
.book-dave { font-size: 14px; color: var(--ink-mid); font-style: italic; line-height: 1.65; }
.book-dave strong { color: var(--blue); font-style: normal; }
.book-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 12px; border-radius: 20px; letter-spacing: .4px;
}
.tag-blue  { background: var(--blue-pale); color: var(--blue); }
.tag-gold  { background: var(--gold-pale); color: #8a6a00; }
.book-rating { display: flex; gap: 3px; margin-top: 10px; }
.book-rating span { color: var(--gold); font-size: 16px; }

/* ---- BLOG CARDS ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.blog-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  background: var(--white); border: 1px solid var(--border);
  transition: box-shadow .25s, transform .25s;
}
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.blog-card-img { height: 190px; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.blog-card-body { padding: 26px; }
.blog-tag { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 8px; }
.blog-card-title { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-bottom: 10px; line-height: 1.3; color: var(--ink); }
.blog-card-excerpt { font-size: 15px; color: var(--ink-mid); line-height: 1.65; }
.blog-read-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 16px; color: var(--blue); font-weight: 600; font-size: 14px; }
.blog-read-more::after { content: '→'; }
.blog-date { font-size: 12px; color: var(--ink-light); margin-top: 12px; display: block; }

/* ---- CTA BAND ---- */
.cta-band { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: var(--white); padding: 72px 0; text-align: center; }
.cta-band .section-title { color: var(--white); margin-bottom: 16px; }
.cta-band p { font-size: 19px; color: rgba(255,255,255,.82); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }

/* ---- CONTACT FORM ---- */
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; color: var(--ink); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  transition: border-color .2s; outline: none; background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--blue); }
.form-group textarea { min-height: 150px; resize: vertical; }

/* ---- FOOTER ---- */
footer { background: var(--ink); color: rgba(255,255,255,.68); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-logo { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--white); margin-bottom: 14px; display: block; }
.footer-logo span { color: var(--gold); }
.footer-tagline { font-size: 14px; line-height: 1.75; max-width: 260px; margin-bottom: 24px; }
.footer-heading { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--white); margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,.56); font-size: 14px; }
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.09); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; transition: background .2s;
}
.footer-social a:hover { background: var(--gold); color: var(--ink); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .about-strip { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid  { grid-template-columns: 1fr 1fr; gap: 36px; }
  .book-card { flex-direction: column; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  section { padding: 56px 0; }
  .about-stats { gap: 20px; }
  .btn { padding: 12px 24px; }
}
