/* ============================================
   River Panda — public site design system
   Used by: index.html, corner.html, store.html
   NOT used by: admin.html, dashboard.html (those use design-system.css)
   ============================================ */

/* --- Design tokens --- */
:root {
  /* Color — brand */
  --brand-teal: #5ab3c8;
  --brand-teal-deep: #3d8a9d;
  --brand-teal-soft: #87c8d9;

  /* Color — surfaces */
  --paper: #fdfdf8;
  --paper-warm: #f5f1e8;
  --ink: #0d1418;
  --ink-soft: #2a3439;

  /* Color — gradient (used in hero) */
  --grad-1: #1a3d47;
  --grad-2: #2d5560;
  --grad-3: #1f4d5c;

  /* Color — text on dark */
  --text-on-dark: #e8f4f8;
  --text-on-dark-muted: #9ec5d6;
  --text-on-dark-faint: #6a8a96;

  /* Color — text on light */
  --text-on-light: #0d1418;
  --text-on-light-muted: #4a5a62;
  --text-on-light-faint: #8a99a3;

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Type scale (modular, ~1.2 ratio) */
  --text-xs: 0.75rem;     /* 12px — captions, labels */
  --text-sm: 0.875rem;    /* 14px — small body, meta */
  --text-base: 1rem;      /* 16px — body */
  --text-lg: 1.125rem;    /* 18px — large body */
  --text-xl: 1.375rem;    /* 22px — sub-headings */
  --text-2xl: 1.75rem;    /* 28px — section titles */
  --text-3xl: 2.25rem;    /* 36px — small hero */
  --text-4xl: 3rem;       /* 48px — hero */
  --text-5xl: 4rem;       /* 64px — large hero */
  --text-6xl: 5.5rem;     /* 88px — mega editorial */

  /* Spacing scale (8pt grid) */
  --sp-1: 0.25rem;   /*  4px */
  --sp-2: 0.5rem;    /*  8px */
  --sp-3: 0.75rem;   /* 12px */
  --sp-4: 1rem;      /* 16px */
  --sp-5: 1.5rem;    /* 24px */
  --sp-6: 2rem;      /* 32px */
  --sp-7: 3rem;      /* 48px */
  --sp-8: 4rem;      /* 64px */
  --sp-9: 6rem;      /* 96px */
  --sp-10: 8rem;     /* 128px */

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);

  /* Layout */
  --content-max: 1200px;
  --content-narrow: 720px;
  --nav-h: 68px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-on-dark);
  background: var(--grad-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

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

/* --- Layout utilities --- */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
.container-narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

/* --- Navbar --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-6);
  background: rgba(13, 20, 24, 0.0);
  backdrop-filter: blur(0);
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(13, 20, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(255,255,255,0.06);
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}

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

.site-nav-links {
  display: flex;
  gap: var(--sp-6);
  align-items: center;
}

.site-nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-on-dark);
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}

.site-nav-links a:hover { opacity: 1; color: var(--brand-teal); }
.site-nav-links a.active { color: var(--brand-teal); opacity: 1; }

.site-nav-cta {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  color: var(--text-on-dark);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

.site-nav-cta:hover {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
  color: var(--ink);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  padding: calc(var(--nav-h) + var(--sp-8)) var(--sp-5) var(--sp-9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(90,179,200,0.15), transparent 60%),
    linear-gradient(180deg, var(--grad-1) 0%, var(--grad-2) 50%, var(--grad-3) 100%);
  overflow: hidden;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: var(--sp-5);
  opacity: 0.85;
}

.hero-mark {
  margin-bottom: var(--sp-5);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 10vw, var(--text-6xl));
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text-on-dark);
  margin-bottom: var(--sp-4);
}

.hero-title .stack {
  display: block;
}

.hero-tagline {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-on-dark-muted);
  max-width: 580px;
  margin: 0 auto var(--sp-6);
  letter-spacing: 0.01em;
}

.hero-founder {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-on-dark-faint);
  margin-bottom: var(--sp-7);
}

.hero-founder::before, .hero-founder::after {
  content: '';
  width: 30px; height: 1px;
  background: var(--text-on-dark-faint);
  opacity: 0.5;
}

.hero-founder strong {
  font-weight: 600;
  color: var(--brand-teal);
  letter-spacing: 0.25em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 14px 32px;
  background: var(--brand-teal);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-full);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(90,179,200,0.25);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(90,179,200,0.35);
}

/* --- Sections --- */
.section {
  padding: var(--sp-9) var(--sp-5);
}
.section-light {
  background: var(--paper);
  color: var(--text-on-light);
}
.section-warm {
  background: var(--paper-warm);
  color: var(--text-on-light);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand-teal-deep);
  margin-bottom: var(--sp-3);
  text-align: center;
}

.section-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
  font-weight: 400;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: var(--sp-3);
}

.section-sub {
  font-size: var(--text-base);
  color: var(--text-on-light-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--sp-8);
  line-height: 1.6;
}

/* Section variant on dark */
.section-dark {
  background: var(--grad-2);
  color: var(--text-on-dark);
}
.section-dark .section-eyebrow { color: var(--brand-teal); }
.section-dark .section-sub { color: var(--text-on-dark-muted); }

/* --- Collection grid --- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-5);
  max-width: var(--content-max);
  margin: 0 auto;
}

.product-card {
  display: block;
  background: white;
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card-image {
  aspect-ratio: 1 / 1;
  background: var(--paper-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.04);
}

.product-card-body {
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
}

.product-card-name {
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-on-light);
  margin-bottom: var(--sp-1);
}

.product-card-price {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-on-light-muted);
}

/* --- Newsletter --- */
.newsletter {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: var(--sp-9) var(--sp-5);
  text-align: center;
}

.newsletter h2 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}

.newsletter p {
  color: var(--text-on-dark-muted);
  max-width: 480px;
  margin: 0 auto var(--sp-6);
}

.newsletter-form {
  display: flex;
  gap: var(--sp-3);
  max-width: 460px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  font: inherit;
  font-size: var(--text-base);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-full);
  color: var(--text-on-dark);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input:focus { border-color: var(--brand-teal); }
.newsletter-form input::placeholder { color: var(--text-on-dark-faint); }

.newsletter-form button {
  padding: 14px 28px;
  background: var(--brand-teal);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--r-full);
  transition: transform 0.2s;
}

.newsletter-form button:hover { transform: translateY(-1px); }

/* --- Values cards (Bamboo Vibes / River Flow / Panda Peace) --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-5);
  max-width: 1000px;
  margin: 0 auto;
}

.value-card {
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  border-radius: var(--r-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.value-card .icon {
  font-size: 2.4rem;
  margin-bottom: var(--sp-4);
  display: block;
}

.value-card h3 {
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-on-light);
  margin-bottom: var(--sp-2);
}

.value-card p {
  font-size: var(--text-sm);
  color: var(--text-on-light-muted);
  line-height: 1.6;
}

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: var(--sp-9) var(--sp-5) var(--sp-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-7);
  max-width: var(--content-max);
  margin: 0 auto var(--sp-8);
}

.footer-brand h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
  color: var(--brand-teal);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-on-dark-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-on-dark-faint);
  margin-bottom: var(--sp-4);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--sp-2); }
.footer-col a {
  font-size: var(--text-sm);
  color: var(--text-on-dark);
  opacity: 0.85;
  transition: color 0.2s, opacity 0.2s;
}
.footer-col a:hover { color: var(--brand-teal); opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--sp-5);
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.footer-bottom .copy {
  font-size: var(--text-xs);
  color: var(--text-on-dark-faint);
  letter-spacing: 0.04em;
}

.footer-bottom .founder {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-on-dark-faint);
}

.footer-bottom .founder strong {
  color: var(--brand-teal);
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .site-nav-links { gap: var(--sp-4); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .newsletter-form { flex-direction: column; }
}
