/* ============================================================================
   CloudPrint SaaS — Design tokens & core styles
   Direction: premium SaaS, Apple-style glassmorphism, light + dark mode.
   Display face: Space Grotesk · Body: Inter · Utility/mono: JetBrains Mono
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
  /* Color — light mode */
  --bg: #F5F7FB;
  --bg-elevated: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.66);
  --surface-glass-border: rgba(255, 255, 255, 0.9);
  --text-primary: #12141F;
  --text-muted: #626A7D;
  --text-faint: #9AA1B4;

  /* Brand */
  --accent-1: #4338CA;      /* indigo  */
  --accent-2: #06B6D4;      /* cyan    */
  --accent-warm: #F59E0B;   /* amber, badges/CTA */
  --accent-gradient: linear-gradient(120deg, var(--accent-1) 0%, var(--accent-2) 100%);

  --badge-new: #16A34A;
  --badge-pro: #7C3AED;
  --badge-hot: #DC2626;
  --badge-popular: #F59E0B;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-soft: 0 8px 30px rgba(20, 20, 43, 0.08);
  --shadow-lifted: 0 16px 48px rgba(20, 20, 43, 0.14);

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1200px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0A0E1B;
  --bg-elevated: #10152A;
  --surface-glass: rgba(255, 255, 255, 0.055);
  --surface-glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #F3F5FC;
  --text-muted: #A2A9C2;
  --text-faint: #6A7292;
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lifted: 0 20px 60px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ---------------------------------------------------------------------
   Navbar
   ------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--surface-glass-border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover { color: var(--text-primary); }

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

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--surface-glass-border);
  background: var(--surface-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 6px 20px rgba(67, 56, 202, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(67, 56, 202, 0.45); }

.btn-ghost {
  background: var(--surface-glass);
  border-color: var(--surface-glass-border);
  color: var(--text-primary);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
}

/* ---------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------- */
.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: var(--accent-gradient);
  filter: blur(120px);
  opacity: 0.25;
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-1);
  margin-bottom: 20px;
}
[data-theme="dark"] .eyebrow { color: #8FA8FF; }

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero h1 .grad {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-ctas { display: flex; gap: 14px; margin-bottom: 40px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  box-shadow: var(--shadow-soft);
  max-width: 480px;
}
.search-bar input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}
.search-bar input::placeholder { color: var(--text-faint); }
.search-bar svg { flex-shrink: 0; color: var(--text-faint); }

/* Signature element: the print-ticket card */
.ticket-wrap { position: relative; display: flex; justify-content: center; }

.ticket {
  width: 100%;
  max-width: 340px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lifted);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  padding: 26px 24px 22px;
  position: relative;
  animation: ticket-float 6s ease-in-out infinite;
}

.ticket::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -11px;
  height: 22px;
  background: var(--bg);
  clip-path: polygon(
    0% 0%, 4% 100%, 8% 0%, 12% 100%, 16% 0%, 20% 100%, 24% 0%, 28% 100%,
    32% 0%, 36% 100%, 40% 0%, 44% 100%, 48% 0%, 52% 100%, 56% 0%, 60% 100%,
    64% 0%, 68% 100%, 72% 0%, 76% 100%, 80% 0%, 84% 100%, 88% 0%, 92% 100%,
    96% 0%, 100% 100%, 100% 0%
  );
}

@keyframes ticket-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.ticket-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.ticket-sub { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 18px; }

.ticket-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ticket-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.85rem; color: var(--text-faint);
  transition: color 0.4s ease;
}
.ticket-step.active { color: var(--text-primary); font-weight: 600; }
.ticket-step .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-faint);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.ticket-step.active .dot { background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 25%, transparent); }

.ticket-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px dashed var(--surface-glass-border);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
}

/* ---------------------------------------------------------------------
   Category sections
   ------------------------------------------------------------------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.5rem; }
.section-head p { color: var(--text-muted); font-size: 0.9rem; margin: 4px 0 0; }

.chip-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 32px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.chip.active, .chip:hover { background: var(--accent-gradient); color: #fff; border-color: transparent; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lifted); border-color: color-mix(in srgb, var(--accent-2) 40%, var(--surface-glass-border)); }

.tool-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}

.tool-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 999px; color: #fff; text-transform: uppercase;
}
.tool-badge.new { background: var(--badge-new); }
.tool-badge.pro { background: var(--badge-pro); }
.tool-badge.hot { background: var(--badge-hot); }
.tool-badge.popular { background: var(--badge-popular); }

.tool-card h3 { font-size: 1rem; font-family: var(--font-display); margin-bottom: 6px; }
.tool-card p { font-size: 0.84rem; color: var(--text-muted); margin: 0 0 16px; min-height: 38px; }

.tool-open {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.84rem; font-weight: 600; color: var(--accent-1);
}
[data-theme="dark"] .tool-open { color: #8FA8FF; }
.tool-card:hover .tool-open svg { transform: translateX(3px); }
.tool-open svg { transition: transform 0.2s ease; }

/* ---------------------------------------------------------------------
   Why / stats strip
   ------------------------------------------------------------------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-card {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
}
.why-card .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-gradient); display: flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 14px; }
.why-card h4 { font-size: 0.98rem; margin-bottom: 6px; }
.why-card p { font-size: 0.84rem; color: var(--text-muted); margin: 0; }

/* ---------------------------------------------------------------------
   Pricing
   ------------------------------------------------------------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.plan-card {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  display: flex; flex-direction: column;
}
.plan-card.featured { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2), var(--shadow-lifted); }
.plan-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 6px; }
.plan-price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; margin-bottom: 2px; }
.plan-price span { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.plan-note { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 18px; }
.plan-cta { margin-top: auto; }

/* ---------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--surface-glass-border);
  padding: 18px 0;
}
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-family: var(--font-display); font-size: 0.98rem;
  background: none; border: none; color: var(--text-primary); width: 100%; text-align: left; padding: 0;
}
.faq-q svg { transition: transform 0.25s ease; flex-shrink: 0; }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.6;
}
.faq-item.open .faq-a { max-height: 240px; padding-top: 12px; }

/* ---------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */
.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--surface-glass-border);
  padding: 56px 0 28px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer h5 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--text-muted); font-size: 0.88rem; }
.footer ul a:hover { color: var(--text-primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--surface-glass-border); font-size: 0.8rem; color: var(--text-faint); flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .ticket-wrap { order: -1; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .btn-ghost.desktop-only { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
