/* Sonder Global Dark Mode Stylesheet */

html[data-theme="dark"] {
  --ink: #F4F2EE;
  --ink-soft: #ECEAE5;
  --paper: #16161a;
  --paper-soft: #0e0e10;
  --rule: rgba(255, 255, 255, 0.12);
  --rule-dark: rgba(255, 255, 255, 0.18);
  --muted: rgba(255, 255, 255, 0.58);
  --muted-dark: rgba(255, 255, 255, 0.8);
  color-scheme: dark;
}

/* Smooth Interactive transitions for a premium feel */
body, .topnav, .dropdown, .mobile-nav, .btn, .rcard, .pillar, .tile, .guarantee-card, section, footer, .capability, .next-card, .gap-stat, .case-card, .section-how {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Top Nav Overrides */
html[data-theme="dark"] .topnav {
  background: rgba(14, 14, 16, 0.8) !important;
  backdrop-filter: blur(10px);
  border-color: var(--rule) !important;
}

/* Dropdown Overrides */
html[data-theme="dark"] .dropdown {
  background: rgba(22, 22, 26, 0.95) !important;
  border-color: var(--rule) !important;
}
html[data-theme="dark"] .dropdown li a:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Mobile Menu Close Button */
html[data-theme="dark"] .mobile-close:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Secondary & Primary Button Hover Color Fix
   Since they sweep a light background in dark mode, the text must turn dark. */
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .topnav .cta:not(.cta-secondary):hover {
  color: var(--paper-soft) !important;
}

/* Premium Warm Dark Gradient for Trust Band */
html[data-theme="dark"] .trust-band {
  background: radial-gradient(circle at 15% 20%, rgba(255, 60, 0, 0.15), rgba(255, 60, 0, 0) 55%),
              radial-gradient(circle at 85% 80%, rgba(255, 90, 43, 0.1), rgba(255, 90, 43, 0) 60%),
              linear-gradient(180deg, #1b120f, #140d0c) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Quote Card inside Trust Band */
html[data-theme="dark"] .quote-card {
  background: var(--paper-soft) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-left: 4px solid var(--orange) !important;
}
html[data-theme="dark"] .quote-card.is-active:hover {
  border-color: rgba(255, 255, 255, 0.2) !important;
  border-left-color: var(--orange) !important;
}


/* Logo Marquees (Aditya Textile & partners) */
html[data-theme="dark"] .logo-marquee .marquee {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: var(--rule) !important;
}
html[data-theme="dark"] .logo-marquee .logo-item {
  background: transparent !important;
  border: none !important;
}
html[data-theme="dark"] .logo-img {
  filter: brightness(0) invert(1) !important;
  opacity: 0.85 !important;
}
html[data-theme="dark"] .logo-text {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Sonder Brand Lockup Images */
html[data-theme="dark"] .lockup {
  filter: invert(1) brightness(1) !important;
}

/* Theme Toggle Button Styling */
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.12s, background-color 0.12s, transform 0.25s ease;
  border-radius: 9999px;
}
.theme-toggle:hover {
  opacity: 1;
  background: rgba(14, 14, 16, 0.05);
}
html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
.theme-toggle svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-toggle:active svg {
  transform: scale(0.85);
}
.theme-toggle .sun-icon {
  display: none;
}
.theme-toggle .moon-icon {
  display: block;
}
html[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}
html[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}
.theme-toggle-li {
  display: flex;
  align-items: center;
}

/* Always-dark sections must maintain dark variables and dark backgrounds in both themes */
section.dark,
.section-team,
.section-how,
.strat-value,
.strat-ae,
.outcome-band,
.build-proof,
.tx-approach,
.tx-diff,
.trust-dark,
footer {
  --ink: #F4F2EE;
  --ink-soft: #ECEAE5;
  --paper: #16161a;
  --paper-soft: #0e0e10;
  --rule: rgba(255, 255, 255, 0.12);
  --rule-dark: rgba(255, 255, 255, 0.18);
  --muted: rgba(255, 255, 255, 0.58);
  --muted-dark: rgba(255, 255, 255, 0.8);
  background-color: #0E0E10 !important;
  color: var(--ink) !important;
}

.research-card {
  background: var(--paper) !important;
  border-color: var(--rule) !important;
}

/* Contact form input overrides for dark mode */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--ink) !important;
  border-color: var(--rule) !important;
}

/* Fix focused inputs to prevent turning white in dark mode */
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
  background: rgba(255, 255, 255, 0.12) !important;
  color: var(--ink) !important;
  border-color: var(--orange) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Logo marquee label visibility override */
html[data-theme="dark"] .logo-marquee .logo-marquee-label {
  color: var(--muted) !important;
}

/* Card styling and visibility overrides in dark mode */
html[data-theme="dark"] .capability,
html[data-theme="dark"] .next-card,
html[data-theme="dark"] .gap-stat,
html[data-theme="dark"] .featured-card,
html[data-theme="dark"] .essay-card,
html[data-theme="dark"] .related-card {
  background: var(--paper) !important;
  border-color: var(--rule) !important;
}

html[data-theme="dark"] .capability:hover,
html[data-theme="dark"] .next-card:hover,
html[data-theme="dark"] .featured-card:hover,
html[data-theme="dark"] .essay-card:hover,
html[data-theme="dark"] .related-card:hover {
  border-color: var(--orange) !important;
}

/* ALIGNMENT PAGE THEME OVERRIDES */
/* Keep the footer and its immediate wrappers dark in both themes */
footer,
.bg-\[\#000000\],
.w-full.bg-black.z-10 {
  background-color: var(--ink) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="dark"] footer,
html[data-theme="dark"] .bg-\[\#000000\],
html[data-theme="dark"] .w-full.bg-black.z-10 {
  background-color: #0E0E10 !important;
  color: var(--ink) !important;
}

.dark-mode .aditya-logo {
  mix-blend-mode: screen;
  filter: invert(1) brightness(1.2);
  opacity: 0.8;
}

/* ── Guarantee card: instant reveal (no JS observer dependency) ── */
@keyframes guarantee-appear {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.guarantee-card {
  animation: guarantee-appear 0.52s cubic-bezier(0.2, 0.7, 0.2, 1) 0.6s both;
}

@media (prefers-reduced-motion: reduce) {
  .guarantee-card { animation: none; }
}

/* Make Recent Work cards visible in dark mode with orangish tint */
html[data-theme="dark"] .rcard {
  border-color: rgba(255, 60, 0, 0.25) !important;
  transition: border-color 0.12s ease, transform 0.12s ease !important;
}
html[data-theme="dark"] .rcard:hover {
  border-color: rgba(255, 60, 0, 0.6) !important;
  transition: border-color 0.12s ease, transform 0.12s ease !important;
}

/* Pillar cards (Strategy / Build / Research) — same orange border in dark mode */
html[data-theme="dark"] .pillar {
  border-color: rgba(255, 60, 0, 0.25) !important;
  transition: border-color 0.12s ease !important;
}
html[data-theme="dark"] .pillar:hover {
  border-color: rgba(255, 60, 0, 0.6) !important;
  transition: border-color 0.12s ease !important;
}

/* Audience tiles (Enterprise / PE / Mid-market / Startups) — same orange border */
html[data-theme="dark"] .tile {
  border-color: rgba(255, 60, 0, 0.25) !important;
  transition: border-color 0.12s ease !important;
}
html[data-theme="dark"] .tile:hover {
  border-color: rgba(255, 60, 0, 0.65) !important;
  transition: border-color 0.12s ease !important;
}
/* ── Infinite marquee (CSS animation) ── */
.marquee {
  overflow: hidden !important;   /* no scroll boundary */
}

.marquee-track {
  animation: marquee-slide 28s linear infinite;
}

.marquee-track.paused {
  animation-play-state: paused;
}

@keyframes marquee-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Typewriter brand animation ── */
.brand-cursor {
  display: inline;
  font-weight: 300;
  font-family: 'JetBrains Mono', monospace;
  color: var(--orange);
  margin-left: 0;
  animation: brand-blink 0.72s step-end infinite;
}

.brand-cursor::before {
  content: '|';
}

@keyframes brand-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Light mode: subtle ink glow */
.brand-text {
  text-shadow: 0 0 10px rgba(14, 14, 16, 0.12);
}

/* Dark mode: white + faint orange glow */
html[data-theme="dark"] .brand-text {
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.25),
    0 0 28px rgba(255, 60, 0, 0.18) !important;
}
html[data-theme="dark"] .brand-cursor {
  color: var(--orange);
  text-shadow: 0 0 8px rgba(255, 60, 0, 0.6);
}

/* Case Study Cards Dark Mode */
html[data-theme="dark"] .case-card {
  border-color: var(--rule) !important;
}
html[data-theme="dark"] .case-card:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
}

/* Fix topnav primary CTA height alignment to match secondary CTA (align borders) */
.topnav .cta:not(.cta-secondary) {
  border: 1px solid transparent !important;
}

/* Prevent topnav elements from overflowing on medium screen widths (860px to 1100px) */
@media (max-width: 1100px) and (min-width: 861px) {
  .topnav .wrap {
    gap: 12px !important;
  }
  .topnav>.wrap>.links {
    gap: 16px !important;
  }
  .topnav a {
    font-size: 13px !important;
  }
  .topnav .cta {
    padding: 9px 12px !important;
  }
}

/* Custom overrides for next-card and composite-node in dark mode to align with homepage styling */
html[data-theme="dark"] .next-card {
  background: var(--paper) !important;
  border-color: rgba(255, 60, 0, 0.25) !important;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.12s ease, transform 0.12s ease !important;
}
html[data-theme="dark"] .next-card:hover {
  border-color: rgba(255, 60, 0, 0.6) !important;
  transform: translateY(-2px) !important;
}

html[data-theme="dark"] .composite-node:not(.highlight) {
  border-color: rgba(255, 60, 0, 0.18) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
html[data-theme="dark"] .composite-node:not(.highlight):hover {
  border-color: rgba(255, 60, 0, 0.45) !important;
  background: rgba(255, 60, 0, 0.03) !important;
  transform: translateY(-2px) !important;
}
html[data-theme="dark"] .composite-node.highlight {
  border-color: var(--orange) !important;
  background: rgba(255, 60, 0, 0.04) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
html[data-theme="dark"] .composite-node.highlight:hover {
  border-color: var(--orange-soft) !important;
  background: rgba(255, 60, 0, 0.08) !important;
  transform: translateY(-2px) !important;
}

/* Custom overrides for gap-stat in dark mode to align with homepage card design system */
html[data-theme="dark"] .gap-stat {
  border-color: rgba(255, 60, 0, 0.25) !important;
  transition: border-color 0.12s ease !important;
}
html[data-theme="dark"] .gap-stat:hover {
  border-color: rgba(255, 60, 0, 0.6) !important;
}


