/* ═══════════════════════════════════════════
   SYSTEM BY DAVE — SHARED STYLES
   ═══════════════════════════════════════════ */

:root {
  --cream: #F5F0E8;
  --cream-dark: #EDE7DB;
  --charcoal: #2C2C2C;
  --charcoal-light: #4A4A4A;
  --rust: #B5654A;
  --rust-light: #C8806A;
  --rust-dark: #9A5038;
  --grid-line: rgba(181, 101, 74, 0.08);
  --grid-line-accent: rgba(181, 101, 74, 0.18);
  --shadow-sm: 0 1px 3px rgba(44,44,44,0.06);
  --shadow-md: 0 4px 20px rgba(44,44,44,0.08);
  --shadow-lg: 0 12px 40px rgba(44,44,44,0.12);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── GRID BACKGROUND ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, var(--grid-line) 0 1px, transparent 1px 80px);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, var(--grid-line-accent) 0 1px, transparent 1px 320px),
    repeating-linear-gradient(0deg, var(--grid-line-accent) 0 1px, transparent 1px 320px);
  pointer-events: none;
  z-index: 0;
}

.page-wrapper { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ─── HEADER ─── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(245, 240, 232, 0.85);
  border-bottom: 1px solid var(--grid-line-accent);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.nav-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--cream);
  overflow: hidden;
}
.nav-brand-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, var(--grid-line-accent) 0 0.5px, transparent 0.5px 10px),
    repeating-linear-gradient(0deg, var(--grid-line-accent) 0 0.5px, transparent 0.5px 10px);
}
.nav-brand-mark span {
  position: relative;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.5px;
}
.nav-brand-mark .mark-d {
  font-size: 11px;
  color: var(--rust);
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.nav-brand-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal-light);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--rust); }
.nav-links a.active { color: var(--rust); }
.nav-links .nav-cta {
  padding: 8px 20px;
  border: 1.5px solid var(--charcoal);
  color: var(--charcoal);
  transition: all 0.25s;
}
.nav-links .nav-cta:hover {
  background: var(--charcoal);
  color: var(--cream);
}

/* ─── SECTION HEADERS ─── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 60px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--grid-line-accent);
}
.section-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--rust);
  letter-spacing: 0.06em;
  opacity: 0.6;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 44px);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.section-subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--charcoal-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: auto;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--charcoal);
  transition: all 0.3s;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--rust);
  border-color: var(--rust);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary svg { transition: transform 0.3s; }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: transparent;
  color: var(--charcoal);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid var(--grid-line-accent);
  transition: all 0.3s;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--charcoal); }

/* ─── PRODUCT CARDS ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--cream);
  border: 1px solid var(--grid-line-accent);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.4s;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
  z-index: 2;
}
.product-card:hover::before { transform: scaleX(1); }
.product-card:hover {
  box-shadow: var(--shadow-lg);
  z-index: 2;
  border-color: rgba(181,101,74,0.3);
  transform: translateY(-4px);
}

.product-image {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--cream-dark);
  position: relative;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-image img.product-image-sort-inbox {
  object-position: center top;
}
.product-card:hover .product-image img { transform: scale(1.04); }

.widget-live-preview {
  aspect-ratio: auto;
  height: 480px;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}
.widget-live-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
  pointer-events: none;
}
.widget-card { pointer-events: auto; }

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--charcoal);
  opacity: 0.06;
  background:
    repeating-linear-gradient(90deg, var(--grid-line) 0 0.5px, transparent 0.5px 24px),
    repeating-linear-gradient(0deg, var(--grid-line) 0 0.5px, transparent 0.5px 24px);
}

.product-body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-category-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rust);
  opacity: 0.4;
}

.product-name {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.product-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--charcoal-light);
  flex-grow: 1;
  margin-bottom: 24px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--grid-line-accent);
}

.product-price {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.product-price .currency {
  font-size: 12px;
  opacity: 0.5;
  margin-right: 2px;
}
.product-price .free-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
}

.product-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
}
.product-card:hover .product-link { gap: 10px; }

/* ─── PAGE HERO ─── */
.page-hero {
  padding: 80px 0 60px;
}
.page-hero-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-hero-tag::before {
  content: '';
  width: 32px;
  height: 1.5px;
  background: var(--rust);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--rust);
}
.page-hero-desc {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--charcoal-light);
  max-width: 560px;
}

/* ─── FOOTER ─── */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--grid-line-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--charcoal-light);
  margin-top: 16px;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 20px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  font-size: 14px;
  font-weight: 300;
  color: var(--charcoal-light);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--rust); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--grid-line-accent);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--charcoal-light);
  letter-spacing: 0.04em;
}

/* ─── ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── CATEGORY PILLS ─── */
.cat-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.cat-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: 1px solid var(--grid-line-accent);
  background: transparent;
  color: var(--charcoal-light);
  cursor: pointer;
  transition: all 0.25s;
}
.cat-pill:hover, .cat-pill.active {
  border-color: var(--rust);
  color: var(--rust);
  background: rgba(181,101,74,0.04);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 680px) {
  .container { padding: 0 24px; }
  .product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 20px; }
  .nav-links .hide-mobile { display: none; }
  .page-hero { padding: 60px 0 40px; }
}
