/* ============================================================
   DLYog Lab — "Calm Authority" Design Theme
   Audience: Investors, Special-needs Parents, Healthcare, Academia
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  --navy:        #1B3A5C;
  --navy-dark:   #132A43;
  --navy-light:  #EEF3F8;
  --teal:        #2A8B8B;
  --teal-light:  #E6F3F3;
  --teal-mid:    #B2D8D8;
  --bg:          #F8F9FA;
  --white:       #FFFFFF;
  --text:        #1C1C2E;
  --muted:       #5A6A7E;
  --border:      #D9E2EC;
  --shadow-sm:   0 1px 3px rgba(27,58,92,0.08);
  --shadow-md:   0 4px 12px rgba(27,58,92,0.10);
  --radius:      8px;
  --radius-lg:   12px;
}

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Lora:ital,wght@0,400;0,600;1,400&display=swap');

/* ---- Base Reset ---- */
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

/* ---- Navigation Overrides ---- */
.dlyog-nav {
  background: var(--white) !important;
  border-bottom: 2px solid var(--teal) !important;
  box-shadow: var(--shadow-sm) !important;
}

.dlyog-nav .brand-name {
  color: var(--navy) !important;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dlyog-nav a.nav-link {
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}
.dlyog-nav a.nav-link:hover {
  color: var(--teal) !important;
  background: var(--teal-light) !important;
}

.btn-contribute {
  background: var(--navy) !important;
  color: var(--white) !important;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 6px !important;
  padding: 8px 18px !important;
  transition: background 0.2s ease !important;
  border: none !important;
}
.btn-contribute:hover {
  background: var(--navy-dark) !important;
}

.dlyog-nav .mobile-menu-bg {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.dlyog-nav .mobile-nav-link {
  color: var(--text) !important;
}
.dlyog-nav .mobile-nav-link:hover {
  background: var(--teal-light) !important;
  color: var(--teal) !important;
}

.dlyog-nav .mobile-contribute {
  background: var(--navy) !important;
  color: var(--white) !important;
}

/* ---- Hero Sections ---- */
.hero-navy {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.hero-navy::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(42,139,139,0.12);
  pointer-events: none;
}
.hero-navy::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.hero-navy h1,
.hero-navy h2,
.hero-navy p {
  color: var(--white);
}

.hero-page {
  background: var(--navy);
}

/* ---- Buttons ---- */
.btn-primary-navy {
  background: var(--teal) !important;
  color: var(--white) !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  padding: 12px 28px !important;
  display: inline-block;
  transition: background 0.2s ease, transform 0.15s ease !important;
  border: none !important;
  text-decoration: none;
}
.btn-primary-navy:hover {
  background: #22757A !important;
  transform: translateY(-1px);
}

.btn-outline-navy {
  background: transparent !important;
  color: var(--navy) !important;
  border: 2px solid var(--navy) !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  padding: 10px 24px !important;
  display: inline-block;
  transition: background 0.2s ease, color 0.2s ease !important;
  text-decoration: none;
}
.btn-outline-navy:hover {
  background: var(--navy) !important;
  color: var(--white) !important;
}

/* ---- Cards ---- */
.card-clean {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card-clean:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-accent-left {
  border-left: 3px solid var(--teal) !important;
}

/* ---- Icon Circles ---- */
.icon-circle-navy {
  background: var(--navy) !important;
  background-image: none !important;
}
.icon-circle-teal {
  background: var(--teal) !important;
  background-image: none !important;
}
.icon-circle-green {
  background: #2E7D5E !important;
  background-image: none !important;
}

/* ---- Section Backgrounds ---- */
.section-bg-light {
  background: var(--bg) !important;
}
.section-bg-white {
  background: var(--white) !important;
}
.section-bg-teal-light {
  background: var(--teal-light) !important;
}

/* ---- Contact Section ---- */
.contact-section {
  background: var(--navy) !important;
}

/* ---- Text Color Helpers ---- */
.text-navy { color: var(--navy) !important; }
.text-teal { color: var(--teal) !important; }
.text-muted-custom { color: var(--muted) !important; }

/* ---- Research / Blog ---- */
.research-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease;
}
.research-card:hover {
  box-shadow: var(--shadow-md);
}

.research-card h2 {
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.5;
}

.research-card p {
  color: var(--muted);
  font-family: 'Lora', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.7;
}

.btn-read-paper {
  background: var(--navy) !important;
  color: var(--white) !important;
  border-radius: 6px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 6px 16px !important;
  transition: background 0.2s ease !important;
}
.btn-read-paper:hover {
  background: var(--teal) !important;
}

/* ---- Blog Cards ---- */
.blog-card-clean {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.blog-card-clean:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-card-header {
  background: var(--navy) !important;
  padding: 20px 24px !important;
}

.blog-card-header-teal {
  background: var(--teal) !important;
}

/* ---- Tag Pills ---- */
.tag-navy {
  background: var(--navy-light) !important;
  color: var(--navy) !important;
  border: 1px solid var(--teal-mid) !important;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
}

/* ---- Badges / Achievement Pills ---- */
.badge-achievement {
  background: var(--navy-light) !important;
  color: var(--navy) !important;
  border: 1px solid var(--teal-mid) !important;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 3px 10px;
}

/* ---- Achievement Link Buttons ---- */
.achievement-link {
  background: var(--teal-light) !important;
  color: var(--teal) !important;
  border: 1px solid var(--teal-mid) !important;
  border-radius: 6px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  transition: background 0.2s ease !important;
  text-decoration: none;
  display: block;
}
.achievement-link:hover {
  background: var(--teal) !important;
  color: var(--white) !important;
}

/* ---- Approach Cards (Build/Protect/Partner) ---- */
.approach-card {
  background: var(--navy-light) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.approach-card i { color: var(--teal) !important; }
.approach-card h4 { color: var(--navy) !important; }

/* ---- UN SDG Circles ---- */
.sdg-circle-3 { background: var(--teal-light) !important; }
.sdg-circle-3 span { color: var(--teal) !important; }
.sdg-circle-4 { background: var(--navy-light) !important; }
.sdg-circle-4 span { color: var(--navy) !important; }
.sdg-circle-10 { background: #EEF4EE !important; }
.sdg-circle-10 span { color: #2E7D5E !important; }

/* ---- Private AI Lab section ---- */
.lab-section {
  background: var(--navy-light) !important;
  border: 1px solid var(--teal-mid) !important;
}
.lab-card {
  background: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.lab-icon-green  { background: var(--teal-light) !important; }
.lab-icon-green i { color: var(--teal) !important; }
.lab-icon-blue   { background: var(--navy-light) !important; }
.lab-icon-blue i { color: var(--navy) !important; }
.lab-icon-purple { background: var(--teal-light) !important; }
.lab-icon-purple i { color: var(--teal) !important; }

/* ---- Footer ---- */
.dlyog-footer {
  background: var(--white) !important;
  border-top: 1px solid var(--border) !important;
}

/* ---- News Banner ---- */
.news-banner-bar {
  background: var(--navy) !important;
}
.news-banner-bar:hover {
  background: var(--navy-dark) !important;
}

/* ---- Podcast page ---- */
.podcast-hero { background: var(--navy) !important; }

/* ---- Inline purple overrides for Tailwind classes ---- */
.from-purple-600, .from-purple-500 { --tw-gradient-from: var(--navy) !important; }
.to-blue-600, .to-indigo-600, .to-indigo-500 { --tw-gradient-to: var(--teal) !important; }
.bg-purple-600 { background-color: var(--navy) !important; }
.bg-purple-500 { background-color: var(--navy) !important; }
.hover\:bg-purple-700:hover { background-color: var(--navy-dark) !important; }
.text-purple-600 { color: var(--teal) !important; }
.text-purple-800 { color: var(--navy) !important; }
.bg-purple-100 { background-color: var(--teal-light) !important; }
.text-purple-800 { color: var(--navy) !important; }
.bg-indigo-100 { background-color: var(--navy-light) !important; }
.text-indigo-800 { color: var(--navy) !important; }
.ring-purple-300 { --tw-ring-color: var(--teal-mid) !important; }
.hover\:bg-purple-50:hover { background-color: var(--teal-light) !important; }
.hover\:text-purple-700:hover { color: var(--teal) !important; }
.border-purple-500 { border-color: var(--teal) !important; }
.border-purple-200 { border-color: var(--teal-mid) !important; }
.from-purple-50 { --tw-gradient-from: var(--teal-light) !important; }
.to-indigo-50 { --tw-gradient-to: var(--navy-light) !important; }
.from-blue-50 { --tw-gradient-from: var(--navy-light) !important; }
.to-blue-100 { --tw-gradient-to: #D6E6F2 !important; }
.text-blue-600 { color: var(--teal) !important; }
.bg-blue-500 { background-color: var(--navy) !important; }
.hover\:bg-blue-600:hover { background-color: var(--navy-dark) !important; }
.bg-blue-100 { background-color: var(--navy-light) !important; }
.from-green-50 { --tw-gradient-from: #EEF8F3 !important; }
.to-green-100 { --tw-gradient-to: #D5EDDF !important; }
.text-green-600 { color: #2E7D5E !important; }
.bg-green-100 { background-color: #EEF8F3 !important; }
.hover\:bg-green-200:hover { background-color: #D5EDDF !important; }
.text-green-600 { color: #2E7D5E !important; }
.bg-green-500 { background-color: #2E7D5E !important; }
.from-green-500 { --tw-gradient-from: #2E7D5E !important; }
.to-emerald-500 { --tw-gradient-to: #259C6E !important; }
.text-red-600 { color: #C0392B !important; }
.bg-red-100 { background-color: #FDECEA !important; }
.hover\:bg-red-200:hover { background-color: #F5B7B1 !important; }

/* ---- Hero gradient override ---- */
.bg-gradient-to-r.from-purple-600.to-blue-600,
.bg-gradient-to-r.from-blue-600.to-indigo-700,
.bg-gradient-to-r.from-indigo-600.to-blue-600 {
  background: var(--navy) !important;
  background-image: none !important;
}

/* ---- About page contact gradient override ---- */
.bg-gradient-to-r.from-purple-500.to-blue-500 {
  background: var(--navy) !important;
  background-image: none !important;
}

/* ---- Wave-bg override (index hero) ---- */
.wave-bg {
  background: var(--navy) !important;
  background-image: none !important;
}
/* Dot-grid texture overlay for dark sections (XY.AI inspired) */
.dot-texture {
  position: relative;
}
.dot-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}
.dot-texture > * { position: relative; z-index: 1; }

/* ---- Trust Signal Strip (XY.AI inspired) ---- */
.trust-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.trust-badge i {
  color: var(--teal);
  font-size: 0.95rem;
}
.trust-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  display: inline-block;
}

/* ---- Stats Strip ---- */
.stats-strip {
  background: var(--navy);
  padding: 32px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.stat-item {
  text-align: center;
  color: var(--white);
}
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
}
.stat-accent {
  color: #9ED8D8;
}
.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.60);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: block;
}

/* ---- XY.AI-style Product Card ---- */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.product-card-header {
  background: var(--navy);
  padding: 20px 24px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-card-header.teal { background: var(--teal); }
.product-card-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.product-card-icon i { color: #fff; font-size: 1.1rem; }
.product-card-title {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}
.product-card-subtitle {
  color: rgba(255,255,255,0.72);
  font-size: 0.78rem;
  margin: 2px 0 0;
}
.product-card-body { padding: 20px 24px 24px; }

/* ---- Approach cards (XY.AI clean minimal) ---- */
.approach-card-xy {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
}
.approach-card-xy .icon-wrap {
  width: 40px; height: 40px;
  background: var(--teal-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.approach-card-xy .icon-wrap i { color: var(--teal); font-size: 1.1rem; }
.approach-card-xy h4 { color: var(--navy); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.approach-card-xy p { color: var(--muted); font-size: 0.875rem; line-height: 1.6; margin: 0; }

/* ---- Footer trust badges ---- */
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
}
.footer-badge i { color: var(--teal); font-size: 0.8rem; }

/* ---- Typography refinement for long-form ---- */
article p, .article-body p {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2D3748;
}

h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif;
}

/* ---- Subtle section dividers ---- */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ---- Mobile menu hamburger color ---- */
#navMenuButton:hover {
  color: var(--teal) !important;
  background: var(--teal-light) !important;
}


/* ============================================================
   MOBILE RESPONSIVE & PWA IMPROVEMENTS
   ============================================================ */

/* ---- Trust strip: horizontal scroll on very small screens ---- */
@media (max-width: 640px) {
  .trust-strip .container > div {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding: 0 16px 6px;
    gap: 10px;
    scrollbar-width: none;
  }
  .trust-strip .container > div::-webkit-scrollbar { display: none; }
  .trust-divider { display: none; }
  .trust-badge { white-space: nowrap; flex-shrink: 0; }
}

/* ---- Stats strip: tighter on mobile ---- */
@media (max-width: 640px) {
  .stats-strip { padding: 24px 0; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 0.7rem; }
}

/* ---- Hero: better padding on mobile ---- */
@media (max-width: 640px) {
  .wave-bg > div { padding: 56px 20px 60px !important; }
  .hero-eyebrow { font-size: 0.7rem; }
}

/* ---- Product cards: full-width comfortable on mobile ---- */
@media (max-width: 768px) {
  .product-card-header { padding: 16px 18px 14px !important; }
  .product-card-body { padding: 16px 18px 20px !important; }
  .product-card-title { font-size: 1rem; }
}

/* ---- Approach cards: single column on mobile ---- */
@media (max-width: 640px) {
  .approach-card-xy { padding: 18px; }
}

/* ---- Footer badges: wrap cleanly on mobile ---- */
@media (max-width: 640px) {
  .footer-badge { font-size: 0.68rem; padding: 4px 10px; }
}

/* ---- Nav: ensure logo text doesn't overflow on tiny screens ---- */
@media (max-width: 360px) {
  .brand-name { font-size: 1.3rem !important; }
}

/* ---- Policy pages: comfortable reading on mobile ---- */
@media (max-width: 640px) {
  .policy-container { border-radius: 0 !important; border-left: none !important; border-right: none !important; }
}

/* ---- Blog / research cards: touch-friendly ---- */
@media (max-width: 768px) {
  .blog-card-clean, .research-card, .product-card {
    border-radius: 8px !important;
  }
}

/* ---- Research page cards: padding on mobile ---- */
@media (max-width: 640px) {
  .space-y-6 > div { padding: 18px !important; }
}

/* ---- Contact section: padding on mobile ---- */
@media (max-width: 640px) {
  #contact { padding: 48px 0 !important; }
  #contact h2 { font-size: 1.8rem !important; }
}

/* ---- Section heading labels: mobile ---- */
@media (max-width: 640px) {
  #services h2, #services h3 { font-size: 1.5rem !important; }
}

/* ---- Decorative circles on hero: hide on small screens to avoid clipping ---- */
@media (max-width: 480px) {
  .wave-bg::before, .wave-bg::after { display: none; }
}

/* ---- UN SDG circles: smaller on mobile ---- */
@media (max-width: 640px) {
  .w-16.h-16 { width: 48px !important; height: 48px !important; }
}

/* ---- Ensure tap targets are at least 44px ---- */
.nav-link, .btn-contribute, .btn-primary-navy, .btn-outline-navy,
.mobile-nav-link, .mobile-contribute {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-link { min-height: unset; display: inline; } /* desktop links don't need block */

/* ---- Smooth scrolling for all anchors ---- */
html { scroll-behavior: smooth; }

/* ---- Prevent horizontal overflow on all pages ---- */
body { overflow-x: hidden; max-width: 100vw; }

/* ---- Better text rendering on mobile ---- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---- PWA standalone mode: adjust for status bar ---- */
@media (display-mode: standalone) {
  .dlyog-nav { padding-top: env(safe-area-inset-top); }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
