/* CRI v2 Design System — Calm Health inspired */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --sage: #1e3530;
  --cream: #faf7f0;
  --gold: #c9a572;
  --dark-sage: #14241F;
  --mid-sage: #2a4640;
  --light-gold: #f0e6c8;
  --muted-gold: #a89770;
  --dim-gold: #c5b88c;
  --text-muted: #5a6e68;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --pink: rgba(212,83,126,0.5);
  --blue: rgba(55,138,221,0.5);
  --green: rgba(99,153,34,0.5);
  --pink-bg: rgba(212,83,126,0.10);
  --blue-bg: rgba(55,138,221,0.10);
  --green-bg: rgba(99,153,34,0.10);
  --radius-lg: 20px;
  --radius-sm: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--sage); background: var(--cream); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }

/* ── NAV ── */
.nav { display: flex; align-items: center; padding: 18px 40px; background: var(--cream); position: sticky; top: 0; z-index: 100; }
.nav-logo { display: flex; align-items: center; margin-right: 20px; }
.nav-logo-circle { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 500; font-size: 14px; color: var(--sage); background: var(--cream); position: relative; }
.nav-logo-circle:nth-child(2) { margin-left: -7px; z-index: 2; }
.nav-logo-circle:nth-child(3) { margin-left: -7px; z-index: 1; }
.nav-links { flex: 1; display: flex; justify-content: center; gap: 32px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--sage); }
.nav-links a.active { border-bottom: 1.5px solid var(--gold); padding-bottom: 3px; }
.nav-links a.nav-cta { background: var(--gold); color: var(--sage); padding: 5px 16px; border-radius: 40px; font-weight: 500; font-size: 14px; line-height: 1.4; }
.nav-toggle { display: none; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--sage); margin: 5px 0; }

/* ── PILLS / BUTTONS ── */
.pill { display: inline-block; padding: 14px 32px; border-radius: 40px; font-size: 14px; font-weight: 500; font-family: var(--sans); letter-spacing: 0.5px; cursor: pointer; transition: opacity 0.2s, transform 0.15s; border: none; }
.pill:hover { opacity: 0.9; transform: translateY(-1px); }
.pill-gold { background: var(--gold); color: var(--sage); }
.pill-sage { background: var(--sage); color: var(--cream); }
.pill-outline { background: transparent; border: 1.5px solid var(--sage); color: var(--sage); }
.pill-outline-w { background: transparent; border: 1.5px solid rgba(255,255,255,0.5); color: #fff; }
.pill-outline-w:hover { background: rgba(255,255,255,0.08); }
.pill-sm { padding: 10px 22px; font-size: 13px; }
.pill-block { display: block; width: 100%; text-align: center; }

/* ── ROUNDED CARDS ── */
.rc { border-radius: var(--radius-lg); }
.rc-sm { border-radius: var(--radius-sm); }
.card-sage { background: var(--sage); }
.card-white { background: #fff; }
.card-bordered { border: 1.5px solid rgba(201,165,114,0.25); }

/* ── SECTIONS ── */
.section-cream { background: var(--cream); padding: 64px 40px; }
.section-inset { padding: 12px 20px 48px; }
.section-inner { max-width: 720px; margin: 0 auto; }

/* ── HERO ── */
.hero-card { background: var(--sage); border-radius: var(--radius-lg); margin: 0 20px; padding: 64px 48px 56px; position: relative; min-height: 400px; }
.hero-content { max-width: 380px; }
.hero-content h1 { font-size: 36px; line-height: 1.22; color: var(--cream); margin-bottom: 20px; }
.hero-content p { font-size: 16px; line-height: 1.7; color: var(--dim-gold); margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-circles { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); }

/* ── HERO CIRCLE ANIMATION ── */
@keyframes dramatic-pop {
  0% { transform: scale(0) rotate(-8deg); opacity: 0; }
  40% { transform: scale(1.25) rotate(2deg); opacity: 1; }
  60% { transform: scale(0.92) rotate(-1deg); opacity: 1; }
  80% { transform: scale(1.06) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes pulse-glow { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: 0.4; } }
.hc-me { opacity: 0; animation: dramatic-pop 0.9s cubic-bezier(0.22,1.4,0.36,1) 0.6s forwards; }
.hc-you { opacity: 0; animation: dramatic-pop 0.9s cubic-bezier(0.22,1.4,0.36,1) 1.8s forwards; }
.hc-life { opacity: 0; animation: dramatic-pop 0.9s cubic-bezier(0.22,1.4,0.36,1) 3.0s forwards; }
.hc-me circle, .hc-you circle, .hc-life circle { animation: pulse-glow 3s ease-in-out infinite; animation-delay: 4s; }

/* ── MAP CIRCLE POP ── */
@keyframes pop-in { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fade-up { 0% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.cpop { opacity: 0; animation: pop-in 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.cfade { opacity: 0; animation: fade-up 0.5s ease forwards; }
@keyframes milestone-in { 0% { transform: translateY(16px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.ms-pop { opacity: 0; animation: milestone-in 0.6s ease forwards; }

/* ── LOOP STEPS POP ── */
.loop-pill { padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--cream); text-align: center; min-width: 100px; }
.loop-arrow { color: var(--gold); font-size: 16px; }

/* ── CIRCLE RINGS (MAP) ── */
.c-ring { width: 130px; height: 130px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; margin-bottom: 12px; }
.c-ring-me { background: var(--pink-bg); border: 2px solid var(--pink); }
.c-ring-you { background: var(--blue-bg); border: 2px solid var(--blue); }
.c-ring-life { background: var(--green-bg); border: 2px solid var(--green); }

/* ── RECOGNITION CARDS ── */
.recog-card { background: rgba(30,53,48,0.03); border-radius: var(--radius-sm); padding: 22px 24px; transition: background 0.2s; margin-bottom: 12px; }
.recog-card:hover { background: rgba(30,53,48,0.06); }
.recog-card p { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 18px; line-height: 1.55; color: var(--sage); }

/* ── CREDIBILITY GRID ── */
.cred-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; padding: 40px 28px 16px; }
.cred-card { background: #fff; border-radius: var(--radius-sm); padding: 22px; text-align: center; }
.cred-card h4 { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-bottom: 6px; }
.cred-card p { font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 14px; color: var(--sage); }

/* ── QUESTION STEPS ── */
.q-step { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; }
.q-num { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; font-size: 18px; flex-shrink: 0; }
.q-title { font-family: var(--serif); font-weight: 500; font-size: 16px; color: var(--sage); margin-bottom: 4px; }
.q-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.q-divider { height: 0.5px; background: rgba(30,53,48,0.1); margin-left: 56px; }
.q-label { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 56px; }
.q-label-line { height: 0.5px; flex: 1; }
.q-label-text { font-size: 11px; letter-spacing: 2px; font-weight: 500; }

/* ── DAY DOTS ── */
.day-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 13px; }
.day-filled { background: var(--gold); color: var(--sage); }
.day-outline { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); }

/* ── CREDENTIAL ROWS ── */
.cred-row { display: flex; gap: 24px; padding: 18px 0; border-top: 0.5px solid rgba(30,53,48,0.15); }
.cred-row:last-child { border-bottom: 0.5px solid rgba(30,53,48,0.15); }
.cred-label { font-size: 10px; letter-spacing: 2.5px; color: var(--text-muted); width: 110px; flex-shrink: 0; padding-top: 4px; text-transform: uppercase; }
.cred-value { font-family: var(--serif); font-weight: 500; font-size: 15px; line-height: 1.7; color: var(--sage); }

/* ── FORM ── */
.form-field { width: 100%; border: 1.5px solid rgba(201,165,114,0.25); border-radius: 10px; padding: 13px 16px; font-family: var(--serif); font-weight: 500; font-size: 15px; color: var(--cream); background: rgba(201,165,114,0.06); outline: none; margin-bottom: 16px; transition: border-color 0.2s; }
.form-field:focus { border-color: var(--gold); }
.form-field::placeholder { color: var(--muted-gold); font-style: italic; }
.form-label { font-size: 11px; letter-spacing: 1.5px; color: var(--muted-gold); text-transform: uppercase; margin-bottom: 6px; display: block; }
select.form-field { appearance: none; cursor: pointer; }
textarea.form-field { min-height: 110px; resize: vertical; }

/* ── EMAIL FORM (light bg) ── */
.email-form-dark { display: flex; max-width: 400px; margin: 0 auto; gap: 8px; }
.email-form-dark input { flex: 1; background: rgba(201,165,114,0.08); border: 1px solid rgba(201,165,114,0.25); border-radius: 40px; padding: 13px 20px; color: var(--cream); font-size: 14px; font-family: var(--sans); outline: none; }
.email-form-dark input::placeholder { color: var(--muted-gold); font-style: italic; }

/* ── PORTRAIT CIRCLES ── */
.portrait-circle { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(201,165,114,0.35); }

/* ── FOOTER ── */
.footer { padding: 40px; text-align: center; background: var(--cream); }
.footer-circles { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.footer-circle { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(201,165,114,0.5); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 500; font-size: 16px; color: var(--sage); }
.footer-circle:nth-child(2) { margin-left: -8px; }
.footer-circle:nth-child(3) { margin-left: -8px; }
.footer-sub { font-size: 9px; letter-spacing: 3px; color: var(--gold); margin-bottom: 16px; text-transform: uppercase; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--sage); }
.footer-copy { font-size: 11px; color: var(--muted-gold); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: var(--cream); padding: 24px; gap: 16px; border-bottom: 1px solid rgba(30,53,48,0.1); z-index: 99; }
  .nav-toggle { display: block; margin-left: auto; }
  
  /* Typography */
  h1, h1[style*="font-size"] { font-size: 26px !important; line-height: 1.25 !important; }
  h2, h2[style*="font-size"] { font-size: 21px !important; }
  
  /* Reduce section padding */
  section[style*="padding: 56px 40px"] { padding: 36px 16px !important; }
  section[style*="padding: 32px 40px"] { padding: 24px 16px !important; }
  section[style*="padding: 0 40px"] { padding: 0 16px !important; }
  section[style*="padding: 0 20px"] { padding: 0 12px !important; }
  section[style*="padding: 20px 28px"] { padding: 20px 16px !important; }
  section[style*="padding: 48px 28px"] { padding: 36px 16px !important; }
  
  /* Dark card padding */
  div[style*="padding: 56px 48px"] { padding: 32px 20px !important; }
  div[style*="padding: 52px 36px"] { padding: 32px 20px !important; }
  div[style*="padding: 52px 48px"] { padding: 32px 20px !important; }
  div[style*="padding: 48px 48px"] { padding: 28px 16px !important; }
  div[style*="padding: 48px 36px"] { padding: 28px 16px !important; }
  
  /* Hero: stack text above circles */
  section > div[style*="display: flex"][style*="align-items: center"] { flex-direction: column !important; align-items: stretch !important; }
  div[style*="max-width: 360px"],
  div[style*="max-width: 380px"],
  div[style*="max-width: 420px"] { max-width: 100% !important; }
  svg[aria-label*="Three Circles"] { width: 200px !important; height: 178px !important; margin: 20px auto 0 !important; display: block; }
  
  /* Credibility grid: single column */
  .cred-grid { grid-template-columns: 1fr; padding: 24px 16px 8px; }
  div[style*="grid-template-columns: 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  
  /* Coaching + book grids: single column */
  div[style*="grid-template-columns: 1fr 1fr;"] { grid-template-columns: 1fr !important; }
  
  /* Book inside grids: single column */
  div[style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: 1fr !important; }
  
  /* THREE CIRCLES MAP: stay in a row but smaller */
  div[style*="justify-content: center"][style*="gap: 24px"] { gap: 10px !important; }
  div[style*="justify-content: center"][style*="gap: 20px"] { gap: 10px !important; }
  .c-ring { width: 100px; height: 100px; padding: 8px; }
  .c-ring p { font-size: 9px !important; line-height: 1.3 !important; }
  .c-ring div[style*="letter-spacing"] { font-size: 10px !important; }
  div[style*="width: 160px"][style*="flex-direction: column"] { width: 110px !important; }
  div[style*="width: 150px"][style*="flex-direction: column"] { width: 110px !important; }
  
  /* IDBR loop pills: smaller */
  .loop-pill { padding: 8px 10px; font-size: 12px; min-width: auto; }
  .loop-arrow { font-size: 12px; }
  div[style*="justify-content: center"][style*="gap: 8px"] { gap: 4px !important; }
  div[style*="justify-content: center"][style*="gap: 6px"] { gap: 3px !important; }
  
  /* WISDOM CONVERGES cards: portraits above text on mobile */
  .portrait-circle { width: 32px !important; height: 32px !important; }
  div[style*="display: flex"][style*="gap: 14px"][style*="align-items: flex-start"] { flex-direction: column !important; }
  
  /* About page: bio portrait + text stacks */
  img[alt*="David Zulberg — author"][style*="width: 140px"] { width: 120px !important; margin: 0 auto 16px !important; display: block; }
  
  /* About page: books side by side but smaller */
  div[style*="display: flex"][style*="justify-content: center"][style*="gap: 28px"] { gap: 16px !important; }
  div[style*="width: 160px"][style*="text-align: center"] { width: 140px !important; }
  img[alt*="bestseller"] { max-width: 130px !important; }
  
  /* Book page: cover image centered */
  img[alt*="book cover"][style*="width: 160px"] { width: 140px !important; margin: 0 auto 16px !important; display: block; }
  div[style*="min-width: 240px"] { min-width: 0 !important; }
  
  /* Book page: color-coded blocks single column */
  div[style*="grid-template-columns: 1fr 1fr;"][style*="gap: 14px"] { grid-template-columns: 1fr !important; }
  
  /* Contact form: sidebar below */
  div[style*="max-width: 640px"] { flex-direction: column !important; }
  div[style*="max-width: 400px"] { max-width: 100% !important; }
  div[style*="width: 200px"][style*="flex-shrink: 0"] { width: 100% !important; }
  
  /* Credential rows stack */
  .cred-row { flex-direction: column; gap: 4px; }
  .cred-label { width: auto; }
  
  /* Day dots + twelve days grid */
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 28px"] { grid-template-columns: 1fr !important; }
  
  /* Q steps */
  .q-num { width: 34px; height: 34px; font-size: 16px; }
  .q-title { font-size: 15px; }
  .q-divider { margin-left: 50px; }
  .q-label { padding-left: 50px; }
  
  /* Stay close to work cards */
  div[style*="grid-template-columns: repeat(3, 1fr)"][style*="max-width: 540px"] { grid-template-columns: 1fr !important; }
  
  /* Footer */
  .footer { padding: 28px 16px; }
  .footer-links { gap: 16px; }
  
  /* Email form */
  .email-form-dark { flex-direction: column; }
  .email-form-dark input { width: 100%; }
  
  /* FORCE book/bio flex rows to stack on mobile (large gaps only) */
  div[style*="display: flex"][style*="gap: 32px"],
  div[style*="display: flex"][style*="gap: 28px"] { flex-direction: column !important; align-items: center !important; text-align: center !important; }
  
  /* Wisdom card internal layout: stack portraits above text */
  div[style*="gap: 14px"][style*="align-items: flex-start"] { flex-direction: column !important; }
  
  /* Book page hero: stack cover above text */
  header div[style*="display: flex"][style*="align-items: center"] { flex-direction: column !important; text-align: center !important; }
  div[style*="max-width: 620px"],
  div[style*="max-width: 600px"] { max-width: 100% !important; }
  img[style*="width: 160px"][style*="flex-shrink"] { margin: 0 auto 20px !important; }
  
  /* Prevent text overflow */
  h1, h2, h3, p { overflow-wrap: break-word; word-wrap: break-word; }
  
  /* Reduce gaps between sections */
  section + section { margin-top: 0 !important; }
  section[style*="padding: 0 12px 48px"] { padding-bottom: 24px !important; }
  section[style*="padding: 0 16px 48px"] { padding-bottom: 24px !important; }
  section[style*="padding: 0 12px 40px"] { padding-bottom: 20px !important; }
  section[style*="padding: 0 16px 40px"] { padding-bottom: 20px !important; }
  
  /* About page bio: always stack */
  div[style*="display: flex"][style*="align-items: start"] { flex-direction: column !important; align-items: center !important; text-align: center !important; }
  div[style*="display: flex"][style*="align-items: flex-start"] { flex-direction: column !important; }
  img[style*="aspect-ratio: 3/4"] { margin: 0 auto 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-me, .hc-you, .hc-life, .cpop, .cfade { animation: none; opacity: 1; }
}
