/*
  Shitboys — styles
  Palette: sage greens + brown accents
*/

:root {
  --sage-25: #f6f9f6;
  --sage-50: #eef5f0;
  --sage-200: #cfe3d5;
  --sage-300: #b9d6c1;
  --sage-500: #6d9b7d;
  --sage-600: #4b7e5b;
  --sage-800: #2e5c40;

  --brown-200: #d7c3ad;
  --brown-300: #c5ad8f;
  --brown-400: #b39272;
  --brown-600: #7b5a3c; /* poop-brown accent */
  --brown-700: #5f442e;

  --bg: var(--sage-25);
  --text: #1f2a24;
  --muted: #4a5a51;
  --card: #ffffff;
  --border: #e2ece5;
  --focus: #2e5c40;
  --ring: 0 0 0 3px rgba(75, 126, 91, 0.25);

  /* iOS safe-area insets */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, var(--bg), #fff 600px);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Anchor offset for sticky header */
section[id] {
  scroll-margin-top: 84px;
}

/* Section dividers intentionally removed */

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.site-header .brand {
  gap: 6px;
}
.brand-name {
  letter-spacing: 0.2px;
  opacity: 0;
  transition: opacity 0.28s ease;
}
/* Navbar brand title gradient + size */
.site-header .brand .brand-name {
  font-weight: 800;
  font-size: 20px;
  line-height: 1.1;
  display: inline-block;
  padding-bottom: 0.04em; /* prevent descender clipping */
  color: transparent;
  background: linear-gradient(
    130deg,
    var(--brown-600) 0%,
    var(--brown-500, #a98260) 35%,
    var(--brown-400) 70%,
    var(--brown-300) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-mark {
  opacity: 0;
  transition: opacity 0.28s ease;
}
.site-header .brand .brand-mark {
  display: inline-flex;
  align-self: center;
}
.header-show-icon .site-header .brand-mark {
  opacity: 1;
}
.header-show-icon .site-header .brand-name {
  opacity: 1;
}
.site-header .brand svg {
  width: 34px;
  height: 34px;
}
.main-nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}
.main-nav a {
  color: var(--muted);
  text-decoration: none;
}
.main-nav a:hover {
  color: var(--text);
}

.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-brown {
  background: var(--brown-600);
  color: #fff;
}
.btn-brown:hover {
  background: var(--brown-700);
}
.btn-outline {
  border-color: var(--sage-600);
  color: var(--sage-800);
}
.btn-outline:hover {
  background: var(--sage-50);
}

.hero {
  padding: 8px 0 20px;
  background: radial-gradient(
    600px 200px at 20% 0%,
    var(--sage-50),
    transparent
  );
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
.hero-copy {
  text-align: left;
}
.hero-copy h1 {
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 12px;
}
.brand-head {
  font-weight: 900;
  letter-spacing: 0.3px;
  line-height: 1.06;
  display: inline-block;
  padding-bottom: 0.08em;
  margin: 4px 0 6px;
  font-size: clamp(52px, 9vw, 96px);
  color: transparent;
  background: linear-gradient(
    130deg,
    var(--brown-600) 0%,
    var(--brown-500, #a98260) 35%,
    var(--brown-400) 70%,
    var(--brown-300) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 60ch;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  margin: 18px 0 6px;
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  justify-content: flex-start;
  margin-left: -20px;
}
.hero-brand .brand-mark svg {
  width: 360px;
  height: 360px;
}
.hero-word {
  font-size: 64px;
  font-weight: 800;
  color: var(--sage-800);
}
.hero-brown-mark svg {
  width: 72px;
  height: 72px;
}
.hero-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  opacity: 0.92;
}
.hero-logo svg {
  width: 96px;
  height: 96px;
}
.hero-logo .hero-word {
  font-size: 28px;
  font-weight: 800;
  color: var(--sage-800);
}
.badges {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
  color: var(--sage-800);
  flex-wrap: wrap;
}
.badges li {
  background: var(--sage-50);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg-mark {
  position: absolute;
  inset: auto;
  top: 10px;
  left: 40px;
  opacity: 0.08;
  filter: blur(6px);
  z-index: 0;
}
.dna {
  display: grid;
  grid-template-columns: repeat(5, 10px);
  gap: 22px;
  filter: saturate(0.9);
}
.dna {
  position: relative;
  z-index: 1;
}
.dna span {
  width: 10px;
  height: 140px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--sage-300), var(--sage-600));
  box-shadow: 0 6px 20px rgba(46, 92, 64, 0.18);
}

.section-head h2 {
  font-size: 28px;
  margin: 0 0 6px;
}
.section-head p {
  color: var(--muted);
  margin: 0 0 8px;
}

.profiles {
  padding: 28px 0 8px;
}
.filters {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-label {
  font-weight: 600;
  color: var(--sage-800);
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  color: #274734;
  cursor: pointer;
}
.chip[aria-pressed="true"],
.chip:focus {
  outline: none;
  box-shadow: var(--ring);
  border-color: var(--sage-600);
}

.carousel {
  position: relative;
}
.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: var(--sage-800);
  opacity: 0;
  transition: opacity 0.2s ease;
  /* Use mask to draw a simple chevron */
  background: currentColor;
  z-index: 2;
}
.carousel::before {
  left: 4px;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.carousel::after {
  right: 4px;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.carousel.is-left-shadow::before { opacity: 0.35; }
.carousel.is-right-shadow::after { opacity: 0.35; }
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  color: var(--sage-800);
}
.carousel-nav:hover {
  background: var(--sage-50);
}
.carousel-nav.prev {
  left: -6px;
}
.carousel-nav.next {
  right: -6px;
}
.carousel .carousel-nav { display: none !important; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px;
  scroll-snap-type: x mandatory;
}
.carousel-track::-webkit-scrollbar {
  height: 8px;
}
.carousel-track::-webkit-scrollbar-thumb {
  background: var(--sage-200);
  border-radius: 999px;
}
.card {
  flex: 0 0 calc((100% - 32px) / 3);
  scroll-snap-align: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px; /* a bit more breathing room */
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(46, 92, 64, 0.06);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sage-500), var(--sage-800));
  position: relative;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06) 30%, rgba(0, 0, 0, 0) 70%);
}
.title {
  font-weight: 700;
}
.subtitle {
  color: var(--muted);
  font-size: 13px;
}
.subtitle.note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.tag {
  background: var(--sage-50);
  border: 1px solid var(--border);
  color: var(--sage-800);
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fact {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 8px;
  font-size: 13px;
}
.fact strong {
  display: block;
  font-weight: 700;
  color: #2b4638;
}
.cta {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}
.cta .btn {
  padding: 8px 12px;
  font-size: 14px;
}

.how {
  padding: 36px 0 10px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.step-num {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--sage-600);
  color: #fff;
  font-weight: 700;
  margin-bottom: 6px;
}

.science {
  padding: 32px 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 10px 0 6px;
}
.metric {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.metric strong {
  display: block;
  color: #2b4638;
}
.disclaimer {
  color: #5a6b61;
  font-size: 13px;
  margin-top: 8px;
}

.testimonials {
  padding: 28px 0;
}
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.quotes figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.quotes blockquote {
  margin: 0 0 8px;
  font-size: 16px;
}
.quotes figcaption {
  color: var(--muted);
  font-size: 13px;
}

.faq {
  padding: 12px 0 40px;
}
.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 8px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #2b4638;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
}
.brandline {
  font-weight: 700;
}
.legal {
  color: #5a6b61;
  font-size: 12px;
  max-width: 70ch;
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-brand .brand-mark svg {
    width: 260px;
    height: 260px;
  }
  .hero-word {
    font-size: 48px;
  }
  .hero-copy h1 {
    font-size: 30px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .quotes {
    grid-template-columns: 1fr;
  }
  .card {
    flex: 0 0 calc((100% - 16px) / 2);
  }
}
@media (max-width: 640px) {
  .main-nav {
    display: none;
  }
  .hero-brand {
    margin-left: -20px;
  }
  .hero-brand .brand-mark svg {
    width: 180px;
    height: 180px;
  }
  .hero-brown-mark svg {
    width: 44px;
    height: 44px;
  }
  .hero-word {
    font-size: 36px;
  }
  .hero-copy h1 {
    font-size: 26px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .carousel-nav.prev {
    left: 2px;
  }
  .carousel-nav.next {
    right: 2px;
  }
  .card {
    flex: 0 0 100%;
  }
  .footer-inner {
    padding: 20px;
  }
  .legal {
    font-size: 14px;
    line-height: 1.6;
  }
  .site-header .brand .brand-name {
    font-size: 18px;
  }
}

/* Modal */
.modal[hidden] {
  display: none;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  /* Add padding to respect safe areas and create breathing room */
  padding: 16px;
  padding-top: max(16px, calc(16px + var(--safe-top)));
  padding-right: max(16px, var(--safe-right));
  padding-bottom: max(16px, calc(16px + var(--safe-bottom)));
  padding-left: max(16px, var(--safe-left));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop {
  /* Fixed to full viewport; with viewport-fit=cover this reaches under safe areas */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  z-index: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.is-open .modal-backdrop {
  opacity: 1;
}
.modal-card {
  position: relative;
  z-index: 1; /* above backdrop */
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  max-width: 560px;
  width: 92%;
  /* Ensure the card can scroll within the viewport on mobile */
  max-height: calc(100dvh - 48px - var(--safe-top) - var(--safe-bottom));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.is-open .modal-card {
  transform: none;
  opacity: 1;
}
.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--sage-800);
}
.modal-sub {
  color: var(--muted);
  margin-top: 6px;
}
.field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}
.field-row label {
  font-weight: 600;
  color: #2b4638;
}
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.field-row input[type="email"],
.field-row select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
}
.form-actions {
  margin-top: 8px;
}
.tiny {
  color: #5a6b61;
  font-size: 12px;
  margin-top: 8px;
}
.success.hidden {
  display: none;
}
.success h3 {
  margin: 0 0 6px;
}

/* Removed sticky mobile CTA */
@media (max-width: 640px) {
  /* Right-align header CTA on mobile */
  .site-header .btn.btn-brown {
    margin-left: auto;
  }

  /* Extra vertical padding around modal on small screens */
  .modal {
    padding-top: max(24px, calc(24px + var(--safe-top)));
    padding-bottom: max(24px, calc(24px + var(--safe-bottom)));
  }

  /* Slightly larger tap target for close */
  .modal-close {
    top: 10px;
    right: 12px;
  }
}
