/* ====================================================================
   PaperGenerator.in — by PYQ Junction
   Ultra-Responsive, Mobile-First Modern UI Stylesheet
   ==================================================================== */

:root {
  --bg: #070a12;
  --bg-card: #0e1322;
  --bg-card-hover: #141b30;
  --border: #1a2238;
  --border-light: rgba(255, 255, 255, 0.08);
  --primary: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --accent: #3b82f6;
  --accent-purple: #8b5cf6;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --warning: #f59e0b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

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

/* Base Responsive Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 10, 18, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  width: 100%;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 3px 8px;
  border-radius: 8px;
  height: 38px;
  max-height: 38px;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-logo:hover .brand-logo-badge {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.brand-logo-img {
  height: 30px !important;
  max-height: 30px !important;
  width: auto !important;
  max-width: 55px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
}

.brand-title {
  font-weight: 800;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 16px var(--primary-glow);
  flex-shrink: 0;
}

.brand-sub {
  font-size: 0.65rem;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
  padding: 6px 4px;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Hamburger Button */
.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive Grid Utility Classes (Replaces all hardcoded inline styles) */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
  width: 100%;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 32px);
  width: 100%;
}

.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 80px);
  width: 100%;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: clamp(40px, 8vw, 80px) 0 clamp(30px, 6vw, 60px);
  text-align: center;
  overflow: hidden;
  width: 100%;
}

.hero-glow {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 600px);
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.08) 50%, transparent 80%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: clamp(0.72rem, 1.8vw, 0.84rem);
  font-weight: 700;
  margin-bottom: 20px;
  max-width: 100%;
  line-height: 1.4;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 18px;
  word-break: break-word;
}

.hero-title span.highlight {
  background: linear-gradient(135deg, #34d399 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto clamp(24px, 4vw, 36px);
  line-height: 1.65;
}

/* Countdown Clock */
.countdown-box {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 2vw, 16px);
  margin-bottom: clamp(28px, 5vw, 40px);
  flex-wrap: nowrap;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.countdown-item {
  background: rgba(14, 19, 34, 0.95);
  border: 1px solid var(--border);
  padding: clamp(10px, 2vw, 16px) clamp(10px, 2vw, 18px);
  border-radius: var(--radius-md);
  flex: 1;
  min-width: 65px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.countdown-num {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #34d399;
  font-family: var(--font-mono);
  line-height: 1;
}

.countdown-lbl {
  font-size: clamp(0.65rem, 1.5vw, 0.72rem);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 5px;
  font-weight: 700;
}

/* Waitlist Lead Card */
.waitlist-card {
  background: linear-gradient(180deg, rgba(20, 27, 48, 0.85) 0%, rgba(14, 19, 34, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 36px);
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  width: 100%;
  text-align: left;
}

.waitlist-title {
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.waitlist-sub {
  color: var(--text-muted);
  font-size: clamp(0.85rem, 2vw, 0.92rem);
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
}

.waitlist-form {
  display: flex;
  gap: 12px;
  flex-direction: column;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.input-field {
  width: 100%;
  background: rgba(7, 10, 18, 0.85);
  border: 1px solid var(--border);
  color: #fff;
  padding: clamp(10px, 2.5vw, 13px) clamp(12px, 3vw, 16px);
  border-radius: var(--radius-sm);
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.input-field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

select.input-field {
  color: #cbd5e1;
}

/* Feature Sections & Bento Grids */
.features-section {
  padding: clamp(40px, 8vw, 80px) 0;
  border-top: 1px solid var(--border);
  width: 100%;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(32px, 6vw, 56px);
  width: 100%;
}

.section-tag {
  color: var(--primary);
  font-size: clamp(0.75rem, 1.8vw, 0.84rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin-bottom: 12px;
  word-break: break-word;
}

.section-desc {
  color: var(--text-muted);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  line-height: 1.6;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
  width: 100%;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3.5vw, 32px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.bento-title {
  font-size: clamp(1.15rem, 2.5vw, 1.3rem);
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.bento-text {
  color: var(--text-muted);
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  line-height: 1.6;
  flex-grow: 1;
}

.bento-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

/* FAQ Accordion */
.faq-section {
  padding: clamp(40px, 8vw, 80px) 0;
  border-top: 1px solid var(--border);
  width: 100%;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  width: 100%;
}

.faq-question {
  padding: clamp(14px, 3vw, 20px) clamp(16px, 3vw, 24px);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.faq-question:hover {
  color: #34d399;
}

.faq-answer {
  padding: 0 clamp(16px, 3vw, 24px) clamp(14px, 3vw, 20px);
  color: var(--text-muted);
  font-size: clamp(0.88rem, 2vw, 0.95rem);
  line-height: 1.65;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.2s ease;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  background: #05070d;
  border-top: 1px solid var(--border);
  padding: clamp(40px, 6vw, 60px) 0 30px;
  margin-top: auto;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 40px);
  margin-bottom: 40px;
  width: 100%;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.86rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ====================================================================
   Comprehensive Media Queries for All Breakpoints
   ==================================================================== */

/* Laptops & Tablets Landscape (<= 1024px) */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablets & Mobile Navigation (<= 991px) */
@media (max-width: 991px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(9, 13, 22, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px;
    gap: 14px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    font-size: 1rem;
    padding: 8px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .mobile-toggle {
    display: flex;
  }
}

/* Tablets Portrait (<= 768px) */
@media (max-width: 768px) {

  /* Stack Feature Splits */
  .feature-split {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
  }

  /* Bento and Grids on Tablets */
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile Phones (<= 640px) */
@media (max-width: 640px) {
  .nav-actions .btn-primary {
    display: none; /* Hide header waitlist button on phones to keep logo and hamburger clean */
  }

  .brand-sub {
    display: none; /* Hide tiny pill tag on very narrow headers */
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .waitlist-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }
}

/* Very Small Mobile Phones (<= 380px) */
@media (max-width: 380px) {
  .countdown-box {
    gap: 6px;
  }
  .countdown-item {
    min-width: 55px;
    padding: 8px 6px;
  }
  .countdown-num {
    font-size: 1.3rem;
  }
}
