@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');
@import url('https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css');

:root {
  --ink-navy: #2b3a3a;
  --sage: #6d8b74;
  --sage-dark: #4f6b56;
  --terracotta: #c96f4a;
  --terracotta-dark: #a85635;
  --mustard: #e0a939;
  --cream-paper: #faf3e7;
  --cream-paper-dark: #f0e6d2;
  --parchment: #efe6d5;
  --stitch-line: #d8cbb0;
  --text-dark: #2b3a3a;
  --text-muted: #5b6b63;
  --shadow-soft: rgba(43, 58, 58, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream-paper);
  color: var(--text-dark);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(109, 139, 116, 0.04) 2px, transparent 2px);
  background-size: 40px 40px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--cream-paper-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--sage);
  border-radius: 10px;
  border: 3px solid var(--cream-paper-dark);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sage-dark);
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #ffffff;
  border-bottom: 3px solid var(--sage);
  box-shadow: 0 2px 10px var(--shadow-soft);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 4px 18px var(--shadow-soft);
}

.logo-mark {
  transition: transform 0.4s ease;
}
.logo-mark:hover {
  transform: rotate(-4deg) scale(1.05);
}

/* Navigation */
.nav-link {
  position: relative;
  color: var(--ink-navy);
  font-weight: 600;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--terracotta-dark);
}

.mobile-menu {
  background-color: #ffffff;
  border-top: 2px dashed var(--stitch-line);
}

.mobile-menu-toggle {
  color: var(--ink-navy);
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: var(--terracotta);
  color: #ffffff;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 0 var(--terracotta-dark);
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--terracotta-dark);
  background-color: #d47d54;
  color: #ffffff;
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: var(--sage-dark);
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 700;
  border: 2px solid var(--sage);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-secondary:hover {
  background-color: var(--sage);
  color: #ffffff;
}

.btn-mustard {
  display: inline-block;
  background-color: var(--mustard);
  color: var(--ink-navy);
  padding: 0.7rem 1.6rem;
  border-radius: 30px;
  font-weight: 700;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn-mustard:hover {
  background-color: #ecbb52;
  transform: translateY(-2px);
}

/* Cards */
.card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--stitch-line);
  box-shadow: 0 3px 12px var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px var(--shadow-soft);
}

.card-stitched {
  border: 2px dashed var(--stitch-line);
  border-radius: 8px;
  background: var(--parchment);
}

.badge-popular {
  background-color: var(--mustard);
  color: var(--ink-navy);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  display: inline-block;
}

/* Forms */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background-color: #ffffff;
  border: 2px solid var(--stitch-line);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(109, 139, 116, 0.2);
}

.form-label {
  color: var(--ink-navy);
  font-weight: 600;
  margin-bottom: 0.35rem;
  display: block;
}

form {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 6px 20px var(--shadow-soft);
  border: 1px solid var(--stitch-line);
  position: relative;
}

form::before {
  content: '\f0c6';
  font-family: 'remixicon';
  position: absolute;
  top: -14px;
  right: 22px;
  background: var(--mustard);
  color: var(--ink-navy);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 6px var(--shadow-soft);
}

/* Accordion */
.accordion-header {
  cursor: pointer;
  background-color: var(--parchment);
  border: 1px solid var(--stitch-line);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--ink-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.25s ease;
}
.accordion-header:hover {
  background-color: var(--cream-paper-dark);
}
.accordion-header .ri-arrow-down-s-line {
  transition: transform 0.3s ease;
}
.accordion-header.active .ri-arrow-down-s-line {
  transform: rotate(180deg);
}
.accordion-content {
  display: none;
  padding: 1rem 1.25rem;
  background-color: #ffffff;
  border: 1px solid var(--stitch-line);
  border-top: none;
  border-radius: 0 0 6px 6px;
  color: var(--text-muted);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--ink-navy);
  color: #f1f1f1;
  padding: 1.25rem;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
  border-top: 3px solid var(--mustard);
}

.cookie-banner h3 {
  color: #ffffff;
}

.cookie-banner p {
  color: #dcdcdc;
}

.cookie-banner a {
  color: #9fd6c0;
  text-decoration: underline;
}

.cookie-banner a:hover {
  color: #c8ecdd;
}

/* Section styles */
.section-alt {
  background-color: var(--parchment);
}

.divider-leaf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--sage);
  margin: 1.5rem 0;
}
.divider-leaf::before,
.divider-leaf::after {
  content: '';
  height: 2px;
  width: 60px;
  background-color: var(--stitch-line);
}

/* Hero */
.hero-torn-edge {
  position: relative;
}
.hero-torn-edge::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 24px;
  background: var(--cream-paper);
  clip-path: polygon(0% 100%, 4% 0%, 8% 100%, 12% 0%, 16% 100%, 20% 0%, 24% 100%, 28% 0%, 32% 100%, 36% 0%, 40% 100%, 44% 0%, 48% 100%, 52% 0%, 56% 100%, 60% 0%, 64% 100%, 68% 0%, 72% 100%, 76% 0%, 80% 100%, 84% 0%, 88% 100%, 92% 0%, 96% 100%, 100% 0%, 100% 100%);
}

/* Loading spinner */
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--stitch-line);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fade animations */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Product grid tag */
.tag-eco {
  background-color: rgba(109, 139, 116, 0.15);
  color: var(--sage-dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Footer */
.site-footer {
  background-color: var(--ink-navy);
  color: #d8dedb;
}
.site-footer h4 {
  color: #ffffff;
}
.site-footer a {
  color: #c3d0cb;
  transition: color 0.2s ease;
}
.site-footer a:hover {
  color: var(--mustard);
}

/* Responsive tweaks */
@media (max-width: 768px) {
  form::before {
    display: none;
  }
  .hero-torn-edge::after {
    height: 14px;
  }
}