:root {
  --bg: #faf5ef;
  --bg-elevated: #f4ebe0;
  --bg-soft: #f0e1d2;
  --text: #2b2118;
  --muted-text: #776655;
  --accent: #c27b48;
  --accent-soft: #e7b086;
  --border: #e0d0c0;
  --card-shadow: 0 14px 28px rgba(0, 0, 0, 0.05);
  --radius-lg: 18px;
  --radius-md: 12px;
  --transition-fast: 0.18s ease-out;
}

html[data-theme='dark'] {
  --bg: #12100d;
  --bg-elevated: #1b1712;
  --bg-soft: #221c16;
  --text: #f9f3ea;
  --muted-text: #c3b5a3;
  --accent: #e49a5b;
  --accent-soft: #9b6a3e;
  --border: #3a3127;
  --card-shadow: 0 16px 30px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, var(--bg-soft), var(--bg));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #f7e0c4, #c27b48);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  font-size: 22px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.donation-note a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.theme-toggle {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 80%, transparent);
  padding: 0.35rem 0.6rem;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.theme-toggle-icon {
  font-size: 1.1rem;
}

/* Hero */

.hero {
  max-width: 1080px;
  margin: 1.5rem auto 1.25rem;
  padding: 1.25rem 1.25rem 1.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--bg-elevated) 90%, var(--accent-soft) 10%),
    var(--bg-soft)
  );
  box-shadow: var(--card-shadow);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.hero-content h1 {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.85rem, 2.2vw + 1rem, 2.4rem);
  letter-spacing: -0.02em;
}

.hero-content p {
  margin: 0.25rem 0;
  color: var(--muted-text);
  max-width: 32rem;
  font-size: 0.95rem;
}

.hero-subnote {
  margin-top: 0.75rem;
  font-weight: 500;
}

.hero-note {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted-text);
  opacity: 0.9;
}

/* Shipping pill + tooltip */

.hero-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: color-mix(in srgb, var(--bg-soft) 80%, var(--accent-soft) 20%);
  color: var(--text);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  cursor: default;
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(194, 123, 72, 0.5);
  animation: pillPulse 2.4s ease-out infinite;
}

@keyframes pillPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(194, 123, 72, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(194, 123, 72, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(194, 123, 72, 0);
  }
}

/* Tooltip on hero pill */
.hero-pill::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  transform-origin: left bottom;
  transform: scale(0.92);
  opacity: 0;
  pointer-events: none;
  max-width: 260px;
  padding: 0.45rem 0.6rem;
  border-radius: 9px;
  font-size: 0.75rem;
  line-height: 1.35;
  background: color-mix(in srgb, var(--bg-elevated) 95%, var(--accent-soft) 5%);
  color: var(--text);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
  z-index: 10;
}

.hero-pill:hover::after {
  opacity: 1;
  transform: scale(1);
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 360px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.16);
  animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Products */

.products {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem 1.75rem;
}

.products h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr);
  gap: 1rem;
  padding: 0.9rem;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out,
    border-color 0.2s ease-out, background 0.2s ease-out;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    color-mix(in srgb, var(--accent-soft) 10%, transparent) 0%,
    transparent 35%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
  border-color: color-mix(in srgb, var(--accent-soft) 40%, var(--border) 60%);
  background: color-mix(in srgb, var(--bg-elevated) 80%, var(--bg-soft) 20%);
}

.product-card:hover::before {
  opacity: 1;
}

/* square image slot with tilt */
.product-image-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle at top left, var(--accent-soft), var(--bg-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-width: 230px;
  margin-inline: auto;
  transform: translateY(2px);
  transition: transform 0.25s ease-out;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease-out;
}

.product-card:hover .product-image-wrap {
  transform: translateY(-2px) rotate(-1.5deg);
}

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

.product-body h3 {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
}

.product-subtitle {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.9rem;
}

.product-description {
  margin-top: 0.55rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.price {
  font-weight: 600;
}

.donation-pill {
  font-size: 0.78rem;
  padding: 0.2rem 0.53rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 35%, var(--bg-elevated) 65%);
  color: var(--text);
}

.product-note {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  color: var(--muted-text);
  opacity: 0.9;
}

/* Buttons */

.buy-button {
  position: relative;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in srgb, var(--accent-soft) 80%, var(--accent) 20%)
  );
  color: #fffaf5;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
    filter 0.18s ease-out;
  overflow: hidden;
}

.buy-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 40%;
  height: 200%;
  background: radial-gradient(circle at 0 50%, #ffffff88, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.4s ease-out;
  pointer-events: none;
}

.buy-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  filter: brightness(1.03);
}

.buy-button:hover::after {
  transform: translateX(260%);
}

.buy-button:active {
  transform: translateY(1px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

/* Impact */

.impact {
  max-width: 1080px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}

.impact-inner {
  border-radius: 20px;
  padding: 1rem 1rem 1.1rem;
  background: radial-gradient(
    circle at 10% 0,
    color-mix(in srgb, var(--accent-soft) 30%, var(--bg-soft) 70%),
    var(--bg-elevated)
  );
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.impact-inner h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.impact-inner p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.impact-inner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.impact-list {
  margin: 0.15rem 0 0;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Newsletter */

.newsletter {
  max-width: 1080px;
  margin: 0 auto 1.75rem;
  padding: 0 1.25rem;
}

.newsletter-inner {
  position: relative;
  border-radius: 20px;
  padding: 1rem 1.1rem 1.25rem;
  background: color-mix(in srgb, var(--bg-elevated) 85%, transparent);
  border: 1px dashed color-mix(in srgb, var(--border) 80%, transparent);
}

.newsletter-inner h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.newsletter-inner p {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.newsletter-form {
  margin: 0;
}

.newsletter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.newsletter-fields input[type='email'] {
  flex: 1 1 180px;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
}

.newsletter-fields button {
  position: relative;
  border-radius: 999px;
  border: none;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 85%, var(--accent-soft) 15%),
    var(--accent-soft)
  );
  color: #fffaf5;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    filter var(--transition-fast);
  overflow: hidden;
}

.newsletter-fields button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 40%;
  height: 200%;
  background: radial-gradient(circle at 0 50%, #ffffff88, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.4s ease-out;
  pointer-events: none;
}

.newsletter-fields button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
  filter: brightness(1.03);
}

.newsletter-fields button:hover::after {
  transform: translateX(260%);
}

.newsletter-message {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted-text);
}

/* Newsletter confetti */

.newsletter-confetti {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 1.3rem;
  pointer-events: none;
  animation: confettiFloat 1.2s ease-out forwards;
}

@keyframes confettiFloat {
  0% {
    transform: translateY(8px) scale(0.9);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10px) scale(1);
    opacity: 0;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  padding: 0.9rem 1.25rem 1.25rem;
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted-text);
}

.footer-note {
  margin-top: 0.35rem;
}

/* Scroll reveal */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Logo boop animation */

@keyframes logoBoop {
  0% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-2px) scale(1.06) rotate(-2deg);
  }
  60% {
    transform: translateY(1px) scale(0.98) rotate(1deg);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.logo-icon.boop {
  animation: logoBoop 0.38s ease-out;
}

/* Responsive */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 1rem 1rem 1.25rem;
  }

  .hero-image {
    order: -1;
  }

  .product-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    align-self: stretch;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.7rem;
  }

  .products,
  .hero,
  .impact,
  .newsletter {
    padding-inline: 1rem;
  }

  .site-footer {
    padding-inline: 1rem;
  }

  .newsletter-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .newsletter-fields button {
    width: 100%;
    justify-content: center;
  }
}
