/* =============================================================================
   DealDepot Mobile — shared stylesheet
   Loaded by every page in /m/. Contains:
     1. Design tokens
     2. Reset + base
     3. Sticky header chrome
     4. Slide-out menu chrome
     5. Slim app-download bar chrome
     6. Standard scrolling content shell  (used by all pages except homepage)
     7. Common content patterns (page-hero, prose, callouts, lists, risk band)
     8. Slim footer for content pages
   Page-specific CSS lives in each page's own <style> block.
   ============================================================================= */

/* ── 1. Design tokens ─────────────────────────────────────────────────────── */
:root {
  --bg-cream:        #FAFAF7;
  --bg-white:        #FFFFFF;
  --bg-warm:         #F1EFE8;
  --bg-black:        #0A0A0A;
  --text-primary:    #0A0A0A;
  --text-secondary:  #5F5F5F;
  --text-tertiary:   #6B6B6B;
  --text-muted:      #8B8B8B;
  --border:          rgba(0,0,0,0.08);
  --border-light:    rgba(0,0,0,0.06);
  --border-strong:   rgba(0,0,0,0.22);
  --accent-purple:      #5028E8;
  --accent-purple-deep: #3F1FCC;
  --accent-purple-tint: rgba(80,40,232,0.06);
  --accent-lime:        #93D52E;
  --accent-lime-text:   #5C8A1A;
  --color-down:         #B91C1C;
  --font-sans:  'Inter', -apple-system, system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;

  --header-h:    52px;
  --app-bar-h:   56px;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── 2. Reset + base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-cream);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 15px;
  overscroll-behavior-y: none;
  /* Kill iOS tap highlight grey flash */
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute; top: -100px; left: 8px;
  background: var(--bg-black); color: white;
  padding: 8px 16px; text-decoration: none;
  font-size: 13px; z-index: 10000;
  border-radius: 4px;
}
.skip-link:focus { top: calc(8px + var(--safe-top)); }

/* ── 3. Sticky header chrome ──────────────────────────────────────────────── */
header.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) 18px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-cream);
  border-bottom: 0.5px solid var(--border-light);
}
.logo {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.logo .deal  { color: var(--accent-purple); }
.logo .depot { color: var(--text-primary); }
.header-right { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-primary);
  transition: background 0.12s;
}
.icon-btn:active { background: rgba(0,0,0,0.06); }
.icon-btn svg { width: 22px; height: 22px; }

/* WhatsApp pill in header */
.header-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 0.5px solid var(--border-strong);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.header-wa .live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-lime);
  box-shadow: 0 0 0 3px rgba(147,213,46,0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(147,213,46,0.2); }
  50%      { box-shadow: 0 0 0 5px rgba(147,213,46,0.05); }
}

/* ── 4. Slide-out menu chrome ─────────────────────────────────────────────── */
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease-out;
  z-index: 90;
}
.menu-overlay.is-open { opacity: 1; pointer-events: auto; }

.menu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 380px);
  background: var(--bg-cream);
  z-index: 100;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: -8px 0 24px rgba(0,0,0,0.08);
}
.menu.is-open { transform: translateX(0); }

.menu-head {
  flex: 0 0 auto;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--border-light);
}
.menu-head .logo { font-size: 20px; }

/* Horizontal scrollable category tabs */
.menu-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 0.5px solid var(--border-light);
  scrollbar-width: none;
}
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.menu-tab.is-active {
  background: var(--text-primary);
  color: var(--bg-cream);
}

.menu-list {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.menu-group { display: none; padding: 8px 0; }
.menu-group.is-active {
  display: block;
  animation: menu-fade 0.2s ease-out;
}
@keyframes menu-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 0.5px solid var(--border-light);
  color: var(--text-primary);
  transition: background 0.12s;
}
.menu-link:active { background: rgba(0,0,0,0.04); }
.menu-link .left { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.menu-link .left strong { font-weight: 500; font-size: 15px; }
.menu-link .desc {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.4;
  font-weight: 400;
}
.menu-link svg {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  color: var(--text-muted);
}
.menu-link.featured { background: var(--accent-purple-tint); }
.menu-link.featured .left strong { color: var(--accent-purple); }

.menu-foot {
  flex: 0 0 auto;
  padding: 14px 18px calc(14px + var(--safe-bottom));
  border-top: 0.5px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-warm);
}
.menu-foot .btn { padding: 12px; font-size: 13.5px; }

/* Buttons (used in menu foot, hero, etc.) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-sans);
  text-align: center;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-primary {
  background: var(--accent-purple);
  color: white;
}
.btn-primary:active { background: var(--accent-purple-deep); }
.btn-ghost {
  background: transparent;
  border: 0.5px solid var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:active { border-color: var(--accent-purple); color: var(--accent-purple); }

/* ── 5. Slim app-download bar ─────────────────────────────────────────────── */
.app-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: var(--bg-black);
  color: white;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  border-top: 0.5px solid rgba(255,255,255,0.08);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.app-bar.is-shown { transform: translateY(0); }
.app-bar .icon {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-purple);
  display: inline-flex; align-items: center; justify-content: center;
}
.app-bar .icon svg { width: 18px; height: 18px; color: white; }
.app-bar .copy {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  gap: 2px;
  line-height: 1.25;
  min-width: 0;
}
.app-bar .copy .ttl { font-weight: 500; font-size: 13px; color: white; }
.app-bar .copy .sub { font-size: 11px; color: rgba(255,255,255,0.6); }
.app-bar .cta {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 8px;
  background: white;
  color: var(--bg-black);
  font-weight: 500;
  font-size: 13px;
  font-family: var(--font-sans);
}
.app-bar .dismiss {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  border-radius: 6px;
}
.app-bar .dismiss:active { background: rgba(255,255,255,0.08); color: white; }
.app-bar .dismiss svg { width: 16px; height: 16px; }

/* When app-bar is visible, push content above it so it doesn't hide the footer */
body.app-bar-shown .content-shell { padding-bottom: var(--app-bar-h); }

/* ── 6. Standard scrolling content shell (used by all pages except homepage) ── */
.content-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main.content {
  flex: 1 0 auto;
}

/* ── 7. Common content patterns ───────────────────────────────────────────── */

/* Page hero — used at top of every content page */
.page-hero {
  padding: 28px 22px 24px;
  background: var(--bg-cream);
  border-bottom: 0.5px solid var(--border-light);
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.breadcrumb a { color: var(--accent-purple); }
.breadcrumb .sep { color: rgba(0,0,0,0.18); margin: 0 6px; }
h1.page-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-wrap: pretty;
}
.page-lede {
  font-family: var(--font-serif);
  font-size: 15.5px;
  color: #2C2C2A;
  line-height: 1.55;
  margin: 0;
}
.page-meta {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border-light);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}
.page-meta strong {
  display: block;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-size: 10px;
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
}

/* Long-form prose container — for legal & regulatory pages */
.prose {
  padding: 28px 22px 44px;
  max-width: 720px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
}
.prose .prose-section {
  padding: 22px 0 4px;
  border-top: 0.5px solid var(--border-light);
  position: relative;
}
.prose .prose-section:first-child { border-top: none; padding-top: 0; }
.prose .section-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent-purple);
  margin-bottom: 6px;
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin: 0 0 14px;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  margin: 22px 0 10px;
}
.prose p { margin: 0 0 14px; color: #2C2C2A; }
.prose p strong { color: var(--text-primary); font-weight: 600; }
.prose ul, .prose ol {
  margin: 0 0 14px;
  padding-left: 22px;
}
.prose li { margin-bottom: 6px; color: #2C2C2A; }
.prose li::marker { color: var(--text-muted); }
.prose a {
  color: var(--accent-purple);
  text-decoration: underline;
  text-decoration-color: rgba(80,40,232,0.35);
  text-underline-offset: 2px;
}
.prose a:active { color: var(--accent-purple-deep); }

/* Callout — used in legal pages for the "investment is subject to market risk" note */
.callout {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--accent-purple-tint);
  border-left: 2px solid var(--accent-purple);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #2C2C2A;
}
.callout strong { color: var(--text-primary); font-weight: 600; }

/* Attention investors band — full-width orange-tinted band that sits below content */
.attention-band {
  background: var(--bg-warm);
  padding: 28px 22px;
  border-top: 0.5px solid var(--border-light);
  border-bottom: 0.5px solid var(--border-light);
}
.attention-band-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent-purple);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 14px;
}
.attention-band ol {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #2C2C2A;
}
.attention-band li { margin-bottom: 10px; }
.attention-band li:last-child { margin-bottom: 0; }
.attention-band li strong { color: var(--text-primary); font-weight: 600; }
.attention-band a { color: var(--accent-purple); text-decoration: underline; }

/* Risk band — dark, mandatory SEBI risk disclosure footer */
.risk-band {
  background: var(--bg-black);
  color: rgba(255,255,255,0.78);
  padding: 22px;
  font-size: 11.5px;
  line-height: 1.55;
}
.risk-band .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent-lime);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.risk-band p { margin: 4px 0; }
.risk-band a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.risk-band .src { color: rgba(255,255,255,0.55); font-size: 10.5px; margin-top: 6px; }

/* ── 8. Slim footer for content pages ─────────────────────────────────────── */
footer.site {
  flex: 0 0 auto;
  padding: 24px 22px;
  background: var(--bg-warm);
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 0.5px solid var(--border);
}
footer.site .foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 12px;
  margin-bottom: 16px;
}
footer.site .col-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 500;
}
footer.site .foot-grid a {
  display: block;
  color: #2C2C2A;
  padding: 4px 0;
  font-size: 12.5px;
}
footer.site .foot-grid a:active { color: var(--accent-purple); }
footer.site .foot-legal {
  padding-top: 14px;
  border-top: 0.5px solid rgba(0,0,0,0.08);
  font-size: 10.5px;
  color: var(--text-tertiary);
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}
footer.site .foot-legal strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── 9. Hover affordance only when device actually supports hover ─────────── */
@media (hover: hover) {
  .icon-btn:hover    { background: rgba(0,0,0,0.04); }
  .btn-primary:hover { background: var(--accent-purple-deep); }
  .btn-ghost:hover   { border-color: var(--accent-purple); color: var(--accent-purple); }
  .menu-tab:hover    { color: var(--text-primary); }
  .menu-link:hover   { background: rgba(0,0,0,0.02); }
  footer.site .foot-grid a:hover { color: var(--accent-purple); }
}

/* ── 10. Reduced motion respect ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none !important; }
  .menu, .app-bar, .menu-overlay { transition: none !important; }
  .menu-group.is-active { animation: none !important; }
}

/* ── 11. Tablet — slightly more breathing room ────────────────────────────── */
@media (min-width: 600px) {
  .page-hero, .prose, .attention-band, footer.site { padding-left: 32px; padding-right: 32px; }
  .risk-band { padding: 22px 32px; }
  h1.page-title { font-size: 36px; }
  .prose h2 { font-size: 24px; }
}
