/* ==========================================================================
   Sarvada Infotech — design tokens & base styles
   Ported 1:1 from the Emergent React prototype (tailwind.config.js / index.css / App.css)
   ========================================================================== */

:root {
  /* Core palette — from app/design_guidelines.json + tailwind.config.js */
  --ink: #0E1015;
  --surface: #161922;
  --surface-hover: #1E222E;
  --line: #262A36;
  --text-primary: #EDEEF0;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --indigo: #5B6EF5;
  --indigo-hover: #4B5EE3;
  --indigo-glow: rgba(91, 110, 245, 0.15);
  --indigo-border: rgba(91, 110, 245, 0.3);

  --cta: #F5A623;
  --cta-hover: #E09512;

  --status-success: #10B981;
  --status-warning: #F59E0B;
  --status-cyan: #06B6D4;

  --light-surface: #F5F6F8;

  /* Typography */
  --font-heading: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 0.375rem;

  /* Layout */
  --container-max: 80rem; /* max-w-7xl */
  --section-py: 5rem;     /* py-20 */
}

@media (min-width: 1024px) {
  :root {
    --section-py: 8rem; /* lg:py-32 */
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.light-section-active {
  background: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

code, pre {
  font-family: var(--font-mono);
}

::selection {
  background: rgba(91, 110, 245, 0.35);
  color: var(--text-primary);
}

/* ---- Typography scale (from design_guidelines.json hierarchy) ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
}

h1 {
  font-size: 2.25rem;
  line-height: 1.1;
}
h2 {
  font-size: 1.75rem;
  line-height: 1.2;
}
h3 {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}
h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.75rem; }
  h2 { font-size: 2.25rem; }
}

p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-small {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--indigo);
}

/* ---- Layout helpers ---- */

.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

.section-dark {
  background: var(--ink);
}

.section-light {
  background: var(--light-surface);
  color: var(--ink);
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4 {
  color: var(--ink);
}

.section-light p {
  color: #4B5563;
}

/* subtle grid texture, used on dark sections */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(237, 238, 240, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(237, 238, 240, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, background-position 0.35s ease, transform 0.15s ease;
}

.btn-cta {
  background: linear-gradient(110deg, #6E7CF5 0%, #F5A623 70%);
  background-size: 150% 100%;
  color: var(--ink);
}
.btn-cta:hover {
  background-position: 85% 0;
}
.btn-cta:active {
  transform: scale(0.97);
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--indigo-border);
  background: var(--surface-hover);
}

/* ---- Cards / surfaces ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.card:hover {
  border-color: var(--indigo-border);
  background: var(--surface-hover);
}

.glass {
  background: rgba(14, 16, 21, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

/* ---- Hero glow ---- */

.hero-glow {
  background:
    radial-gradient(ellipse 75% 42% at 50% 108%, rgba(245, 166, 35, 0.16), transparent 62%),
    radial-gradient(ellipse 95% 60% at 50% 118%, rgba(91, 110, 245, 0.22), transparent 68%),
    radial-gradient(ellipse 40% 30% at 18% 78%, rgba(91, 110, 245, 0.10), transparent 70%);
}

/* ---- Decorative / motion (vanilla CSS ports of the React prototype's effects) ---- */

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.animate-marquee {
  animation: marquee 58s linear infinite;
  display: inline-flex;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

.marquee-outline {
  -webkit-text-stroke: 1.5px rgba(237, 238, 240, 0.32);
  color: transparent;
}

.ghost-num {
  -webkit-text-stroke: 1px rgba(237, 238, 240, 0.07);
  color: transparent;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1;
}
.ghost-num-light {
  -webkit-text-stroke: 1px rgba(14, 16, 21, 0.10);
  color: transparent;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes log-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.log-line {
  animation: log-in 0.3s ease-out both;
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.95; }
}
.node-pulse {
  animation: node-pulse 3s ease-in-out infinite;
}

@keyframes dash-flow {
  to { stroke-dashoffset: -24; }
}
.flow-line {
  stroke-dasharray: 3 9;
  animation: dash-flow 1.4s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .animate-marquee,
  .pulse-dot,
  .log-line,
  .node-pulse,
  .flow-line {
    animation: none !important;
  }
}

/* ---- Accessibility ---- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--indigo);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}


/* Dark .card elements placed inside a light section (e.g. the Work index cards) intentionally keep their own dark styling for contrast -- restore off-white heading text there, or it renders near-invisible against the card's dark background. */
.section-light .card h1,
.section-light .card h2,
.section-light .card h3,
.section-light .card h4 {
	  color: var(--text-primary);
}

.section-light .card p {
	  color: var(--text-secondary);
}

}
}