/* ═══════════════════════════════════════════════════════════
   TerraYield.ng — Master Stylesheet
   Design: Deep forest · Cream · Gold · Serif authority
   ═══════════════════════════════════════════════════════════ */

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

/* ── TOKENS ── */
:root {
  --forest:    #0D2B18;
  --forest-mid:#1A5C3A;
  --green:     #2E8B57;
  --leaf:      #52C97A;
  --gold:      #D4A017;
  --gold2:     #F5C518;
  --gold-light:#FDF3DC;
  --cream:     #F6EFE2;
  --cream-dark:#EAE0CC;
  --white:     #FFFFFF;
  --ink:       #1A1A18;
  --ink-mid:   #444440;
  --ink-light: #888882;
  --border:    rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.14);
  --font-d:    'Playfair Display', Georgia, serif;
  --font-b:    'DM Sans', system-ui, sans-serif;
  --font-m:    'DM Mono', 'Courier New', monospace;
  --radius:    6px;
  --radius-lg: 12px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --max-w:     1140px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: var(--font-d); line-height: 1.15; }
h1 { font-size: clamp(36px, 5.5vw, 72px); font-weight: 900; }
h2 { font-size: clamp(28px, 4vw, 52px); font-weight: 700; }
h3 { font-size: clamp(20px, 2.5vw, 32px); font-weight: 600; }
h4 { font-size: 20px; font-weight: 600; }
p  { color: var(--ink-mid); line-height: 1.75; }

.eyebrow {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}
.lead {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink-mid);
  font-weight: 300;
  line-height: 1.7;
  max-width: 680px;
}

/* ── LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-lg { padding: 128px 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-b); font-size: 15px; font-weight: 600;
  padding: 14px 32px; border-radius: var(--radius);
  transition: all 0.25s var(--ease); cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: var(--forest);
  box-shadow: 0 4px 16px rgba(201,146,42,0.35);
}
.btn-primary:hover {
  background: var(--gold2); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,146,42,0.45);
}
.btn-secondary {
  background: transparent; color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-secondary:hover { background: var(--forest); color: var(--white); transform: translateY(-2px); }
.btn-white {
  background: var(--white); color: var(--forest); font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-white:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn-ghost-white {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.35);
}
.btn-ghost-white:hover { border-color: white; background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn-lg { padding: 18px 40px; font-size: 17px; }
.btn-sm { padding: 10px 22px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ── BADGE ── */
.badge {
  display: inline-block;
  font-family: var(--font-m); font-size: 10px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px;
}
.badge-green  { background: rgba(46,139,87,0.1);  color: var(--forest-mid); border: 1px solid rgba(46,139,87,0.2); }
.badge-gold   { background: rgba(201,146,42,0.12); color: var(--gold);      border: 1px solid rgba(201,146,42,0.25); }
.badge-cream  { background: var(--cream);           color: var(--ink-mid);   border: 1px solid var(--border); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); }

/* ── SECTION HEADERS ── */
.section-header { max-width: 680px; }
.section-header.centered { text-align: center; margin: 0 auto; }
.section-header h2 { margin-top: 8px; margin-bottom: 20px; }
.section-header p  { font-size: 18px; }

/* ── GRID UTILITIES ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 0 32px;
  transition: all 0.35s var(--ease);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  border-bottom: 1px solid transparent;
  transition: all 0.35s;
}
.nav.scrolled {
  background: rgba(248, 242, 230, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.08);
}
.nav.scrolled .nav-inner { border-bottom-color: var(--border); }
.nav.dark-nav { background: rgba(13, 43, 24, 0.95); backdrop-filter: blur(20px); }
.nav.dark-nav .nav-link { color: rgba(255,255,255,0.8); }
.nav.dark-nav .nav-link:hover { color: var(--gold2); }
.nav.dark-nav.scrolled { background: rgba(13, 43, 24, 0.98); }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-d); font-size: 22px; font-weight: 700;
  color: var(--forest);
}
.nav.dark-nav .nav-logo { color: var(--white); }
.nav-logo-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--forest);
  display: flex; align-items: center; justify-content: center;
}
.nav.dark-nav .nav-logo-mark { background: var(--gold); }
.nav-logo-mark svg { width: 20px; height: 20px; fill: var(--white); }
.nav.dark-nav .nav-logo-mark svg { fill: var(--forest); }

.nav-links {
  display: flex; align-items: center; gap: 36px;
}
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: color 0.2s; position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transition: transform 0.25s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link:hover { color: var(--forest); }

.nav-cta { margin-left: 8px; }

/* Mobile nav */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 6px; cursor: pointer;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--forest); border-radius: 2px;
  transition: all 0.3s;
}
.nav.dark-nav .nav-hamburger span { background: var(--white); }

.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 800;
  background: var(--forest);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 36px;
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  font-family: var(--font-d); font-size: 32px; font-weight: 700;
  color: var(--white); transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--gold2); }
.mobile-nav-close {
  position: absolute; top: 24px; right: 24px;
  font-size: 28px; color: rgba(255,255,255,0.6); cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  background: var(--forest);
  color: rgba(255,255,255,0.7);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
}
.footer-brand-name {
  font-family: var(--font-d); font-size: 24px; font-weight: 700;
  color: var(--white); margin-bottom: 12px;
}
.footer-brand-desc { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.55); max-width: 300px; }
.footer-contact { margin-top: 24px; }
.footer-contact-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 8px;
}
.footer-contact-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }
.footer-contact-item a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-contact-item a:hover { color: var(--gold2); }

.footer-col h5 {
  font-family: var(--font-m); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold2); margin-bottom: 20px;
}
.footer-link {
  display: block; font-size: 14px; color: rgba(255,255,255,0.55);
  margin-bottom: 10px; transition: color 0.2s;
}
.footer-link:hover { color: var(--white); }

.footer-bottom {
  max-width: var(--max-w); margin: 0 auto; padding: 24px 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 56px;
  font-family: var(--font-m); font-size: 11px; color: rgba(255,255,255,0.3);
}
.footer-bottom a { color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--gold2); }

/* ═══════════════════════════════════════════════════════════
   WHATSAPP FLOAT BUTTON
   ═══════════════════════════════════════════════════════════ */
.wa-float {
  position: fixed; bottom: 32px; right: 32px; z-index: 800;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: all 0.25s var(--ease);
  animation: wa-pulse 3s 2s infinite;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,0.55); }
.wa-float svg { width: 30px; height: 30px; fill: white; }
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50%      { box-shadow: 0 4px 20px rgba(37,211,102,0.45), 0 0 0 10px rgba(37,211,102,0.12); }
}

/* ═══════════════════════════════════════════════════════════
   HERO VARIANTS
   ═══════════════════════════════════════════════════════════ */
.hero-dark {
  background: var(--forest);
  position: relative; overflow: hidden;
  min-height: 100vh;
  display: flex; align-items: center;
}
.hero-dark::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 55%, rgba(46,139,87,0.25) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(201,146,42,0.12) 0%, transparent 48%),
    radial-gradient(ellipse at 60% 90%, rgba(46,139,87,0.1) 0%, transparent 40%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-dark h1 { color: var(--white); }
.hero-dark .lead { color: rgba(255,255,255,0.62); max-width: 620px; }

.hero-page {
  background: var(--forest);
  padding: 140px 0 80px;
  position: relative; overflow: hidden;
}
.hero-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(46,139,87,0.2) 0%, transparent 55%);
}
.hero-page h1 { color: var(--white); font-size: clamp(32px, 4.5vw, 58px); }
.hero-page .lead { color: rgba(255,255,255,0.6); margin-top: 16px; }

/* ═══════════════════════════════════════════════════════════
   STAT BLOCKS
   ═══════════════════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.stat-item { background: var(--white); padding: 36px 28px; text-align: center; }
.stat-num  { font-family: var(--font-d); font-size: clamp(32px,4vw,52px); font-weight: 900; color: var(--forest); line-height: 1; }
.stat-label{ font-size: 13px; color: var(--ink-light); margin-top: 6px; letter-spacing: 0.5px; }
.stat-item.gold-stat .stat-num { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════════════════════ */
.testimonial-card { padding: 36px; }
.testimonial-quote { font-family: var(--font-d); font-size: 18px; font-style: italic; color: var(--ink); line-height: 1.65; margin-bottom: 24px; position: relative; padding-left: 24px; }
.testimonial-quote::before { content: '\201C'; position: absolute; left: 0; top: -8px; font-size: 48px; color: var(--gold); line-height: 1; font-style: normal; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--forest); display: flex; align-items: center; justify-content: center; font-family: var(--font-d); font-size: 18px; font-weight: 700; color: var(--white); flex-shrink: 0; }
.testimonial-name  { font-weight: 600; font-size: 15px; color: var(--ink); }
.testimonial-title { font-size: 13px; color: var(--ink-light); margin-top: 2px; }
.testimonial-stars { color: var(--gold); font-size: 14px; margin-bottom: 16px; }

/* ═══════════════════════════════════════════════════════════
   FEATURE ICONS
   ═══════════════════════════════════════════════════════════ */
.feature-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(13,43,24,0.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 18px;
  transition: background 0.25s;
}
.card:hover .feature-icon { background: rgba(13,43,24,0.12); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .container { padding: 0 24px; }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-lg { padding: 80px 0; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .wa-float { bottom: 20px; right: 20px; width: 52px; height: 52px; }
  .btn-lg { padding: 15px 28px; font-size: 16px; }
}


/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES
   Targets: phones (≤480px) and small tablets (≤768px)
   ═══════════════════════════════════════════════════════════════ */

/* ── Touch targets ── */
@media (max-width: 768px) {
  .btn { min-height: 44px; padding: 12px 24px; font-size: 15px; }
  .btn-sm { min-height: 40px; padding: 10px 18px; font-size: 14px; }
  .btn-lg { padding: 15px 28px; font-size: 16px; }

  /* ── Layout ── */
  .container { padding: 0 16px; }
  .section    { padding: 56px 0; }
  .section-sm { padding: 40px 0; }
  .section-lg { padding: 64px 0; }

  /* ── Hero padding fix ── */
  .hero-page  { padding: 100px 0 48px; }
  .hero-dark  { min-height: auto; padding: 100px 0 56px; }

  /* ── Typography scale-down ── */
  h1 { font-size: clamp(28px, 8vw, 44px); }
  h2 { font-size: clamp(24px, 6.5vw, 36px); }
  h3 { font-size: clamp(18px, 5vw, 26px); }
  .lead { font-size: 16px; }

  /* ── Grids collapse to single column ── */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  /* ── Nav ── */
  .nav { padding: 0 16px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { height: 60px; }

  /* ── WhatsApp float ── */
  .wa-float { bottom: 16px; right: 16px; width: 50px; height: 50px; }
  .wa-float svg { width: 26px; height: 26px; }

  /* ── Cards ── */
  .card { border-radius: 10px; }
  .testimonial-card { padding: 24px; }
  .testimonial-quote { font-size: 16px; }

  /* ── Footer ── */
  .footer { padding: 48px 0 0; }
  .footer-grid { padding: 0 16px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; padding: 20px 16px; }

  /* ── Tables: horizontal scroll ── */
  .compare-table-wrap, table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ── Sticky elements ── */
  .sticky-cta, .sticky-cta-dark { position: static; margin-top: 32px; }

  /* ── Form ── */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-input, .form-select, .form-textarea { font-size: 16px; } /* prevents iOS zoom */
}

/* ── Phones only ── */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .section    { padding: 44px 0; }

  h1 { font-size: clamp(26px, 8vw, 36px); line-height: 1.15; }
  h2 { font-size: clamp(22px, 7vw, 30px); }

  .stat-grid { grid-template-columns: 1fr 1fr; gap: 1px; }
  .stat-item { padding: 24px 16px; }
  .stat-num  { font-size: clamp(28px, 8vw, 40px); }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .hero-trust { flex-direction: column; gap: 6px; align-items: flex-start; }
  .hero-trust-dot { display: none; }

  .section-header h2 { font-size: clamp(22px, 7vw, 30px); }

  /* Pricing cards stack */
  .tier-grid, .retainer-grid { grid-template-columns: 1fr; }
  .pricing-card { border-radius: 12px; }

  /* Blueprint/Academy sticky sidebar */
  .sticky-cta, .sticky-cta-dark { padding: 20px; }

  /* Calculator */
  .calc-body { grid-template-columns: 1fr; }
  .calc-inputs { padding: 20px 16px; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.08); }
  .calc-results { padding: 20px 16px; }
  .total-loss-amount { font-size: 36px; }
  .breakdown-item { padding: 14px 16px; }

  /* PIMS ladder on products page */
  .pims-ladder::before { display: none; }
  .pims-stage { grid-template-columns: 56px 1fr; gap: 14px; }
  .pims-num { width: 56px; height: 56px; font-size: 22px; }

  /* Product cards */
  .product-grid { grid-template-columns: 1fr; }
  .tier-header { padding: 24px 20px; }
  .tier-body { padding: 0 20px 20px; }
  .tier-footer { padding: 16px 20px; }
  .tier-amount { font-size: 34px; }

  /* SOP card */
  .sop-top { grid-template-columns: 1fr; }

  /* About page */
  .about-hero-grid { grid-template-columns: 1fr; }
  .states-grid { grid-template-columns: repeat(2,1fr); }
  .timeline::before { display: none; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
  .tl-dot { display: none; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }
  .contact-method { padding: 18px; }

  /* Services */
  .grid-2 { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 1fr; gap: 8px; }
  .step-num { font-size: 36px; }

  /* Academy/Blueprint */
  .chapters-grid { grid-template-columns: 1fr; }
  .for-grid { grid-template-columns: 1fr; }
  .includes-grid { grid-template-columns: 1fr; }
  .sop-grid { grid-template-columns: 1fr 1fr; }

  /* ERP modules */
  .modules-grid { grid-template-columns: 1fr; }
  .rg-visual { grid-template-columns: 1fr 1fr; }

  /* Footer cleanup */
  .footer-brand-desc { font-size: 13px; }
  .footer-contact-item { font-size: 12px; }
}


/* ── MICRO-INTERACTIONS ── */
.btn { will-change: transform; }
.card { will-change: transform; }

/* Smooth link underlines */
a:not(.btn):not(.nav-link):not(.footer-link):not(.mobile-nav-link) {
  transition: opacity 0.2s;
}
a:not(.btn):not(.nav-link):not(.footer-link):not(.mobile-nav-link):hover {
  opacity: 0.8;
}

/* Footer links */
.footer-link {
  position: relative;
  transition: color 0.2s, padding-left 0.2s;
}
.footer-link:hover {
  color: var(--white) !important;
  padding-left: 6px;
}

/* Nav active underline polish */
.nav-link.active {
  color: var(--forest);
  font-weight: 600;
}

/* Testimonial card subtle left border on hover */
.testimonial-card:hover {
  border-left: 3px solid var(--gold);
  padding-left: calc(36px - 3px);
}

/* CTA band button pop */
.cta-band .btn:hover {
  letter-spacing: 0.3px;
}

/* Input focus ring color */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(46,139,87,0.12) !important;
}

/* Scroll reveal stagger helper */
.stagger > * { 
  opacity: 0; 
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger > *.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   WORLD-CLASS HOMEPAGE v2 — Controlled rhythm, true alignment
   ═══════════════════════════════════════════════════════════ */

/* ── Section rhythm tokens ── */
.ty-section { padding: clamp(56px, 9vw, 110px) 0; position: relative; }
.ty-section--tight { padding: clamp(40px, 6vw, 72px) 0; }
.ty-wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.ty-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Light family — these flow together with NO hard edges */
.ty-light  { background: var(--cream); color: var(--ink); }
.ty-white  { background: #FCFAF5; color: var(--ink); }
/* Soft transition between light sections — gradient, not a line */
.ty-light + .ty-white, .ty-white + .ty-light { border-top: none; }

/* The ONE dark punch section */
.ty-dark {
  background: var(--forest); color: #fff;
  position: relative; overflow: hidden;
}
.ty-dark::before {
  content:''; position:absolute; inset:0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(46,139,87,0.28) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 25%, rgba(212,160,23,0.14) 0%, transparent 50%);
  pointer-events:none;
}
.ty-dark > .ty-wrap { position: relative; z-index: 1; }

/* ── Section heading block (shared, aligned) ── */
.ty-head { max-width: 720px; margin: 0 0 clamp(32px,5vw,56px); }
.ty-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.ty-head .eyebrow { margin-bottom: 16px; }
.ty-head h2 { margin-bottom: 18px; letter-spacing: -0.02em; }
.ty-head p { font-size: clamp(16px,1.6vw,19px); color: var(--ink-mid); line-height: 1.7; }
.ty-dark .ty-head p { color: rgba(255,255,255,0.62); }

/* ── HERO v2 ── */
.tyhero {
  background: var(--forest); color: #fff;
  padding: clamp(96px,11vw,130px) 0 clamp(64px,8vw,100px);
  position: relative; overflow: hidden;
}
.tyhero::before {
  content:''; position:absolute; inset:0;
  background:
    radial-gradient(ellipse at 12% 55%, rgba(46,139,87,0.38) 0%, transparent 52%),
    radial-gradient(ellipse at 85% 18%, rgba(212,160,23,0.18) 0%, transparent 46%),
    radial-gradient(ellipse at 60% 92%, rgba(46,139,87,0.16) 0%, transparent 42%);
}
.tyhero::after {
  content:''; position:absolute; inset:0; opacity:0.22; mix-blend-mode:overlay; pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
.tyhero-inner { position: relative; z-index: 1; }
.tyhero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.tyhero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-m); font-size: 10px; letter-spacing: 1.5px;
  padding: 6px 14px; border-radius: 30px;
}
.tyhero-badge--leaf { background: rgba(82,201,122,0.12); border: 1px solid rgba(82,201,122,0.28); color: var(--leaf); }
.tyhero-badge--gold { background: rgba(212,160,23,0.12); border: 1px solid rgba(212,160,23,0.28); color: var(--gold2); }
.tyhero h1 {
  font-size: clamp(34px, 6vw, 76px); font-weight: 900; line-height: 1.06;
  letter-spacing: -0.025em; margin-bottom: 24px;
}
.tyhero h1 em { font-style: italic; color: var(--gold2); }
.tyhero .lead { color: rgba(255,255,255,0.72); max-width: 620px; font-size: clamp(17px,2vw,21px); }
.tyhero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; align-items: center; }
.tyhero-trust { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 32px; }
.tyhero-trust span { display: flex; align-items: center; gap: 7px; font-size: 13px; color: rgba(255,255,255,0.55); }
.tyhero-trust b { color: var(--leaf); font-weight: 700; }

/* ── Stat row (aligned grid, equal cells) ── */
.ty-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.1); border-radius: 14px; overflow: hidden; }
.ty-stat { background: rgba(0,0,0,0.18); padding: 28px 18px; text-align: center; }
.ty-stat-n { font-family: var(--font-d); font-size: clamp(30px,4vw,46px); font-weight: 900; color: var(--gold2); line-height: 1; }
.ty-stat-l { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-top: 8px; }

/* ── Equal-height feature grid ── */
.ty-grid { display: grid; gap: 24px; }
.ty-grid--2 { grid-template-columns: repeat(2,1fr); }
.ty-grid--3 { grid-template-columns: repeat(3,1fr); }
.ty-grid--4 { grid-template-columns: repeat(4,1fr); }

.ty-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 30px; display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.ty-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.ty-card-icon {
  width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 18px; background: rgba(46,139,87,0.1);
}
.ty-card h3 { font-size: 20px; margin-bottom: 10px; color: var(--forest); }
.ty-card p { font-size: 14px; color: var(--ink-mid); line-height: 1.65; flex: 1; }
.ty-card-link { margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--green); display: inline-flex; align-items: center; gap: 6px; }

/* ── Audience cards (consistent) ── */
.ty-aud { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: column; background:#fff; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.ty-aud:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.ty-aud-top { padding: 26px 24px 22px; }
.ty-aud-top h3 { color: #fff; font-size: 19px; }
.ty-aud-emoji { font-size: 30px; margin-bottom: 12px; }
.ty-aud-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }
.ty-aud-body p { font-size: 13.5px; color: var(--ink-mid); line-height: 1.6; margin-bottom: 14px; }
.ty-aud-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; flex: 1; }
.ty-aud-list li { font-size: 12.5px; color: var(--ink-light); display: flex; gap: 7px; }
.ty-aud-list li::before { content:'✓'; color: var(--green); font-weight: 700; }
.ty-aud-cta { font-size: 13px; font-weight: 700; color: var(--forest); border: 1px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; background: var(--cream); transition: all .2s; }
.ty-aud:hover .ty-aud-cta { background: var(--forest); color: #fff; }

/* ── ERP showcase (the dark punch) ── */
.ty-erp-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px,5vw,64px); align-items: center; }
.ty-erp-feats { display: flex; flex-direction: column; gap: 14px; margin: 26px 0 32px; }
.ty-erp-feat { display: flex; gap: 13px; align-items: flex-start; }
.ty-erp-feat-ic { width: 30px; height: 30px; border-radius: 8px; background: rgba(82,201,122,0.14); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ty-erp-feat-tx { font-size: 14px; color: rgba(255,255,255,0.72); line-height: 1.5; }
.ty-erp-feat-tx b { color: #fff; }

/* Dashboard mockup */
.ty-dash { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.4); }
.ty-dash-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.07); }
.ty-dash-dot { width: 10px; height: 10px; border-radius: 50%; }
.ty-dash-title { font-family: var(--font-m); font-size: 10px; color: rgba(255,255,255,0.35); margin-left: 8px; }
.ty-dash-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 14px; }
.ty-dash-kpi { border-radius: 8px; padding: 13px 10px; text-align: center; }
.ty-dash-kpi-l { font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 5px; }
.ty-dash-kpi-v { font-family: var(--font-d); font-size: 21px; font-weight: 700; }
.ty-dash-tbl { padding: 0 14px 14px; }
.ty-dash-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 50px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 11px; align-items: center; }
.ty-dash-hd { font-family: var(--font-m); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.3); }
.ty-dash-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 9px; font-weight: 700; }
.ty-dash-alert { background: rgba(192,57,43,0.18); border-top: 1px solid rgba(192,57,43,0.3); padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ty-dash-alert-t { font-size: 11px; color: rgba(255,107,107,0.85); font-style: italic; }
.ty-dash-alert-v { font-family: var(--font-d); font-size: 18px; font-weight: 700; color: var(--gold2); white-space: nowrap; }

/* ── PIMS ladder (clean horizontal) ── */
.ty-pims { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.ty-pims-step { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 22px 16px; text-align: center; text-decoration: none; transition: all .3s var(--ease); display: flex; flex-direction: column; }
.ty-pims-step:hover { background: rgba(255,255,255,0.1); transform: translateY(-4px); }
.ty-pims-step--gold { background: rgba(212,160,23,0.12); border-color: rgba(212,160,23,0.3); }
.ty-pims-num { font-family: var(--font-m); font-size: 9px; letter-spacing: 2px; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
.ty-pims-step--gold .ty-pims-num { color: var(--gold2); }
.ty-pims-emoji { font-size: 26px; margin-bottom: 10px; }
.ty-pims-name { font-family: var(--font-d); font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.ty-pims-desc { font-size: 11px; color: rgba(255,255,255,0.5); line-height: 1.5; flex: 1; }
.ty-pims-price { margin-top: 10px; font-family: var(--font-m); font-size: 10px; letter-spacing: 1px; color: var(--gold2); }

/* ── Lead capture band ── */
.ty-capture { background: linear-gradient(135deg, var(--forest), #0a1f12); border-radius: 18px; padding: clamp(32px,5vw,52px); position: relative; overflow: hidden; }
.ty-capture::before { content:''; position:absolute; inset:0; background: radial-gradient(ellipse at 80% 30%, rgba(212,160,23,0.16) 0%, transparent 55%); }
.ty-capture-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }

/* ── Final CTA ── */
.ty-finalcta { text-align: center; }
.ty-finalcta h2 { color: #fff; margin-bottom: 18px; }
.ty-finalcta p { color: rgba(255,255,255,0.6); max-width: 600px; margin: 0 auto 32px; font-size: 17px; }
.ty-finalcta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .ty-erp-grid { grid-template-columns: 1fr; }
  .ty-capture-inner { grid-template-columns: 1fr; gap: 28px; }
  .ty-pims { grid-template-columns: repeat(2,1fr); }
  .ty-grid--4 { grid-template-columns: repeat(2,1fr); }
  .ty-grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ty-stats { grid-template-columns: repeat(2,1fr); }
  .ty-grid--2, .ty-grid--4 { grid-template-columns: 1fr; }
  .ty-pims { grid-template-columns: 1fr; }
  .tyhero-actions { flex-direction: column; align-items: stretch; }
  .tyhero-actions .btn { width: 100%; justify-content: center; }
}

/* ── Seamless light-section blending (kills the "edge" between cream/white) ── */
.ty-light + .ty-white,
.ty-white + .ty-light { position: relative; }
/* Soft 1px feather using matching gradient at the seam */
.ty-section.ty-light, .ty-section.ty-white { transition: background 0.3s; }
/* Warm the white slightly so cream→white is barely perceptible */
.ty-white { background: #FBF8F1; }
/* The dark sections get a soft inner shadow at edges to feel intentional, not abrupt */
.ty-dark { box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), inset 0 -1px 0 rgba(255,255,255,0.04); }

/* ═══════════════════════════════════════════════════════════
   MOBILE REFINEMENT v3 — kill empty space, tighten text
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  /* Tighter side gutters so content uses the screen width */
  .ty-wrap { padding: 0 18px; }

  /* Section vertical rhythm — less air on small screens */
  .ty-section { padding: 44px 0; }
  .ty-section--tight { padding: 32px 0; }

  /* Hero: pull text up, reduce dead space */
  .tyhero { padding: 100px 0 56px; }
  .tyhero h1 { font-size: clamp(30px, 8.5vw, 40px); line-height: 1.1; }
  .tyhero .lead { font-size: 16px; }
  .tyhero-inner { max-width: 100%; }
  .tyhero-trust { gap: 6px 16px; }
  .tyhero-trust span { font-size: 12px; }

  /* Heading blocks: no oversized gaps */
  .ty-head { margin-bottom: 28px; }
  .ty-head h2 { font-size: clamp(24px, 6.5vw, 30px); line-height: 1.18; }
  .ty-head p { font-size: 15px; }

  /* Cards: tighter padding, full width, no side overflow */
  .ty-card { padding: 22px; }
  .ty-card h3 { font-size: 18px; }

  /* ERP showcase + proof grids: stack with no leftover gutter */
  .ty-erp-grid { gap: 28px; }
  .ty-dash-kpi-v { font-size: 18px; }
  .ty-dash-row { grid-template-columns: 1.6fr 1fr 0.8fr 0.8fr 40px; font-size: 10px; }

  /* Stats: 2x2 fills width evenly */
  .ty-stats { grid-template-columns: repeat(2,1fr); }
  .ty-stat { padding: 22px 12px; }

  /* Lead capture + final CTA: remove wide inner padding that caused empty bands */
  .ty-capture { padding: 26px 20px; border-radius: 14px; }
  .ty-capture-inner { gap: 22px; }
  .ty-finalcta p { font-size: 15px; }

  /* PIMS ladder cards full width, comfortable */
  .ty-pims { gap: 10px; }
  .ty-pims-step { padding: 18px 14px; }

  /* Buttons: full-width tap targets, no awkward centering gaps */
  .ty-finalcta-btns .btn,
  .ty-head--center .btn { width: 100%; justify-content: center; }
  .ty-head--center .btn { max-width: 420px; }

  /* Video embeds: keep 16:9, no side gaps */
  #proof .ty-grid--2 { gap: 18px; }
}

/* Tablet: prevent the "two columns too early" cramping */
@media (min-width: 641px) and (max-width: 900px) {
  .ty-wrap { padding: 0 28px; }
  .ty-erp-grid { gap: 32px; }
  .ty-head h2 { font-size: clamp(26px, 5vw, 34px); }
}


/* ── Hero 2-column balance (desktop) ── */
.tyhero-textcol { min-width: 0; }
.tyhero-visual { min-width: 0; }
@media (max-width: 900px) {
  .tyhero-inner { grid-template-columns: 1fr !important; gap: 36px !important; }
  .tyhero-visual { display: none; }
}
