/* ============================================================
   FOR CONSULTANCY PVT LTD — DESIGN SYSTEM
   style.css — Core Variables, Reset, Typography, Utilities
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Design Tokens ────────────────────────────────────────────────
   Two themes share one token contract, so every component below is
   written once and themes for free.

   LIGHT IS THE DEFAULT. It lives on `:root`, which means a page
   renders light even before the theme bootstrap script runs — and
   still renders light if JavaScript never runs at all. Dark is an
   opt-in override on [data-theme="dark"].

   Order matters: the dark block must come AFTER this one. Both
   selectors have the same specificity, so when data-theme="dark" is
   present the later block is what wins.

   Naming note: --white means "primary text", not the colour white.
   It inverts with the theme. For things that must stay literally
   white regardless of theme, use --on-accent or --plate.
   ────────────────────────────────────────────────────────────── */

/* ── LIGHT THEME (default) ────────────────────────────────────────
   Warm paper neutrals rather than pure grey, so the orange brand
   reads as intentional instead of accidental. The accent darkens to
   #C4430D (5.0:1 on white) so accent-coloured text and filled
   buttons both clear WCAG AA — #FF6B35 only manages 2.9:1 on white
   and stays reserved for decorative washes via --brand.
   ────────────────────────────────────────────────────────────── */
:root,
[data-theme="light"] {
  color-scheme: light;

  /* Backgrounds */
  --bg:          #FFFFFF;
  --surface:     #F7F4F1;
  --card:        #FFFFFF;
  --card-hover:  #FBF8F5;

  /* Borders */
  --border:      #E5DFD8;
  --border-light:#CFC6BB;

  /* Accent — Primary (logo orange, darkened for contrast on paper) */
  --accent:      #C4430D;   /* 5.0:1 on white */
  /* Kept light on purpose: accent-coloured text sits on this tint in the
     capability tags, and 0.09 alpha dropped that pairing to 4.4:1. */
  --accent-dim:  rgba(196, 67, 13, 0.06);
  --accent-glow: rgba(196, 67, 13, 0.22);
  --accent-light:#E2792F;
  --accent-hover:#A93709;
  --accent-line: rgba(196, 67, 13, 0.28);
  --accent-wash: rgba(255, 107, 53, 0.07);

  /* Accent — Secondary (logo navy) */
  --navy:        #1E3A8A;
  --navy-mid:    #24409B;
  --navy-light:  #26489F;
  --navy-wash:   rgba(30, 58, 138, 0.06);

  /* Text */
  --white:       #171310;
  --off-white:   #2C2620;
  --muted:       #56504A;   /* 7.2:1 on --surface */
  --subtle:      #6F6860;   /* 5.0:1 on --surface — used for footer body copy,
                               so it has to clear AA, not just look quiet */

  /* Surface effects */
  --header-bg:   rgba(255, 255, 255, 0.90);
  --mobilenav-bg:rgba(255, 255, 255, 0.98);
  --glass-bg:    rgba(255, 255, 255, 0.70);
  --hover-tint:  rgba(23, 19, 16, 0.05);
  --shimmer-tint:rgba(23, 19, 16, 0.05);
  --img-scrim:   rgba(23, 19, 16, 0.65);
  --img-scrim-strong: rgba(23, 19, 16, 0.72);
  /* Scrim over a decorative panel (no photo behind it) rather than a
     photograph — this one has to get out of the way on the light theme
     or it darkens a white card and swallows the text on top of it. */
  --panel-scrim: rgba(23, 19, 16, 0.05);
  --lightbox-bg: rgba(28, 24, 20, 0.90);
  --noise-opacity: 0.22;
  --map-filter:  saturate(0.9) contrast(1.02);
  --map-land:    #C7BEB2;
  --map-land-stroke: #ABA093;
  --map-india:   #B3A697;
  --map-india-line: rgba(196, 67, 13, 0.62);
  --founder-grayscale: 12%;

  /* Hero orbs — heavily blurred decorative washes. These need roughly
     double the alpha to register against white. */
  --orb-accent:      rgba(255, 107, 53, 0.17);
  --orb-accent-soft: rgba(255, 122, 53, 0.12);
  --orb-navy:        rgba(30, 58, 138, 0.11);

  /* Native form-control arrow, tinted to match --muted */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2356504A' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");

  /* Status */
  --success:     #047857;
  --success-dim: rgba(4, 120, 87, 0.08);
  --success-line:rgba(4, 120, 87, 0.24);
  --danger:      #B91C1C;
  --danger-dim:  rgba(185, 28, 28, 0.07);
  --danger-line: rgba(185, 28, 28, 0.22);

  /* Shadows — light UIs need tighter, softer, warmer shadows */
  --shadow-sm:  0 1px 2px rgba(60, 45, 35, 0.08);
  --shadow-md:  0 4px 18px rgba(60, 45, 35, 0.10);
  --shadow-lg:  0 12px 40px rgba(60, 45, 35, 0.14);
  --shadow-header: 0 2px 20px rgba(60, 45, 35, 0.08);
  --shadow-card-hover: 0 16px 40px rgba(60, 45, 35, 0.13);
  --shadow-accent: 0 8px 24px rgba(196, 67, 13, 0.22);
  --shadow-btn:  0 4px 14px rgba(196, 67, 13, 0.25);
  --shadow-btn-hover: 0 6px 22px rgba(196, 67, 13, 0.35);

  /* ── Theme-invariant tokens ──
     These never flip. --plate is the white card the logo sits on (the
     logo artwork is navy/orange on white); --on-accent is text placed
     on top of a filled accent surface. */
  --plate:     #FFFFFF;
  --on-accent: #FFFFFF;
  --on-scrim:  #FFFFFF;   /* text over a photo scrim — dark in both themes */
  --brand:     #FF6B35;   /* raw brand orange, decorative use only */
  --brand-navy:#1E3A8A;

  /* Typography */
  --font-heading: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing Scale */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  40px;
  --space-xl:  64px;
  --space-2xl: 96px;
  --space-3xl: 128px;

  /* Section padding */
  --section-py: 120px;

  /* Container */
  --container-max: 1380px;
  --container-px:  clamp(20px, 5vw, 80px);

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --ease-fast:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-smooth: 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:   0.65s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.6);
  --shadow-header: 0 4px 40px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 20px 60px rgba(0,0,0,0.4);
  --shadow-accent: 0 8px 32px rgba(255, 107, 53, 0.2);
  --shadow-btn:  0 4px 20px rgba(255, 107, 53, 0.3);
  --shadow-btn-hover: 0 6px 32px rgba(255, 107, 53, 0.45);

  /* Z-index layers */
  --z-base:    1;
  --z-card:    10;
  --z-sticky:  100;
  --z-overlay: 200;
  --z-modal:   300;
}

/* ── DARK THEME (opt-in) ──────────────────────────────────────────
   The site's original identity, now applied only when the visitor
   asks for it. Must stay after the light block — see the note above.
   Only colour tokens are redefined; typography, spacing and layout
   tokens are inherited from :root.
   ────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  color-scheme: dark;

  /* Backgrounds */
  --bg:          #090909;
  --surface:     #141414;
  --card:        #1B1B1B;
  --card-hover:  #202020;

  /* Borders */
  --border:      #2A2A2A;
  --border-light:#333333;

  /* Accent — Primary (full-strength brand orange reads fine on black) */
  --accent:      #FF6B35;
  --accent-dim:  rgba(255, 107, 53, 0.12);
  --accent-glow: rgba(255, 107, 53, 0.25);
  --accent-light:#FFC9A6;
  --accent-hover:#FF7D4D;
  --accent-line: rgba(255, 107, 53, 0.20);
  --accent-wash: rgba(255, 107, 53, 0.06);

  /* Accent — Secondary */
  --navy:        #1E3A8A;
  --navy-mid:    #2D4FC4;
  --navy-light:  #4F74D9;
  --navy-wash:   rgba(30, 58, 138, 0.08);

  /* Text */
  --white:       #FFFFFF;
  --off-white:   #F5F5F5;
  --muted:       #9CA3AF;   /* 6.8:1 on --card */
  --subtle:      #7E848F;   /* 4.6:1 on --card — was #6B7280 (3.6:1), which
                               left the footer address, copyright and legal
                               links below AA */

  /* Surface effects */
  --header-bg:   rgba(9, 9, 9, 0.92);
  --mobilenav-bg:rgba(9, 9, 9, 0.98);
  --glass-bg:    rgba(20, 20, 20, 0.60);
  --hover-tint:  rgba(255, 255, 255, 0.05);
  --shimmer-tint:rgba(255, 255, 255, 0.06);
  --img-scrim:   rgba(9, 9, 9, 0.80);
  --img-scrim-strong: rgba(9, 9, 9, 0.85);
  --panel-scrim: rgba(9, 9, 9, 0.80);
  --lightbox-bg: rgba(0, 0, 0, 0.95);
  --noise-opacity: 0.6;
  --map-filter:  invert(90%) hue-rotate(180deg) saturate(0.4) brightness(0.9);
  --map-land:    #2A2A2A;
  --map-land-stroke: #333333;
  --map-india:   #3A3A3A;
  --map-india-line: rgba(255, 107, 53, 0.55);
  --founder-grayscale: 30%;

  /* Orbs */
  --orb-accent:      rgba(255, 107, 53, 0.08);
  --orb-accent-soft: rgba(255, 107, 53, 0.05);
  --orb-navy:        rgba(30, 58, 138, 0.10);

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");

  /* Status */
  --success:     #10B981;
  --success-dim: rgba(16, 185, 129, 0.08);
  --success-line:rgba(16, 185, 129, 0.20);
  --danger:      #EF4444;
  --danger-dim:  rgba(239, 68, 68, 0.08);
  --danger-line: rgba(239, 68, 68, 0.20);

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 48px rgba(0,0,0,0.6);
  --shadow-header: 0 4px 40px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 20px 60px rgba(0,0,0,0.4);
  --shadow-accent: 0 8px 32px rgba(255, 107, 53, 0.2);
  --shadow-btn:  0 4px 20px rgba(255, 107, 53, 0.3);
  --shadow-btn-hover: 0 6px 32px rgba(255, 107, 53, 0.45);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Suppress every transition for one frame while the theme swaps, so the
   flip reads as instant rather than as a few hundred staggered fades. */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: none !important;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 100px;
}

/* ── Selection ── */
::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* ── Scroll Progress Bar ── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  width: 0%;
  z-index: calc(var(--z-sticky) + 10);
  transition: width 0.1s linear;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.8rem, 6vw, 5.5rem);  font-weight: 800; }
h2 { font-size: clamp(2rem,   4vw, 3.5rem);  font-weight: 700; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem);  font-weight: 700; }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 0.95rem; font-weight: 600; }

p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease-fast);
}

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

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

input, textarea, select {
  font-family: var(--font-body);
}

/* ── Mono Label ── */
.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.label--muted {
  color: var(--muted);
}

.label--navy {
  color: var(--navy-light);
}

/* ── Section Heading ── */
.section-heading {
  margin-bottom: var(--space-xl);
}

.section-heading .label {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.section-heading h2 {
  margin-bottom: var(--space-md);
}

.section-heading p {
  max-width: 640px;
  font-size: 1.1rem;
}

.section-heading.centered {
  text-align: center;
}

.section-heading.centered p {
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: all var(--ease-smooth);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
}

/* Hover sheen. White lifts a dark button; on the light theme a white
   veil over an already-light surface is invisible, so it inverts. */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  opacity: 0;
  transition: opacity var(--ease-fast);
}

[data-theme="light"] .btn::before { background: #000000; }

.btn:hover::before { opacity: 0.06; }

/* The filled accent button keeps a white sheen in both themes — its
   own background is dark orange even on the light page. */
[data-theme="light"] .btn-primary::before { background: #FFFFFF; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline-accent:hover {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.btn svg,
.btn .btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--ease-fast);
}

.btn:hover svg,
.btn:hover .btn-icon {
  transform: translateX(4px);
}

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: var(--space-xl) 0;
}

.divider-accent {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: var(--space-md) 0;
}

/* ── Card Base ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--ease-smooth);
}

.card:hover {
  border-color: var(--border-light);
  background: var(--card-hover);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-wash);
  transform: translateY(-4px);
}

.card:hover::before { opacity: 1; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Section Spacing ── */
section {
  padding: var(--section-py) 0;
  position: relative;
  z-index: var(--z-base);
}

/* ── Overflow Clip ── */
.overflow-hidden { overflow: hidden; }

/* ── Flex utilities ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ── Text utilities ── */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--muted); }
.text-white  { color: var(--white); }
.text-navy   { color: var(--navy-light); }

/* ── Glow effects ── */
.glow-accent {
  box-shadow: 0 0 40px var(--accent-glow);
}

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Accent line ── */
.accent-line {
  display: inline-block;
  position: relative;
}

.accent-line::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease-smooth);
}

.accent-line:hover::after { transform: scaleX(1); }

/* ── Background decoration ── */
.bg-radial-accent {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-wash) 0%, transparent 70%);
  pointer-events: none;
}

.bg-radial-navy {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--navy-wash) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Page Hero Banner (inner pages) ── */
.page-hero {
  padding: 180px 0 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-wash) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero .label { margin-bottom: 16px; }
.page-hero h1 { margin-bottom: 20px; }
.page-hero p { max-width: 600px; font-size: 1.15rem; }

/* ── Responsive Breakpoints ── */
@media (max-width: 1200px) {
  :root { --section-py: 96px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --section-py: 72px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  :root { --section-py: 56px; --container-px: 20px; }
  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .grid-4 { grid-template-columns: 1fr; }
  .btn { padding: 12px 24px; font-size: 0.85rem; }
}
