/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #ffffff;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Top nav ---------- */
.topnav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.topnav a {
  color: #1a1a1a;
  text-decoration: none;
}

.topnav a:hover {
  color: #6b6b6b;
}

/* ---------- Layout ---------- */
main {
  max-width: 56ch;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}

footer {
  text-align: center;
  padding: 3rem 1rem 4rem;
  color: #9a9a9a;
  font-size: 0.9rem;
}

/* ---------- Hero ---------- */
.hero {
  margin: 2rem 0 3rem;
  text-align: center;
}

.hero-img {
  display: block;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 10;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1 {
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  text-align: center;
}

.subhead {
  font-size: 1.15rem;
  line-height: 1.5;
  font-weight: 500;
  color: #444;
  text-align: center;
  margin: 0 auto 1.75rem;
  max-width: 560px;
}

h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 3rem 0 1.25rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

p {
  margin: 0 0 1.1rem;
}

strong {
  font-weight: 700;
}

em {
  color: #555;
}

hr {
  border: 0;
  border-top: 1px solid #ececec;
  margin: 3.5rem auto;
  max-width: 120px;
}

/* ---------- Intro block ---------- */
.intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2rem;
}

.intro p:first-child {
  font-size: 1.15rem;
  line-height: 1.55;
}

.note {
  font-style: italic;
  color: #888;
  font-size: 0.95rem;
  margin-top: 1.75rem;
}

/* ---------- Buttons ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.75rem 0 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.05s ease, background 0.15s ease;
  border: 1px solid transparent;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #1a1a1a;
  color: #ffffff;
}

.btn-primary:hover {
  background: #333333;
}

.btn-secondary {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #1a1a1a;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

/* ---------- Lists ---------- */
.trust-bar {
  padding: 0.9rem 1rem;
  border: 1px solid #ececec;
  border-radius: 6px;
  color: #444;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.process-list,
.next-steps,
.method-list,
.source-list {
  padding-left: 1.35rem;
  margin: 1.25rem 0;
}

.process-list li,
.next-steps li,
.method-list li,
.source-list li {
  margin-bottom: 1rem;
}

.inline-video {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 1rem auto 0;
  border-radius: 8px;
  background: #111;
}

.process-list span,
.next-steps span,
.benefits span,
.method-list span,
.source-list span {
  font-weight: 650;
}

.inline-cta {
  margin: 2rem 0 0.5rem;
}

.lead-line {
  font-size: 1.1rem;
  line-height: 1.55;
}

.benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefits li {
  margin-bottom: 1.4rem;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  border-top: 1px solid #ececec;
}

.price-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid #ececec;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sold-out {
  color: #9a9a9a;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.02em;
}

.underline-green,
.underline-red,
.hov {
  text-decoration-line: underline;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 6px;
  text-decoration-skip-ink: auto;
}

.underline-green { text-decoration-color: #2ea043; }
.underline-red   { text-decoration-color: #d6334a; }

/* ---------- Inline hover-image triggers (YC-style) ---------- */

/* Paragraphs that contain a hover trigger become the positioning context,
   so popovers can pop into the right (or left) margin of the text block. */
p:has(.hov),
.lead-line:has(.hov) {
  position: relative;
}

.hov {
  cursor: help;
  transition: text-decoration-color 0.15s ease;
}

.hov-red   { text-decoration-color: #d6334a; }
.hov-green { text-decoration-color: #2ea043; }

/* Inline circular thumbnail: always visible, marks the trigger */
.hov-thumb {
  display: inline-block;
  width: 1.6em;
  height: 1.6em;
  margin: 0 0.18em 0 0.32em;
  vertical-align: -0.45em;
  border-radius: 50%;
  object-fit: cover;
  background: #f4f4f4;
  box-shadow: 0 0 0 1.5px #fff,
              0 0 0 3px rgba(0, 0, 0, 0.12),
              0 2px 6px rgba(0, 0, 0, 0.10);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.2s ease;
}

.hov:hover .hov-thumb,
.hov:focus .hov-thumb {
  transform: scale(1.12);
  box-shadow: 0 0 0 1.5px #fff,
              0 0 0 3px rgba(0, 0, 0, 0.18),
              0 4px 12px rgba(0, 0, 0, 0.20);
}

/* Full image popover: opens to the right of the text BLOCK (paragraph),
   in the right margin. Never overlaps the running text. */
.hov-pop {
  position: absolute;
  left: 100%;
  margin-left: 1.25rem;
  top: 50%;
  width: 280px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(-8px) scale(0.96);
  transition: opacity 0.22s ease,
              transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 30;
}

.hov:hover .hov-pop,
.hov:focus .hov-pop {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

.hov-pop img,
.hov-pop video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.40),
              0 6px 16px -6px rgba(0, 0, 0, 0.18);
  background: #111;
}

/* Pair variant: one popover left, one right (for the green source line) */
.hov-pop-left,
.hov-pop-right {
  position: absolute;
  top: 50%;
  width: 230px;
  pointer-events: none;
  opacity: 0;
  z-index: 30;
  transition: opacity 0.22s ease,
              transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hov-pop-left  { right: 100%; margin-right: 1.25rem; transform: translate(10px, -50%) scale(0.96); }
.hov-pop-right { left:  100%; margin-left:  1.25rem; transform: translate(-10px, -50%) scale(0.96); }

.hov:hover .hov-pop-left,
.hov:focus .hov-pop-left,
.hov:hover .hov-pop-right,
.hov:focus .hov-pop-right {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
}

.hov-pop-left img,
.hov-pop-right img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.40),
              0 6px 16px -6px rgba(0, 0, 0, 0.18);
  margin-bottom: 10px;
}

.hov-pop-left img:last-child,
.hov-pop-right img:last-child {
  margin-bottom: 0;
}

/* Narrow viewport: no room beside the text column.
   Re-anchor popovers to the trigger span itself (not the paragraph),
   shrink them, and let them open below the trigger, overlaying the
   running text is fine here, that's the trade-off for small screens. */
@media (hover: none), (max-width: 1024px) {
  p:has(.hov),
  .lead-line:has(.hov) {
    position: static;
  }

  .hov {
    position: relative;
  }

  .hov-pop {
    left: 50%;
    margin-left: 0;
    top: calc(100% + 10px);
    width: 180px;
    transform: translateX(-50%) translateY(-6px) scale(0.95);
  }

  .hov:hover .hov-pop,
  .hov:focus .hov-pop {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  /* Pair popovers — anchor to the bottom of the viewport so all four
     images stay on-screen regardless of where the trigger sits. */
  .hov-pop-left,
  .hov-pop-right {
    position: fixed;
    top: auto;
    bottom: 12px;
    width: calc(50vw - 14px);
    max-width: 200px;
    z-index: 50;
  }

  .hov-pop-left {
    right: auto;
    left: 8px;
    margin-right: 0;
    transform: translateY(8px) scale(0.96);
  }

  .hov-pop-right {
    left: auto;
    right: 8px;
    margin-left: 0;
    transform: translateY(8px) scale(0.96);
  }

  .hov:hover .hov-pop-left,
  .hov:focus .hov-pop-left,
  .hov:hover .hov-pop-right,
  .hov:focus .hov-pop-right {
    transform: translateY(0) scale(1);
  }

  .hov-pop-left img,
  .hov-pop-right img {
    max-height: 36vh;
    object-fit: cover;
  }
}

/* Dismiss override — added by JS on outside-tap / scroll, hides any
   open popover regardless of lingering :hover or :focus state. */
body.dismiss-hovers .hov-pop,
body.dismiss-hovers .hov-pop-left,
body.dismiss-hovers .hov-pop-right {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ---------- Closing ---------- */
.closing {
  text-align: center;
}

.tagline {
  font-size: 1.2rem;
  line-height: 1.7;
  font-weight: 500;
  margin: 1.5rem 0 2rem;
}

.contact-line {
  font-size: 0.95rem;
  color: #444;
  text-align: center;
}

/* ---------- Product page ---------- */
.product-main {
  max-width: 980px;
}

.story-copy {
  max-width: 56ch;
  margin: 0 auto;
}

.product-title {
  margin-top: 1.5rem;
  text-align: left;
}

.story-media {
  margin: 3rem auto;
  text-align: center;
}

.story-media img {
  display: block;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 3px;
}

figcaption {
  max-width: 42ch;
  margin: 0.65rem auto 0;
  color: #666;
  font-size: 0.78rem;
  line-height: 1.35;
}

.tech-list {
  margin: 1.5rem 0 2.5rem;
}

.tech-list div {
  border-top: 1px solid #ececec;
  padding: 1.15rem 0;
}

.tech-list dt {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.tech-list dd {
  margin: 0;
}

.usage-list {
  padding-left: 1.25rem;
  margin: 1.25rem 0 1.5rem;
}

.usage-list li {
  margin-bottom: 0.75rem;
}

.usage-list span {
  font-weight: 700;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 2rem;
  align-items: start;
  margin: 4rem 0;
}

.product-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-info h2 {
  margin-top: 0.35rem;
}

.badge {
  margin: 0;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
}

.rating {
  color: #e0a800;
  font-weight: 700;
}

.rating span {
  color: #1a1a1a;
  margin-left: 0.35rem;
}

.price-label {
  margin: 2rem 0 0.1rem;
  font-size: 0.85rem;
  color: #555;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 800;
}

.quantity-row {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8d8d8;
  margin-bottom: 1rem;
}

.quantity-row button,
.quantity-row span {
  min-width: 2.5rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 0;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
}

.quantity-row button {
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
}

.quantity-row button:hover { background: #f4f4f4; }
.quantity-row button:active { background: #e8e8e8; }

.quantity-row span {
  border-left: 1px solid #d8d8d8;
  border-right: 1px solid #d8d8d8;
}

.buy-button {
  display: block;
  width: 100%;
  padding: 0.95rem 1rem;
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.reviews {
  margin: 5rem 0 1rem;
  padding: 1.5rem;
  border: 1px solid #e8e8e8;
}

.reviews-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.reviews-summary h2 {
  margin-top: 0;
}

.review-link {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  border: 1px solid #9a9a9a;
  color: #1a1a1a;
  font-size: 0.85rem;
  text-decoration: none;
}

.rating-bars {
  max-width: 420px;
  margin: 1rem 0 2rem;
}

.rating-bars p {
  display: grid;
  grid-template-columns: 5rem 1fr 3rem;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}

.rating-bars meter {
  width: 100%;
}

.review {
  border-top: 1px solid #ececec;
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.review h3 {
  margin-top: 0.2rem;
}

/* ---------- About page ---------- */
.about-main {
  max-width: 980px;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
  margin: 1.5rem 0 4rem;
}

.about-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-gallery img:nth-child(1),
.about-gallery img:nth-child(4) {
  aspect-ratio: 3 / 4;
}

.about-gallery img:nth-child(2) {
  margin-top: 1.5rem;
  object-position: 30% 50%;
}

.about-gallery img:nth-child(3) {
  margin-top: 0.5rem;
  aspect-ratio: 3 / 3.7;
  object-position: 70% 50%;
}

.about-gallery img:nth-child(5) {
  margin-top: 1.25rem;
  object-position: 50% 20%;
}

.about-gallery.single-image {
  display: block;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.about-gallery.single-image img {
  aspect-ratio: auto;
  margin: 0;
}

.about-copy {
  margin-bottom: 4rem;
}

/* ---------- FAQ page ---------- */
.faq-main {
  max-width: 980px;
}

.faq-list {
  margin-top: 2rem;
  border-bottom: 1px solid #e2e2e2;
}

.faq-list details {
  border-top: 1px solid #e2e2e2;
  padding: 1.2rem 0 1.4rem;
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.6rem;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list details p {
  max-width: 78ch;
  margin: 2rem 0 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 2rem;
  }

  .subhead {
    font-size: 1.15rem;
  }

  h2 {
    font-size: 1.45rem;
  }

  .topnav {
    gap: 1.25rem;
    padding: 1.5rem 1rem;
    font-size: 0.95rem;
  }

  main {
    padding: 0.5rem 1.25rem 3rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .badge {
    text-align: left;
  }

  .reviews {
    padding: 1rem;
  }

  .reviews-summary {
    display: block;
  }

  .review-link {
    display: inline-block;
    margin-top: 0.5rem;
  }

  .about-gallery {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .about-gallery img,
  .about-gallery img:nth-child(1),
  .about-gallery img:nth-child(3),
  .about-gallery img:nth-child(4) {
    aspect-ratio: 4 / 3;
    margin-top: 0;
  }

  .faq-list summary {
    font-size: 1.05rem;
  }

  .faq-list details p {
    margin-top: 1.25rem;
  }
}
