/* ==========================================================================
   Pal Labs Design System & Reusable Stylesheet
   Theme: Light (Default) & Dark (Toggleable)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables
   -------------------------------------------------------------------------- */
:root {
  /* Default Light Theme */
  --bg: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --bg-subtle: rgba(241, 245, 249, 0.7);
  --border: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(79, 70, 229, 0.4);
  --text: #0F172A;
  --text-muted: #475569;
  --text-dim: #64748B;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-glow: rgba(79, 70, 229, 0.08);
  --accent: #7C3AED;
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 16px 32px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --badge-bg: rgba(79, 70, 229, 0.08);
  --badge-text: #4F46E5;
  --badge-border: rgba(79, 70, 229, 0.2);
  --nav-bg: rgba(248, 250, 252, 0.88);
  --preview-box-bg: #F1F5F9;

  /* Typography & Layout Shared */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --max-width: 1140px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

[data-theme="dark"] {
  /* Dark Theme Overrides */
  --bg: #090D16;
  --bg-surface: #111625;
  --bg-surface-elevated: #171E31;
  --bg-subtle: rgba(17, 22, 37, 0.6);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --accent: #8B5CF6;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.5);
  --badge-bg: rgba(99, 102, 241, 0.15);
  --badge-text: #A5B4FC;
  --badge-border: rgba(99, 102, 241, 0.3);
  --nav-bg: rgba(9, 13, 22, 0.88);
  --preview-box-bg: #090D16;
}

/* --------------------------------------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   3. Header & Navigation
   -------------------------------------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Logo Light/Dark theme display */
.logo-dark {
  display: none;
}

.logo-light {
  display: block;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-focus);
}

/* --------------------------------------------------------------------------
   4. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 44px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--card-shadow);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: rgba(99, 102, 241, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-full);
  color: var(--badge-text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* --------------------------------------------------------------------------
   5. Sections & Typography
   -------------------------------------------------------------------------- */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-title {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Hero */
.hero {
  padding: 6.5rem 0 5rem 0;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1.4rem;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 680px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   6. Cards & Grids
   -------------------------------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-glow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.4rem;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  flex-grow: 1;
}

/* Product Showcase */
.product-showcase {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  box-shadow: var(--card-shadow);
}

.product-info h3 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.product-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  color: var(--text);
}

.feature-list li span {
  color: #10B981;
  font-weight: 700;
}

.product-preview-box {
  background: var(--preview-box-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.preview-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.preview-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.preview-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 260px;
}

/* Advantage Box */
.advantage-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.advantage-box h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.advantage-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Process Grid */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.process-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.step-num {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.process-step h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* About Card & Founder's Corner */
.about-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.about-card h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.about-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.founder-corner {
  margin-top: 2rem;
  padding: 1.6rem 2rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  text-align: left;
}

.founder-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.6rem;
}

.founder-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}

.founder-signature {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.founder-signature strong {
  color: var(--text);
  font-weight: 600;
}

/* Contact Card */
.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  max-width: 740px;
  margin: 0 auto;
  box-shadow: var(--card-shadow-hover);
}

.contact-card h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.email-display {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  padding: 1rem 1.8rem;
  border-radius: var(--radius-md);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 1.2rem;
  transition: all 0.2s ease;
}

.email-display:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.sla-note {
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Contact Social Strip */
.contact-social {
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.contact-social-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Social Buttons */
.social-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-btn:hover {
  color: var(--primary);
  border-color: var(--border-focus);
  background: var(--bg-surface-elevated);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.social-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   7. Legal Pages (Privacy & Terms Shared Styles)
   -------------------------------------------------------------------------- */
.legal-wrapper {
  max-width: 820px;
  margin: 3.5rem auto 5rem auto;
  padding: 0 1.5rem;
}

.back-nav {
  margin-bottom: 2.5rem;
}

.back-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legal-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 0.8rem 0;
  color: var(--text);
}

.legal-content p, .legal-content ul {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--card-shadow);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: auto;
  background: var(--bg-surface);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

.footer-social .social-btn {
  width: 36px;
  height: 36px;
}

.footer-social .social-btn svg {
  width: 17px;
  height: 17px;
}

/* --------------------------------------------------------------------------
   9. Responsive Adaptations
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .product-showcase {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 2rem;
  }
  .about-card {
    padding: 2rem;
  }
  .footer-wrapper {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}
