/* ============================================================
   drsujeeth.com  ·  Design System  ·  Base
   Reset + typography + focus styles + scroll behaviour.
   Requires tokens.css to be loaded first.
   ============================================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* ---------- SKIP LINK (a11y: WCAG 2.4.1) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--brand);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 14px;
  z-index: var(--z-modal);
  text-decoration: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 12px;
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---------- VERNACULAR (Telugu / Hindi text) ---------- */
.vernacular {
  font-family: var(--font-vernacular);
  font-feature-settings: "kern" 1, "liga" 1;
}

img, svg, video { max-width: 100%; display: block; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--brand-700); }

::selection { background: var(--brand-100); color: var(--ink); }

/* ---------- PAPER GRAIN (premium texture) ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px;
  pointer-events: none;
  z-index: var(--z-grain);
  mix-blend-mode: multiply;
  opacity: .55;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-variation-settings: "opsz" 60, "SOFT" 50;
  letter-spacing: var(--tracking-snug);
  font-weight: 600;
}
h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  margin: 0 0 18px;
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
h3 {
  font-size: var(--fs-h3);
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.005em;
}

p { margin: 0 0 14px; }

.lede {
  font-size: var(--fs-lede);
  color: var(--ink-soft);
  max-width: 56ch;
  line-height: 1.62;
}
.lede strong { color: var(--ink); font-weight: 600; }

.lead-p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 64ch;
  line-height: var(--lh-relaxed);
}

/* ---------- KICKER (small uppercase preheader) ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-kicker);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-kicker);
  color: var(--brand);
  margin-bottom: 14px;
}
.kicker::before {
  content: '';
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 2px;
}
.kicker::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- LAYOUT WRAP ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow { max-width: var(--maxw-narrow); }
.wrap-wide   { max-width: var(--maxw-wide); }

@media (max-width: 720px) {
  .wrap, .wrap-narrow, .wrap-wide { padding: 0 18px; }
}

/* ---------- FOCUS (accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-pill);
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- ENTRANCE ANIMATION ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in    { animation: fadeUp var(--dur-slow) var(--ease) both; }
.fade-in.d1 { animation-delay: .08s; }
.fade-in.d2 { animation-delay: .16s; }
.fade-in.d3 { animation-delay: .24s; }
.fade-in.d4 { animation-delay: .32s; }

/* ---------- SCROLL PROGRESS BAR (premium top gradient) ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: var(--z-overlay);
  pointer-events: none;
  background: transparent;
}
.scroll-progress::after {
  content: '';
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 60%, var(--brand-300) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  animation: scrollGrow linear both;
  animation-timeline: scroll(root);
}
@keyframes scrollGrow { to { transform: scaleX(1); } }

/* ---------- PRINT STYLESHEET ---------- */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    backdrop-filter: none !important;
  }
  body { background: #fff !important; font-size: 11pt; line-height: 1.5; }
  body::before { display: none !important; }

  /* hide non-content chrome */
  .scroll-progress,
  .sticky-cta,
  .util,
  .site-header,
  .final-cta,
  footer,
  .hero-deco,
  .hero::before,
  .nav-mobile,
  .nav-drawer,
  .video-card .play,
  .hero-ctas,
  .doc-cta { display: none !important; }

  /* expand links so URL is visible on paper */
  a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after,
  a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 90%; word-break: break-all; }
  a[href^="#"]::after { content: ""; }

  /* page-break hygiene */
  h1, h2, h3, h4 { page-break-after: avoid; }
  img, .figure, .price-table, .cost-matrix, .price-shell, .review, .stat-grid, .types-grid { page-break-inside: avoid; }
  section { page-break-inside: auto; }

  /* ensure full width for content */
  .wrap, .wrap-narrow, .wrap-wide { max-width: 100% !important; padding: 0 !important; }
  .hero, section.body, section.body.alt, section.body.warm { padding: 16pt 0 !important; }
}
