/* e-NIOS site effects: motion, hover, decoration, phone menu */

/* Sticky, frosted menu */
.site-header { position: sticky; top: 0; z-index: 50; transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease; }
.site-header.scrolled {
  background: rgba(255, 255, 255, .72) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(15, 27, 45, .08);
  border-bottom-color: rgba(17, 88, 199, .12) !important;
}

/* Menu link underline */
.nav-link { position: relative; padding-bottom: 2px; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #1158C7, #38BDF8);
  transition: width .3s ease;
}
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link[aria-current="page"]::after { width: 100%; }

/* Hover lift on cards */
.lift { transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.lift:hover { transform: translateY(-4px); border-color: #7FA6E3 !important; box-shadow: 0 10px 32px rgba(17, 88, 199, .14); }

/* Buttons: lift, and glow on the primary ones */
.btn { transition: transform .2s ease, box-shadow .3s ease, background-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.glow { box-shadow: 0 0 18px rgba(17, 88, 199, .32), 0 0 36px rgba(56, 189, 248, .12); }
.glow:hover { box-shadow: 0 0 28px rgba(17, 88, 199, .5), 0 0 56px rgba(56, 189, 248, .22); }

/* Fade-in on scroll (only when the script runs) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* Hero background: soft colour blobs and a faint grid */
.hero-wrap { position: relative; overflow: hidden; }
.hero-wrap > section { position: relative; z-index: 1; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='rgba(17,88,199,0.07)' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .22; pointer-events: none; }
.hero-blob.b1 { width: 520px; height: 520px; background: #1158C7; top: -180px; left: -120px; animation: float 9s ease-in-out infinite; }
.hero-blob.b2 { width: 460px; height: 460px; background: #38BDF8; top: 80px; right: -140px; animation: float 11s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Small animations */
.pulse-dot { width: 7px; height: 7px; border-radius: 99px; background: #38BDF8; flex: 0 0 auto; animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.scroll-cue { position: relative; z-index: 1; display: flex; justify-content: center; padding: 0 0 28px; color: #1158C7; opacity: .55; }
.scroll-cue:hover { opacity: 1; }
.scroll-cue svg { animation: bounce 1.6s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(-20%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } }

/* Gradient accents */
.grad-text { background: linear-gradient(135deg, #1158C7 0%, #0891B2 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.taime-ai { font-weight: 700; }
.divider-gradient { height: 1px; max-width: 1200px; margin: 0 auto; background: linear-gradient(90deg, transparent, rgba(17, 88, 199, .45), rgba(56, 189, 248, .45), transparent); }

/* Phone menu */
.menu-toggle { display: none; margin-left: auto; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid #D7DEE8; border-radius: 8px; background: #FFFFFF; color: #0F1B2D; cursor: pointer; align-items: center; justify-content: center; }
.menu-toggle .i-close { display: none; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .nav-links, .nav-cta { display: none !important; }
  .site-header.menu-open .nav-links { display: flex !important; flex: 1 1 100% !important; flex-direction: column; align-items: flex-start !important; gap: 4px !important; padding: 8px 0; }
  .site-header.menu-open .nav-links > a { min-height: 44px; display: flex; align-items: center; font-size: 17px; }
  .site-header.menu-open .nav-links > span { display: none; }
  .site-header.menu-open .nav-cta { display: inline-flex !important; margin-bottom: 8px; }
  .site-header.menu-open .menu-toggle .i-open { display: none; }
  .site-header.menu-open .menu-toggle .i-close { display: block; }
  .nav-link::after { display: none; }
}

/* Home: data-pattern background (F4) */
.hero-bg.f4 { background: rgba(56, 189, 248, .04) url("/assets/hero-pattern-desktop.svg") center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 90%, transparent); mask-image: linear-gradient(180deg, #000 90%, transparent); }
@media (max-width: 700px) { .hero-bg.f4 { background-image: url("/assets/hero-pattern-mobile.svg"); } }

/* Home: tagline as a badge */
.home-hero > div:first-child > p:first-child { font-size: 17px !important; font-weight: 500; letter-spacing: 0.07em !important; color: #0C449A !important;
  padding: 10px 18px 10px 16px; gap: 12px !important; border: 1px solid rgba(17, 88, 199, .28); border-radius: 999px;
  background: rgba(255, 255, 255, .75); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 12px rgba(17, 88, 199, .08); }
.home-hero > div:first-child > p:first-child .pulse-dot { width: 9px; height: 9px; box-shadow: 0 0 0 4px rgba(56, 189, 248, .18); }
@media (max-width: 600px) { .home-hero > div:first-child > p:first-child { font-size: 11px !important; letter-spacing: 0.02em !important; padding: 7px 12px; gap: 8px !important; white-space: nowrap; } }

/* Home: example run in landscape */
.home-hero { flex-direction: column !important; align-items: stretch !important; gap: 44px !important; }
.home-hero > div:first-child { flex: none !important; max-width: 1000px; }
.home-hero > figure { flex: none !important; width: 100%; }
#example > div:nth-of-type(2) { display: grid !important; grid-template-columns: 1fr 1.15fr 1.3fr; align-items: start; gap: 24px 32px !important; padding: 28px !important; }
#example > div:nth-of-type(2) > *:nth-child(n+4) { grid-column: 1 / -1; }
#example > div:nth-of-type(2) > div:nth-child(4) { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 10px 28px !important; padding-top: 20px; border-top: 1px solid #D7DEE8; }
#example > div:nth-of-type(2) > div:nth-child(4) > span:first-child { grid-column: 1 / -1; }
@media (max-width: 960px) {
  #example > div:nth-of-type(2), #example > div:nth-of-type(2) > div:nth-child(4) { grid-template-columns: 1fr !important; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .lift:hover, .btn:hover { transform: none; }
}

/* Long-form articles */
.prose { font-size: 18px; line-height: 1.75; color: #394456; }
.prose h2 { margin: 56px 0 16px; font-size: 30px; line-height: 1.2; letter-spacing: -0.015em; color: #0F1B2D; }
.prose h2:first-child { margin-top: 24px; }
.prose h3 { margin: 36px 0 12px; font-size: 22px; line-height: 1.3; color: #0F1B2D; }
.prose p { margin: 0 0 20px; }
.prose ul { margin: 0 0 24px; padding-left: 24px; }
.prose li { margin: 0 0 12px; padding-left: 4px; }
.prose li::marker { color: #1158C7; }
.prose strong { color: #0F1B2D; font-weight: 600; }
@media (max-width: 600px) { .prose { font-size: 17px; } .prose h2 { font-size: 25px; } }

/* Legal pages: same prose styles, a little more compact */
.prose.legal { font-size: 16px; line-height: 1.7; }
.prose.legal h2 { margin: 40px 0 12px; font-size: 24px; }
.prose.legal h3 { margin: 24px 0 8px; font-size: 18px; }
.prose.legal p { margin: 0 0 14px; }
.prose.legal li { margin: 0 0 8px; }
.prose.legal code { font-family: 'IBM Plex Mono', monospace; font-size: 0.92em; background: #EEF2F7; padding: 1px 5px; border-radius: 4px; }
.prose.legal .legal-meta { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.03em; color: #6B7686; margin: 0 0 20px; }
@media (max-width: 600px) { .prose.legal { font-size: 16px; } .prose.legal h2 { font-size: 21px; } }
