﻿/* shaktii.ai prototypes - shared site chrome (nav / footer / mobile menu / reusable
   components). Loaded AFTER tokens.css on every page. Never redefines a token value -
   only adds behavior (hover, layout, responsive) on top of the tokens. */

/* ===================== Skip link ===================== */
.skip-link {
  position: absolute; left: var(--sp-4); top: -60px; z-index: 1000;
  background: var(--saffron-500); color: var(--on-saffron);
  padding: var(--sp-3) var(--sp-4); font-weight: 600; font-size: var(--fs-14);
  border-radius: var(--r-input); text-decoration: none;
  transition: top var(--t-micro) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ===================== Nav ===================== */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(16, 16, 20, 0.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 72px;
  gap: var(--sp-6);
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--ink-1); border-radius: var(--r-input); }
.brand-mark { width: 28px; height: 28px; flex: none; display: block; }
.brand-word { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; font-size: var(--fs-20); letter-spacing: -0.01em; }

.brand { justify-self: start; }

.nav-links { display: flex; align-items: center; justify-self: center; gap: var(--sp-6); list-style: none; }
.nav-links a.nav-link { color: var(--ink-2); font-size: var(--fs-14); font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-links a.nav-link:hover { color: var(--ink-1); }
.nav-links a.nav-link[aria-current="page"] { color: var(--ink-1); border-color: var(--saffron-500); }

.nav-actions { display: flex; align-items: center; justify-self: end; gap: var(--sp-4); }
.nav-actions .nav-link { color: var(--ink-2); font-size: var(--fs-14); font-weight: 600; }
.nav-actions .nav-link:hover { color: var(--ink-1); }
.btn-sm { min-height: 40px; padding: 0 var(--sp-4); font-size: var(--fs-14); }

.hamburger { display: none; flex: none; width: 44px; height: 44px; border-radius: var(--r-input); background: transparent; border: 1px solid transparent; cursor: pointer; position: relative; }
.hamburger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink-1); border-radius: 2px; transition: transform var(--t-std) var(--ease), opacity var(--t-std) var(--ease); }
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.hamburger:hover { border-color: var(--border-input); }

.mobile-menu { border-bottom: 1px solid var(--border-subtle); background: var(--surface-1); padding: var(--sp-2) var(--sp-6) var(--sp-6); }
.mobile-menu[hidden] { display: none; }
.mobile-menu-links { display: flex; flex-direction: column; gap: 0; margin-bottom: var(--sp-6); }
.mobile-menu-links a { color: var(--ink-1); font-size: var(--fs-20); font-weight: 600; padding: var(--sp-3) 0; text-decoration: none; border-bottom: 1px solid var(--border-subtle); }
.mobile-menu-actions { display: flex; flex-direction: column; gap: var(--sp-3); }
.mobile-menu-actions .btn { width: 100%; }

@media (max-width: 720px) {
  .nav-inner { display: flex; justify-content: space-between; }
  .nav-links, .nav-actions { display: none; }
  .hamburger { margin-left: auto; }
  .hamburger { display: block; }
}
@media (min-width: 721px) {
  .mobile-menu { display: none !important; }
}

/* ===================== Footer ===================== */
.site-footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-1);
  padding: var(--sp-24) 0 var(--sp-8);
  margin-top: var(--sp-32);
  margin-bottom: 0;
}
.site-footer::before {
  content: '';
  position: absolute;
  left: 100px;
  top: 50%;
  z-index: 0;
  width: clamp(300px, 32vw, 420px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  transform-origin: 50% 50%;
  pointer-events: none;
  opacity: 0.16;
  background: url('/assets/yantra.svg') no-repeat center / contain;
  filter: drop-shadow(0 0 34px rgba(232, 142, 28, 0.2));
  animation: footer-yantra-drift 18s ease-in-out infinite;
}
.site-footer > .container { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-12); padding-bottom: var(--sp-16); }
.footer-brand .brand-mark { display: none; }
.footer-brand p { color: var(--ink-2); font-size: var(--fs-14); margin-top: var(--sp-3); max-width: 32ch; }
.footer-col h3 { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: var(--sp-1); font-weight: 600; }
.footer-col { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a { color: var(--ink-2); font-size: var(--fs-14); text-decoration: none; }
.footer-col a:hover { color: var(--ink-1); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--sp-8); border-top: 1px solid var(--border-subtle); color: var(--ink-3); font-size: var(--fs-12); flex-wrap: wrap; gap: var(--sp-3); }
.footer-bottom-links { display: flex; gap: var(--sp-6); }
.footer-bottom-links a { color: var(--ink-3); font-size: var(--fs-12); }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-col { align-items: center; text-align: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-bottom-links { justify-content: center; width: 100%; }
  .site-footer::before {
    left: 50%;
    top: 50%;
    width: 120vw;
    transform: translate(-50%, -50%);
    animation-name: footer-yantra-mobile-drift;
  }
}

@keyframes footer-yantra-drift {
  0% { transform: translateY(-50%) scale(0.96) rotate(0deg); opacity: 0.18; }
  50% { transform: translateY(-50%) scale(1.03) rotate(180deg); opacity: 0.55; }
  100% { transform: translateY(-50%) scale(0.96) rotate(360deg); opacity: 0.18; }
}

@keyframes footer-yantra-mobile-drift {
  0% { transform: translate(-50%, -50%) scale(0.96) rotate(0deg); opacity: 0.18; }
  50% { transform: translate(-50%, -50%) scale(1.03) rotate(180deg); opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(0.96) rotate(360deg); opacity: 0.18; }
}

/* ===================== Page hero (shared inner pages) ===================== */
.page-hero { position: relative; padding: var(--sp-24) 0 var(--sp-16); text-align: center; overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: var(--fs-49); margin: var(--sp-3) 0 var(--sp-4); }
.page-hero p { color: var(--ink-2); font-size: var(--fs-20); max-width: 60ch; margin: 0 auto; }

/* ===================== Background texture (hero use) ===================== */
.bg-radial-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(680px 420px at 50% 0%, rgba(232, 142, 28, 0.06), transparent 70%); }
.bg-grain { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.3; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ===================== Layout helpers ===================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.section-head { max-width: 640px; margin: 0 auto var(--sp-16); text-align: center; }
.section-head h2 { font-size: var(--fs-39); margin-top: var(--sp-3); }
.section-head p { color: var(--ink-2); font-size: var(--fs-20); margin-top: var(--sp-4); }
.section-head.left { margin-left: 0; margin-right: 0; text-align: left; max-width: 68ch; }
.section-cta { text-align: center; margin-top: var(--sp-12); }

.btn-link-arrow { color: var(--ink-1); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: var(--sp-2); border-bottom: 1px solid var(--border-input); padding-bottom: 2px; }
.btn-link-arrow:hover { color: var(--saffron-400); border-color: var(--saffron-400); }

/* ===================== Disabled purchase / subscription CTAs ===================== */
.btn[aria-disabled="true"],
.btn.is-disabled,
.mock-disabled-link[aria-disabled="true"],
.mock-disabled-link.is-disabled {
  opacity: 0.56;
  cursor: not-allowed;
  pointer-events: none;
  filter: saturate(0.82);
}

.cta-disabled-note {
  color: var(--ink-3);
  font-size: var(--fs-12);
  line-height: 1.45;
}

/* ===================== Cards (Direction A hover rule: 1px saffron glow, 120ms) ===================== */
.card { transition: border-color var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease), transform var(--t-micro) var(--ease); }
.card:hover { border-color: var(--saffron-500); box-shadow: 0 0 0 1px rgba(232, 142, 28, 0.22); }

/* ===================== Reusable atoms ===================== */
.avatar-initial { width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: var(--fs-14); background: var(--surface-3); color: var(--ink-1); border: 1px solid var(--border-subtle); flex: none; }

.status-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex: none; }
.status-dot.done { background: var(--teal-300); }
.status-dot.active { background: var(--saffron-400); box-shadow: 0 0 0 3px rgba(232, 142, 28, 0.18); }
.status-dot.queued { background: var(--ink-3); }

.window-chrome { background: var(--surface-1); border: 1px solid var(--border-subtle); border-radius: var(--r-panel); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); background: var(--surface-2); border-bottom: 1px solid var(--border-subtle); }
.window-bar .dot { width: 10px; height: 10px; border-radius: 999px; }
.window-bar .dot.r { background: #FF6B6B; }
.window-bar .dot.y { background: var(--saffron-400); }
.window-bar .dot.g { background: var(--teal-300); }
.window-title { margin-left: var(--sp-2); font-size: var(--fs-12); color: var(--ink-3); font-family: 'Space Grotesk', monospace; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--sp-8); }
.stat-num { font-family: 'Space Grotesk', sans-serif; font-size: var(--fs-49); font-weight: 600; color: var(--ink-1); }
.stat-label { color: var(--ink-3); font-size: var(--fs-14); margin-top: var(--sp-1); }

.eyebrow-icon { width: 40px; height: 40px; border-radius: var(--r-card); background: var(--surface-3); border: 1px solid var(--border-subtle); display: inline-flex; align-items: center; justify-content: center; color: var(--saffron-400); flex: none; }

.pill { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-12); font-weight: 700; letter-spacing: 0.04em; padding: 2px 10px; border-radius: var(--r-pill); border: 1px solid var(--teal-600); background: rgba(63, 191, 168, 0.12); color: var(--teal-300); }

.banner { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); text-align: center; background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: var(--r-card); padding: var(--sp-4) var(--sp-6); font-size: var(--fs-14); color: var(--ink-2); margin-bottom: var(--sp-12); }
.banner strong { color: var(--ink-1); }

/* ===================== FAQ ===================== */
.faq-item { border-bottom: 1px solid var(--border-subtle); padding: var(--sp-6) 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: var(--fs-20); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chevron { transition: transform var(--t-std) var(--ease); flex: none; color: var(--ink-3); }
.faq-item[open] summary .chevron { transform: rotate(180deg); }
.faq-item p { color: var(--ink-2); margin-top: var(--sp-4); max-width: 68ch; }
.faq-item summary:focus-visible { outline: 2px solid var(--saffron-500); outline-offset: 4px; border-radius: 4px; }

/* ===================== Form (get-started / about-faq contact) ===================== */
.field { margin-bottom: var(--sp-4); text-align: left; }
.field label { display: block; font-size: var(--fs-14); font-weight: 600; margin-bottom: var(--sp-2); }
.field .hint { color: var(--ink-3); font-size: var(--fs-12); margin-top: var(--sp-1); }
.field .error { color: var(--danger); font-size: var(--fs-12); margin-top: var(--sp-1); display: none; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field.has-error .error { display: block; }
.form-status { display: none; align-items: center; gap: var(--sp-2); padding: var(--sp-4); border-radius: var(--r-card); font-size: var(--fs-14); margin-top: var(--sp-4); }
.form-status.is-visible { display: flex; }
.form-status.success { background: rgba(63, 191, 168, 0.1); border: 1px solid var(--teal-600); color: var(--teal-300); }
.form-status.loading { background: var(--surface-2); border: 1px solid var(--border-subtle); color: var(--ink-2); }
.spinner { width: 16px; height: 16px; border-radius: 999px; border: 2px solid var(--border-input); border-top-color: var(--saffron-400); animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: var(--border-input); }
}
