@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,300;1,9..144,700;1,9..144,900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Syne:wght@400;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════
   SHIVORA BILLING — DESIGN SYSTEM v2.0
   Midnight Saffron — Premium Dark Edition
═══════════════════════════════════════════════════ */

:root {
  /* Core Palette */
  --bg:           #080604;
  --bg-2:         #0E0A07;
  --surface:      #130F0A;
  --card:         #1C1610;
  --card-2:       #231A11;

  /* Accent */
  --fire:         #F05A1A;
  --fire-dim:     #C44710;
  --fire-glow:    rgba(240, 90, 26, 0.18);
  --gold:         #FFAB3C;
  --gold-dim:     rgba(255,171,60,0.12);

  /* Text */
  --cream:        #F2EBE0;
  --cream-2:      #C9BAA5;
  --cream-3:      #8A7860;
  --muted:        #5A4E40;

  /* Functional */
  --border:       rgba(242, 235, 224, 0.07);
  --border-fire:  rgba(240, 90, 26, 0.22);
  --green:        #1EAA62;
  --green-bg:     rgba(30, 170, 98, 0.1);

  /* Effects */
  --radius:       16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --shadow-fire:  0 20px 60px rgba(240, 90, 26, 0.2);
  --shadow-dark:  0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.4);

  /* Nav */
  --nav-h: 72px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--cream);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── GRAIN TEXTURE ── */
body::after {
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
}

/* ═══ NAV ═══ */
#mainNav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: var(--nav-h);
  background: rgba(8, 6, 4, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s, box-shadow 0.4s, border-color 0.4s;
}

#mainNav.scrolled {
  background: rgba(8, 6, 4, 0.92);
  border-color: rgba(242,235,224,0.1);
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--cream);
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--cream);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--cream-3);
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--cream);
  background: rgba(242,235,224,0.07);
}

.nav-links a.active {
  color: var(--fire);
  background: var(--fire-glow);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(8,6,4,0.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 32px;
  z-index: 199;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-drawer a {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--cream-2);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-family: 'Syne', sans-serif;
  transition: color 0.2s;
}

.mobile-drawer a:hover,
.mobile-drawer a.active { color: var(--fire); }

/* ═══ INNER PAGE HERO ═══ */
.page-hero {
  position: relative;
  padding: 160px 48px 80px;
  max-width: 900px;
  margin: 0 auto;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(240,90,26,0.1);
  border: 1px solid var(--border-fire);
  border-radius: 50px;
  padding: 8px 20px 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fire);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s 0.1s forwards;
}

.hero-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fire);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(240,90,26,0.4); }
  50% { opacity: 0.7; transform: scale(0.9); box-shadow: 0 0 0 6px rgba(240,90,26,0); }
}

.page-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--cream);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s 0.2s forwards;
}

.page-hero h1 em {
  font-style: italic;
  color: var(--fire);
}

.page-hero .subtitle {
  margin-top: 20px;
  font-size: 17px;
  color: var(--cream-2);
  max-width: 580px;
  font-weight: 400;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s 0.35s forwards;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
  font-size: 13px;
  color: var(--cream-3);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Background orb for inner pages */
.page-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.page-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(240,90,26,0.06), transparent 70%);
  top: -200px; right: -200px;
  animation: floatOrb 10s ease-in-out infinite;
}

.page-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,171,60,0.04), transparent 70%);
  bottom: 0; left: -150px;
  animation: floatOrb 13s ease-in-out infinite reverse;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0,0); }
  50% { transform: translate(20px, -30px); }
}

/* ═══ CONTENT WRAP ═══ */
.content-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 48px 100px;
  position: relative;
  z-index: 1;
}

/* ═══ SECTION CARDS ═══ */
.section-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 44px 52px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(28px);
  transition: all 0.65s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,90,26,0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.section-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-card:hover {
  border-color: rgba(240,90,26,0.15);
  box-shadow: 0 8px 50px rgba(0,0,0,0.5);
}

.section-num {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fire);
  margin-bottom: 14px;
  opacity: 0.8;
}

.section-card h2 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: var(--cream);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-card p {
  color: var(--cream-2);
  font-size: 15.5px;
  margin-bottom: 16px;
  line-height: 1.8;
}

.section-card p:last-child { margin-bottom: 0; }

/* ── HIGHLIGHT BOXES ── */
.highlight-box {
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.highlight-box.green {
  background: var(--green-bg);
  border: 1px solid rgba(30,170,98,0.2);
}

.highlight-box.orange {
  background: rgba(240,90,26,0.08);
  border: 1px solid rgba(240,90,26,0.2);
}

.highlight-box.blue {
  background: rgba(60,120,220,0.08);
  border: 1px solid rgba(60,120,220,0.2);
}

.highlight-box .icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }

.highlight-box p { margin: 0; font-size: 14.5px; line-height: 1.65; }
.highlight-box.green p { color: #6FD4A5; }
.highlight-box.orange p { color: #F09060; }
.highlight-box.blue p { color: #80AAEE; }

/* ── PERMISSION GRID ── */
.permission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}

.perm-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.2s;
}

.perm-item:hover { border-color: var(--border-fire); }

.perm-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--fire-glow);
  border: 1px solid var(--border-fire);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.perm-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 4px;
}

.perm-info span {
  font-size: 13px;
  color: var(--cream-3);
  line-height: 1.55;
}

/* ── CONTACT CARD ── */
.contact-card {
  background: linear-gradient(135deg, #1C1610 0%, #0F0C08 100%);
  border: 1px solid var(--border-fire);
  border-radius: var(--radius-xl);
  padding: 52px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition: all 0.65s cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,90,26,0.25), transparent 70%);
  pointer-events: none;
}

.contact-card.visible { opacity: 1; transform: translateY(0); }

.contact-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--cream);
  position: relative;
}

.contact-card p {
  color: var(--cream-3);
  margin-bottom: 32px;
  font-size: 15px;
  position: relative;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--fire);
  color: white;
  text-decoration: none;
  padding: 15px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
  position: relative;
  box-shadow: 0 4px 20px rgba(240,90,26,0.35);
}

.contact-link:hover {
  background: #FF6B2B;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240,90,26,0.5);
}

/* ── TOC ── */
.toc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 44px;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s 0.6s forwards;
}

.toc-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cream-3);
  margin-bottom: 16px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toc-list a {
  display: inline-block;
  padding: 7px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cream-3);
  text-decoration: none;
  transition: all 0.2s;
}

.toc-list a:hover {
  background: var(--fire-glow);
  border-color: var(--border-fire);
  color: var(--fire);
}

/* ═══ FAQ ═══ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-item:last-child { border-bottom: none; padding-bottom: 0; }

.faq-q {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--cream);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
  padding: 4px 0;
  transition: color 0.2s;
}

.faq-q:hover { color: var(--fire); }

.faq-q .arrow {
  font-size: 20px;
  color: var(--fire);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  opacity: 0.7;
}

.faq-q.open .arrow { transform: rotate(45deg); opacity: 1; }

.faq-a {
  font-size: 14.5px;
  color: var(--cream-2);
  line-height: 1.75;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.23,1,0.32,1), padding 0.3s;
}

.faq-a.open { max-height: 500px; padding-top: 14px; }

/* ── SUPPORT CHANNELS ── */
.support-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.channel-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.3s, transform 0.3s;
}

.channel-card:hover {
  border-color: var(--border-fire);
  transform: translateY(-3px);
}

.channel-icon { font-size: 28px; }

.channel-card strong {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--cream);
}

.channel-card span { font-size: 13px; color: var(--cream-3); line-height: 1.55; }

.channel-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--fire);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.2s;
}

.channel-card a:hover { gap: 8px; }

/* ═══ FOOTER ═══ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 56px 48px 40px;
  font-size: 13.5px;
  position: relative;
  z-index: 1;
}

footer .footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--cream);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

footer .footer-tagline {
  color: var(--cream-3);
  font-size: 14px;
  margin-bottom: 28px;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
  flex-wrap: wrap;
  align-items: center;
}

footer .footer-links a {
  padding: 6px 14px;
  color: var(--cream-3);
  text-decoration: none;
  font-size: 13px;
  border-radius: 50px;
  transition: all 0.2s;
}

footer .footer-links a:hover {
  color: var(--cream);
  background: rgba(242,235,224,0.06);
}

footer .footer-sep { color: var(--border); font-size: 16px; }

footer .footer-copy {
  color: var(--muted);
  font-size: 12.5px;
}

footer .footer-copy a { color: var(--cream-3); text-decoration: none; }
footer .footer-copy a:hover { color: var(--fire); }

/* ═══ SCROLL REVEAL ═══ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  #mainNav { padding: 0 24px; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .content-wrap { padding: 0 24px 80px; }
  .page-hero { padding: 130px 24px 60px; }
  .section-card { padding: 28px 28px; }
  .contact-card { padding: 36px 28px; }
  .toc-card { padding: 28px; }
  .permission-grid { grid-template-columns: 1fr; }
  .support-channels { grid-template-columns: 1fr; }
  footer { padding: 48px 24px 32px; }
}

@media (max-width: 600px) {
  .page-hero h1 { letter-spacing: -1.5px; }
  .section-card { border-radius: 16px; }
  footer .footer-links { gap: 4px; }
}
