/* ==========================================================================
   Dalil Consult — style.css
   Teal/cyan accent with dark base. "Dalil" = guide. Teal = navigation/clarity.
   DM Sans. Glassmorphism + glow + scroll reveal.
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  /* Primary (Dark Slate) */
  --primary-900: hsl(185, 25%, 8%);
  --primary-800: hsl(185, 25%, 12%);
  --primary-700: hsl(185, 20%, 18%);
  --primary-600: hsl(185, 15%, 25%);
  --primary-500: hsl(185, 12%, 32%);
  --primary-400: hsl(185, 10%, 42%);
  --primary-300: hsl(185, 8%, 52%);
  --primary-200: hsl(185, 10%, 70%);
  --primary-100: hsl(185, 12%, 88%);
  --primary-50:  hsl(185, 15%, 96%);

  /* Accent (Teal/Cyan) */
  --accent-700: hsl(180, 55%, 28%);
  --accent-600: hsl(180, 55%, 36%);
  --accent-500: hsl(180, 60%, 44%);
  --accent-400: hsl(180, 55%, 52%);
  --accent-300: hsl(180, 50%, 62%);
  --accent-200: hsl(180, 45%, 75%);
  --accent-100: hsl(180, 40%, 88%);
  --accent-50:  hsl(180, 40%, 97%);

  /* Grey (Cool-tinted) */
  --grey-900: hsl(185, 10%, 15%);
  --grey-800: hsl(185, 8%, 25%);
  --grey-700: hsl(185, 6%, 35%);
  --grey-600: hsl(185, 6%, 45%);
  --grey-500: hsl(185, 6%, 55%);
  --grey-400: hsl(185, 6%, 68%);
  --grey-300: hsl(185, 8%, 80%);
  --grey-200: hsl(185, 10%, 90%);
  --grey-100: hsl(185, 12%, 95%);
  --grey-50:  hsl(185, 12%, 98%);

  /* Semantic */
  --color-bg:         #ffffff;
  --color-bg-alt:     var(--grey-100);
  --color-text:       var(--grey-900);
  --color-text-muted: var(--grey-600);
  --color-border:     var(--grey-300);
  --color-error:      hsl(0, 70%, 55%);
  --color-error-bg:   hsl(0, 70%, 97%);
  --color-success:    hsl(145, 50%, 38%);

  /* Type Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3rem;
  --text-5xl:  3.5rem;

  /* Spacing Scale */
  --space-1:  0.5rem;
  --space-2:  1rem;
  --space-3:  1.5rem;
  --space-4:  2rem;
  --space-5:  2.5rem;
  --space-6:  3rem;
  --space-7:  3.5rem;
  --space-8:  4rem;
  --space-10: 5rem;
  --space-12: 6rem;
  --space-16: 8rem;

  /* Layout */
  --max-width:   1100px;
  --content-max: 65ch;
  --radius:      2px;
  --radius-lg:   6px;

  /* Shadows */
  --shadow-sm: 0 1px 2px hsla(185, 25%, 10%, 0.05), 0 1px 3px hsla(185, 25%, 10%, 0.08);
  --shadow-md: 0 4px 6px hsla(185, 25%, 10%, 0.06), 0 2px 4px hsla(185, 25%, 10%, 0.04);
  --shadow-lg: 0 10px 25px hsla(185, 25%, 10%, 0.08), 0 4px 10px hsla(185, 25%, 10%, 0.05);

  /* Glow */
  --glow-accent: 0 4px 24px hsla(180, 60%, 44%, 0.2);
  --glow-accent-intense: 0 4px 32px hsla(180, 60%, 44%, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base); font-weight: 400; line-height: 1.65;
  color: var(--color-text); background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-600); text-decoration: none; }
a:hover { color: var(--accent-700); text-decoration: underline; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; color: var(--primary-700);
}
h1 { font-size: clamp(2.25rem, 5vw + 1rem, 4rem); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
p { max-width: var(--content-max); }

/* ---------- Layout ---------- */
.grove-container { width: 100%; max-width: var(--max-width); margin-left: auto; margin-right: auto; padding-left: var(--space-4); padding-right: var(--space-4); }
.grove-section { padding-top: var(--space-10); padding-bottom: var(--space-10); position: relative; overflow: hidden; }
.grove-section-alt { background-color: var(--color-bg-alt); }

/* ---------- Scroll Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

/* ---------- Gradient Dividers ---------- */
.section-divider { height: 1px; border: none; background: linear-gradient(90deg, transparent, var(--accent-300), transparent); max-width: 200px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.diagnostic-button {
  display: inline-block; font-family: 'DM Sans', sans-serif; font-size: var(--text-base);
  font-weight: 600; line-height: 1; color: #ffffff; background-color: var(--accent-500);
  border: 2px solid var(--accent-500); border-radius: var(--radius); padding: var(--space-2) var(--space-4);
  min-height: 48px; cursor: pointer; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center; box-shadow: var(--glow-accent); position: relative;
}
.diagnostic-button:hover { background-color: var(--accent-600); border-color: var(--accent-600); text-decoration: none; color: #ffffff; transform: translateY(-2px); box-shadow: var(--glow-accent-intense); }
.diagnostic-button:active { background-color: var(--accent-700); border-color: var(--accent-700); transform: translateY(0) scale(0.98); box-shadow: var(--glow-accent); }
.diagnostic-button-outline { color: var(--accent-500); background-color: transparent; border: 2px solid var(--accent-500); box-shadow: none; }
.diagnostic-button-outline:hover { background-color: var(--accent-500); color: #ffffff; box-shadow: var(--glow-accent); }

/* ---------- Section Transition Hooks ---------- */
.section-transition { text-align: center; padding: var(--space-5) var(--space-4); font-style: italic; font-size: var(--text-lg); color: var(--primary-400); max-width: var(--content-max); margin: 0 auto; }

/* ---------- Section Rule ---------- */
.section-rule { height: 1px; border: none; background: linear-gradient(90deg, transparent, var(--accent-300), transparent); max-width: 200px; margin: var(--space-4) auto; }

/* ==========================================================================
   1. HERO
   ========================================================================== */
.diagnostic-hero { text-align: center; padding: var(--space-16) var(--space-4) var(--space-10); background-color: var(--primary-800); position: relative; overflow: hidden; }
.diagnostic-hero::before { content: ''; position: absolute; top: -20%; right: -10%; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, hsla(180, 60%, 44%, 0.12) 0%, transparent 70%); pointer-events: none; }
.diagnostic-hero::after { content: ''; position: absolute; bottom: -30%; left: -15%; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, hsla(185, 50%, 35%, 0.12) 0%, transparent 70%); pointer-events: none; }
.hero-dot-grid { position: absolute; inset: 0; background-image: radial-gradient(circle, hsla(180, 55%, 60%, 0.15) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%); pointer-events: none; }
.diagnostic-hero .grove-container { position: relative; z-index: 1; }
.diagnostic-hero h1 { max-width: 800px; margin: 0 auto var(--space-3); letter-spacing: -0.03em; color: #ffffff; background: linear-gradient(180deg, hsla(0, 0%, 100%, 1) 30%, hsla(180, 30%, 85%, 0.85) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.diagnostic-hero-sub { max-width: var(--content-max); margin: 0 auto var(--space-5); font-size: var(--text-lg); color: hsla(180, 20%, 80%, 0.8); line-height: 1.6; }
.diagnostic-hero .diagnostic-button { box-shadow: 0 4px 32px hsla(180, 60%, 44%, 0.35), 0 0 0 1px hsla(180, 60%, 44%, 0.1); }
.diagnostic-hero .diagnostic-button:hover { box-shadow: 0 8px 40px hsla(180, 60%, 44%, 0.5), 0 0 0 1px hsla(180, 60%, 44%, 0.2); }

/* ==========================================================================
   2. STAKES
   ========================================================================== */
.stakes-section { background-color: hsl(0, 40%, 98%); position: relative; }
.stakes-section::before { content: ''; position: absolute; top: -60px; right: -80px; width: 200px; height: 200px; border-radius: 50%; background: hsla(0, 40%, 60%, 0.04); pointer-events: none; }
.stakes-content { max-width: var(--content-max); margin: 0 auto; font-size: var(--text-base); line-height: 1.7; color: var(--grey-800); }

/* ==========================================================================
   3. VALUE PROP
   ========================================================================== */
.value-prop-section { background-color: var(--accent-50); position: relative; }
.value-prop-section::before { content: ''; position: absolute; bottom: -40px; left: -60px; width: 180px; height: 180px; border-radius: 50%; background: hsla(180, 60%, 44%, 0.05); pointer-events: none; }
.value-prop-heading { text-align: center; margin-bottom: var(--space-6); }
.audit-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.audit-card { border: none; border-radius: var(--radius-lg); padding: var(--space-4); background: hsla(0, 0%, 100%, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); border-top: 4px solid var(--accent-500); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease; position: relative; }
.audit-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.audit-card-number { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius); background-color: var(--primary-700); color: #ffffff; font-weight: 700; font-size: var(--text-sm); margin-bottom: var(--space-2); }
.audit-card h3 { margin-bottom: var(--space-1); color: var(--primary-700); }
.audit-card p { color: var(--grey-700); font-size: var(--text-base); line-height: 1.6; }

/* ==========================================================================
   4. ABOUT
   ========================================================================== */
.about-section { background-color: #ffffff; }
.about-content { max-width: var(--content-max); margin: 0 auto; }
.about-content h2 { margin-bottom: var(--space-4); }
.about-text { color: var(--grey-800); line-height: 1.7; }

/* ==========================================================================
   5. PROCESS
   ========================================================================== */
.process-section { background-color: var(--grey-50); position: relative; }
.process-dot-pattern { position: absolute; inset: 0; background-image: radial-gradient(circle, var(--grey-300) 0.8px, transparent 0.8px); background-size: 24px 24px; opacity: 0.4; -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 10%, transparent 70%); mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 10%, transparent 70%); pointer-events: none; }
.process-section .grove-container { position: relative; z-index: 1; }
.process-heading { text-align: center; margin-bottom: var(--space-6); }
.process-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); max-width: 960px; margin: 0 auto; }
.process-step { text-align: center; padding: var(--space-4) var(--space-3); background: hsla(0, 0%, 100%, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease; }
.process-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.process-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--radius-lg); border: 2px solid var(--accent-500); margin-bottom: var(--space-3); background: hsla(180, 60%, 44%, 0.05); }
.process-step-icon svg { width: 24px; height: 24px; stroke: var(--accent-500); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.process-step-number { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--accent-600); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-1); }
.process-step h3 { margin-bottom: var(--space-1); }
.process-step p { color: var(--grey-700); font-size: var(--text-base); line-height: 1.6; margin: 0 auto; }

/* ==========================================================================
   6. PROOF
   ========================================================================== */
.proof-section { background-color: #ffffff; position: relative; }
.proof-section::after { content: ''; position: absolute; top: 20%; right: -60px; width: 160px; height: 160px; border-radius: 50%; background: hsla(180, 60%, 44%, 0.04); pointer-events: none; }
.proof-heading { text-align: center; margin-bottom: var(--space-6); }
.proof-narratives { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); max-width: 960px; margin: 0 auto; position: relative; z-index: 1; }
.proof-narrative { border-left: 4px solid var(--accent-500); padding: var(--space-4); background-color: var(--grey-50); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease; }
.proof-narrative:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.proof-narrative p { color: var(--grey-800); line-height: 1.7; font-size: var(--text-base); }
.proof-result { display: block; margin-top: var(--space-2); font-weight: 600; color: var(--primary-700); }
.proof-testimonial { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--grey-200); font-style: italic; font-size: var(--text-base); color: var(--grey-700); line-height: 1.6; }
.proof-testimonial cite { display: block; margin-top: var(--space-1); font-style: normal; font-weight: 600; font-size: var(--text-sm); color: var(--primary-600); }

/* ==========================================================================
   7. LEAD MAGNET
   ========================================================================== */
.lead-magnet-section { background-color: var(--accent-50); position: relative; }
.lead-magnet-section::before { content: ''; position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: 300px; height: 300px; border-radius: 50%; background: hsla(180, 60%, 44%, 0.04); pointer-events: none; }
.lead-magnet-content { max-width: 640px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.lead-magnet-content h2 { margin-bottom: var(--space-3); }
.lead-magnet-text { color: var(--grey-700); margin: 0 auto var(--space-5); line-height: 1.7; }
.lead-magnet-form { display: flex; gap: var(--space-2); max-width: 480px; margin: 0 auto; }
.lead-magnet-form .form-input { flex: 1; }

/* ==========================================================================
   8. FINAL CTA
   ========================================================================== */
.final-cta-section { background-color: var(--primary-800); color: #ffffff; text-align: center; position: relative; overflow: hidden; }
.final-cta-section::before { content: ''; position: absolute; top: -30%; left: 50%; transform: translateX(-50%); width: 700px; height: 500px; border-radius: 50%; background: radial-gradient(circle, hsla(180, 60%, 44%, 0.1) 0%, transparent 70%); pointer-events: none; }
.final-cta-section .grove-container { position: relative; z-index: 1; }
.final-cta-section h2 { color: #ffffff; margin-bottom: var(--space-4); }
.final-cta-loss { font-size: var(--text-base); color: hsla(0, 0%, 100%, 0.7); max-width: var(--content-max); margin: 0 auto var(--space-5); font-style: italic; }
.final-cta-form { max-width: 520px; margin: 0 auto var(--space-3); }
.final-cta-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-2); }
.final-cta-form .form-row-full { margin-bottom: var(--space-3); }
.final-cta-reassurance { font-size: var(--text-sm); color: hsla(0, 0%, 100%, 0.6); margin-top: var(--space-2); }
.final-cta-section .diagnostic-button { background-color: var(--accent-500); border-color: var(--accent-500); width: 100%; box-shadow: 0 4px 32px hsla(180, 60%, 44%, 0.35); }
.final-cta-section .diagnostic-button:hover { background-color: var(--accent-400); border-color: var(--accent-400); box-shadow: 0 8px 40px hsla(180, 60%, 44%, 0.5); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-input { font-family: 'DM Sans', sans-serif; font-size: var(--text-base); line-height: 1.4; color: var(--color-text); background-color: #ffffff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-1) var(--space-2); min-height: 48px; width: 100%; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form-input::placeholder { color: var(--grey-400); }
.form-input:focus { outline: none; border-color: var(--accent-500); box-shadow: 0 0 0 3px hsla(180, 60%, 44%, 0.2); }
.form-input-error { border-color: var(--color-error); }
.form-input-error:focus { border-color: var(--color-error); box-shadow: 0 0 0 3px hsla(0, 70%, 55%, 0.2); }
.form-error-message { font-size: var(--text-sm); color: var(--color-error); margin-top: 4px; display: none; }
.form-field { position: relative; }
.form-field.has-error .form-error-message { display: block; }
.form-success { display: none; padding: var(--space-3); text-align: center; font-size: var(--text-base); }
.form-success.is-visible { display: block; }
.final-cta-section .form-success { color: hsla(0, 0%, 100%, 0.9); }
.final-cta-section .form-input { background-color: hsla(0, 0%, 100%, 0.08); border-color: hsla(0, 0%, 100%, 0.15); color: #ffffff; }
.final-cta-section .form-input::placeholder { color: hsla(0, 0%, 100%, 0.4); }
.final-cta-section .form-input:focus { border-color: var(--accent-400); box-shadow: 0 0 0 3px hsla(180, 60%, 44%, 0.25); background-color: hsla(0, 0%, 100%, 0.12); }

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.grove-footer { background-color: var(--primary-900); color: var(--grey-400); padding: var(--space-6) var(--space-4); font-size: var(--text-sm); border-top: 1px solid hsla(185, 25%, 18%, 0.5); }
.footer-content { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.footer-brand { font-weight: 700; color: var(--grey-200); font-size: var(--text-base); margin-bottom: var(--space-1); letter-spacing: -0.02em; }
.footer-details { line-height: 1.8; }
.footer-links a { color: var(--grey-400); transition: color 0.2s ease; }
.footer-links a:hover { color: #ffffff; }
.footer-copyright { text-align: right; line-height: 1.8; }

/* ==========================================================================
   Sticky Mobile CTA Bar
   ========================================================================== */
.sticky-cta-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; height: 60px; background-color: hsla(185, 25%, 10%, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); align-items: center; justify-content: center; padding: 0 var(--space-2); box-shadow: 0 -2px 12px hsla(185, 25%, 8%, 0.25); }
.sticky-cta-bar .diagnostic-button { font-size: var(--text-sm); padding: var(--space-1) var(--space-3); min-height: 44px; flex: 1; max-width: 360px; }
.sticky-cta-dismiss { position: absolute; top: 4px; right: 8px; background: none; border: none; color: hsla(0, 0%, 100%, 0.6); font-size: var(--text-lg); cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; line-height: 1; transition: color 0.2s ease; }
.sticky-cta-dismiss:hover { color: #ffffff; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) { .grove-container { padding-left: var(--space-3); padding-right: var(--space-3); } }

@media (max-width: 768px) {
  .sticky-cta-bar { display: flex; }
  .sticky-cta-bar.is-hidden { display: none; }
  body { padding-bottom: 60px; }
  .grove-section { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .diagnostic-hero { padding-top: var(--space-10); padding-bottom: var(--space-6); }
  .diagnostic-hero::before { width: 300px; height: 300px; }
  .diagnostic-hero::after { width: 250px; height: 250px; }
  .audit-cards { grid-template-columns: 1fr; gap: var(--space-3); }
  .process-steps { grid-template-columns: 1fr; gap: var(--space-4); }
  .proof-narratives { grid-template-columns: 1fr; gap: var(--space-3); }
  .diagnostic-button { display: block; width: calc(100% - var(--space-4)); max-width: 480px; margin-left: auto; margin-right: auto; }
  .lead-magnet-form { flex-direction: column; }
  .lead-magnet-form .diagnostic-button { width: 100%; }
  .final-cta-form .form-row { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; text-align: center; gap: var(--space-3); }
  .footer-copyright { text-align: center; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .grove-section { padding-top: var(--space-6); padding-bottom: var(--space-6); }
  .diagnostic-hero { padding-top: var(--space-8); padding-bottom: var(--space-5); }
  .diagnostic-hero-sub { font-size: var(--text-base); }
  .diagnostic-hero::before { width: 200px; height: 200px; opacity: 0.8; }
  .diagnostic-hero::after { width: 160px; height: 160px; opacity: 0.8; }
  .audit-card, .process-step { backdrop-filter: none; -webkit-backdrop-filter: none; background: #ffffff; }
  .section-transition { font-size: var(--text-base); padding: var(--space-3) var(--space-2); }
  .grove-container { padding-left: var(--space-2); padding-right: var(--space-2); }
}
