/* Punto Coma — Rubber Hose · mobile-first */
:root {
  --primary: #c45c26;
  --secondary: #a8b55a;
  --tertiary: #3c2415;
  --ink: #1a1a1a;
  --cream: #f5ede0;
  --foam: #fff8e7;
  --espresso: #2c1810;
  --accent-red: #a52a2a;
  --whatsapp: #25d366;
  --chunky: 4px 4px 0 0 #1a1a1a;
  --chunky-lg: 8px 8px 0 0 #1a1a1a;
  --tap: 44px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --fab-space: calc(5.5rem + var(--safe-bottom));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(26, 26, 26, 0.04) 1px, transparent 1px);
  background-size: 10px 10px;
  overflow-x: clip;
  padding-bottom: var(--fab-space);
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus (keyboard) */
:focus {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--foam);
  padding: 0.65rem 1rem;
  border: 3px solid var(--secondary);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus {
  top: calc(0.5rem + var(--safe-top));
}

.rubber-hose-border { border: 3px solid var(--ink); }
.rubber-hose-border-thick { border: 5px solid var(--ink); }
.shadow-chunky { box-shadow: var(--chunky); }
.shadow-chunky-lg { box-shadow: var(--chunky-lg); }

.btn-press {
  min-height: var(--tap);
  min-width: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (hover: hover) and (pointer: fine) {
  .btn-press:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 #1a1a1a;
  }
}
.btn-press:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 0 #1a1a1a;
}

/* Brand mark: hide long wordmark on very narrow screens */
.brand-word {
  font-size: 1.15rem;
  line-height: 1;
  white-space: nowrap;
}
@media (min-width: 380px) {
  .brand-word { font-size: 1.5rem; }
}

/* Sticky header safe area */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--safe-top);
}

/* Animations */
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}
@keyframes steam {
  0% { opacity: 0.2; transform: translateY(8px) scale(0.9); }
  50% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-24px) scale(1.1); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.bob { animation: bob 3.2s ease-in-out infinite; }
@media (hover: hover) and (pointer: fine) {
  .wiggle-hover:hover { animation: wiggle 0.4s ease-in-out infinite; }
}

.steam-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.35;
  animation: steam 2.4s ease-in-out infinite;
}
.steam-dot:nth-child(2) { animation-delay: 0.4s; left: 18px; }
.steam-dot:nth-child(3) { animation-delay: 0.9s; left: 36px; }

/* Brew method cards — mobile-first tap targets */
.brew-card {
  cursor: pointer;
  border: 3px solid var(--ink);
  box-shadow: var(--chunky);
  background: white;
  min-height: 5.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-align: left;
}
@media (hover: hover) and (pointer: fine) {
  .brew-card:hover { transform: translateY(-4px) rotate(-0.5deg); }
}
.brew-card.is-active {
  background: var(--secondary);
  box-shadow: var(--chunky-lg);
}

.product-card {
  border: 3px solid var(--ink);
  box-shadow: var(--chunky-lg);
  background: white;
  transition: transform 0.2s ease;
  /* no rotate on mobile — prevents horizontal overflow */
  transform: none !important;
}
@media (min-width: 768px) {
  .product-card.tilt-md { transform: rotate(1deg) !important; }
  .product-card.tilt-md-opp { transform: rotate(-1deg) !important; }
  @media (hover: hover) and (pointer: fine) {
    .product-card:hover { transform: translateY(-6px) rotate(-0.8deg) !important; }
  }
}

.toast {
  position: fixed;
  bottom: calc(5.25rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: var(--foam);
  padding: 0.75rem 1rem;
  border: 3px solid var(--secondary);
  box-shadow: var(--chunky);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  max-width: min(92vw, 22rem);
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.3;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Cart chip — below header on mobile, not colliding with logo */
.cart-chip {
  position: fixed;
  left: 0.75rem;
  right: auto;
  top: auto;
  bottom: calc(5.25rem + var(--safe-bottom));
  z-index: 95;
  background: var(--primary);
  color: white;
  border: 3px solid var(--ink);
  box-shadow: var(--chunky);
  padding: 0.65rem 0.9rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  display: none;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--tap);
  max-width: calc(100vw - 6.5rem);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cart-chip.visible { display: flex; }
@media (min-width: 768px) {
  .cart-chip {
    left: auto;
    right: 1rem;
    top: 5.75rem;
    bottom: auto;
    font-size: 0.75rem;
    max-width: none;
  }
}

.note-chip {
  display: inline-block;
  background: var(--foam);
  border: 2px solid var(--ink);
  padding: 0.2rem 0.5rem;
  margin: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.filter-chip {
  border: 3px solid var(--ink);
  background: white;
  padding: 0.55rem 0.85rem;
  min-height: var(--tap);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  box-shadow: 2px 2px 0 0 #1a1a1a;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
@media (hover: hover) and (pointer: fine) {
  .filter-chip:hover { transform: translateY(-2px); }
}
.filter-chip.is-active {
  background: var(--secondary);
}

.img-frame {
  border: 3px solid var(--ink);
  box-shadow: var(--chunky);
  overflow: hidden;
  background: white;
}

/* Tilts only from tablet up */
.section-tilt { transform: none; }
@media (min-width: 768px) {
  .section-tilt { transform: rotate(-0.6deg); }
  .section-tilt-opp { transform: rotate(0.6deg); }
}

/* Headings mobile scale helpers (when Tailwind alone is huge) */
.headline-hero {
  font-size: clamp(2rem, 9vw, 4.5rem);
  line-height: 0.95;
  word-break: break-word;
}
.headline-page {
  font-size: clamp(1.85rem, 8vw, 4rem);
  line-height: 0.98;
  word-break: break-word;
}

/* Product title + price stack on narrow cards */
.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.product-meta h2,
.product-meta h3 {
  flex: 1 1 8rem;
  min-width: 0;
  font-size: clamp(1.25rem, 5vw, 1.6rem);
}

/* Floating WhatsApp */
.fab-wa {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, var(--safe-bottom));
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap);
  padding: 0.7rem 0.95rem;
  background: var(--whatsapp);
  color: #fff;
  border: 4px solid var(--ink);
  box-shadow: var(--chunky);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.fab-wa:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 #1a1a1a;
}

/* Mobile nav panel */
#nav-panel a {
  min-height: var(--tap);
  display: flex;
  align-items: center;
  padding: 0.35rem 0;
}

/* Forms mobile */
input,
select,
textarea,
button {
  font-size: 16px; /* avoid iOS zoom on focus */
}
@media (min-width: 768px) {
  input,
  select,
  textarea {
    font-size: inherit;
  }
}

/* Wholesale phone CTA wrap */
.wa-number-btn {
  word-break: break-all;
  text-align: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bob,
  .steam-dot,
  .wiggle-hover:hover {
    animation: none !important;
  }
  .btn-press,
  .brew-card,
  .product-card,
  .filter-chip,
  .toast {
    transition: none !important;
  }
}
