[x-cloak] {
  display: none !important;
}

:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 3px solid #91c91d;
  outline-offset: 3px;
}

::selection {
  color: #ffffff;
  background: #0d4b2d;
}

.grain {
  position: relative;
}

.grain::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
}

.hero-mask {
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

.marquee-track {
  animation: marquee 28s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.reveal {
  animation: reveal 0.65s ease both;
}

.reveal-delay {
  animation: reveal 0.65s 0.12s ease both;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex;
}

.htmx-request .submit-label {
  display: none;
}

.product-card-title,
.product-card-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.product-card-title {
  min-height: 3.25rem;
  -webkit-line-clamp: 2;
}

.product-card-description {
  min-height: 3.95rem;
  -webkit-line-clamp: 3;
}

.product-card-footer {
  min-height: 7.25rem;
}

.guarantee-stage,
.guarantee-dialog {
  isolation: isolate;
  position: relative;
}

.guarantee-stage::before,
.guarantee-dialog::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 88% 0%, rgba(145, 201, 29, 0.2), transparent 34%),
    radial-gradient(circle at 3% 100%, rgba(255, 255, 255, 0.08), transparent 38%);
}

.guarantee-seal {
  transform: rotate(-4deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.paper-overlay {
  perspective: 1800px;
}

.paper-sheet {
  position: relative;
  isolation: isolate;
  max-width: 100vw;
  background-color: #fbfaf4;
  transform-origin: 50% 90%;
}

.paper-form,
.paper-form-layout,
.paper-section,
.paper-product-list,
.order-product-row {
  min-width: 0;
  max-width: 100%;
}

.paper-form-layout {
  grid-template-columns: minmax(0, 1fr);
}

.paper-product-list {
  overflow-x: hidden;
}

.paper-letterhead > div:first-child {
  min-width: 0;
}

.paper-sheet::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(32, 85, 58, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 85, 58, 0.012) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.9), transparent 32%);
  background-size: 22px 22px, 22px 22px, 100% 100%;
}

.paper-letterhead {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 245, 238, 0.88));
}

.paper-section {
  backdrop-filter: blur(3px);
}

.paper-field {
  display: grid;
  gap: 0.5rem;
  color: #18392b;
  font-size: 0.875rem;
  font-weight: 700;
}

.paper-field input,
.paper-field textarea,
.paper-field select {
  width: 100%;
  min-height: 3.25rem;
  border: 0;
  border-bottom: 2px solid rgba(13, 34, 25, 0.16);
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  color: #14251b;
  background: rgba(247, 245, 238, 0.72);
  font: inherit;
  font-weight: 400;
  outline: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.paper-field textarea {
  min-height: 7rem;
  resize: vertical;
}

.paper-field input:focus,
.paper-field textarea:focus,
.paper-field select:focus {
  border-color: #276b46;
  background: #fff;
  box-shadow: 0 4px 0 rgba(145, 201, 29, 0.18);
}

.paper-field input:user-invalid,
.paper-field textarea:user-invalid {
  border-color: #e04b35;
}

@media (min-width: 1024px) {
  .paper-sheet {
    transform: rotateX(0.45deg) rotateY(-0.2deg);
    box-shadow: 0 36px 100px rgba(5, 23, 15, 0.42), 0 3px 0 rgba(255, 255, 255, 0.8) inset;
  }

  .paper-sheet:focus-within {
    transform: rotateX(0deg) rotateY(0deg);
  }

  .paper-product-list {
    max-height: min(44rem, 64vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 767px) {
  .product-card-title,
  .product-card-description,
  .product-card-footer {
    min-height: 0;
  }

  .mobile-order-cta {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .order-product-row {
    grid-template-columns: auto 3.5rem minmax(0, 1fr);
  }

  .order-product-row > :last-child {
    grid-column: 1 / -1;
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee-track,
  .reveal,
  .reveal-delay,
  .paper-sheet,
  .guarantee-seal,
  .guarantee-dialog {
    animation: none;
    transition: none !important;
    transform: none !important;
  }
}
