/*
  RINS9 marketing site
  Breakpoints: 600px (sm), 750px (md), 990px (lg), 1280px (xl)
*/

/* ---------- Tokens ---------- */

:root {
  --color-bg: #fff;
  --color-text: #000;
  --color-muted: #555;
  --color-surface: #f4f4f4;
  --color-accent: rgb(2, 68, 54);

  --font-heading: "Prompt", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --site-width: 1440px;
  --section-x: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  --section-top: clamp(1.25rem, 0.75rem + 1.5vw, 2.5rem);
  --gap: clamp(0.875rem, 0.5rem + 1.2vw, 1.5rem);

  --size-feature: clamp(2.25rem, 0.5rem + 4vw, 5rem);
  --size-standard: clamp(1.75rem, 1.35rem + 1.3vw, 2.67rem);
  --size-secondary: clamp(1.0625rem, 0.95rem + 0.45vw, 1.375rem);
  --size-small: 0.875rem;

  --border: 3px;
  --radius: 0.375rem;
  --card-shadow: 6px;
  --btn-border: 2px;
  --btn-shadow: 4px;
  --header-height: 0px;
}

@media (min-width: 990px) {
  :root {
    --card-shadow: 8px;
  }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

picture {
  display: contents;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul,
ol,
dl,
dd {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
}

.skip-link:focus {
  top: 1rem;
}

.text-center {
  text-align: center;
}

.text-link {
  text-underline-offset: 3px;
}

.text-link:hover {
  text-decoration: underline;
}

@media (max-width: 989px) {
  .show-desktop { display: none !important; }
}

@media (min-width: 990px) {
  .show-mobile { display: none !important; }
}

@media (max-width: 749px) {
  .show-tablet-up { display: none !important; }
}

@media (min-width: 750px) {
  .show-phone { display: none !important; }
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 var(--section-x);
}

.container--narrow {
  max-width: calc(48rem + 2 * var(--section-x));
}

.container--product {
  max-width: calc(1280px + 2 * var(--section-x));
}

.section {
  padding: var(--section-y) 0;
}

.section-top {
  margin-top: var(--section-top);
}

.section-intro {
  max-width: 40rem;
  margin: 1rem auto 0;
  color: var(--color-muted);
}

/* ---------- Typography ---------- */

.heading-feature,
.heading-standard,
.heading-secondary {
  font-family: var(--font-heading);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  text-wrap: balance;
}

.heading-feature { font-size: var(--size-feature); }
.heading-standard { font-size: var(--size-standard); }
.heading-secondary { font-size: var(--size-secondary); }

.rte {
  overflow-wrap: break-word;
}

.rte > * + * {
  margin-top: 1em;
}

.rte h1,
.rte h2,
.rte h3,
.rte h4 {
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.rte h1 { font-size: 1.5rem; }
.rte h2 { font-size: 1.3rem; }
.rte h3 { font-size: 1.125rem; }
.rte h4 { font-size: 1rem; }

.rte * + h1,
.rte * + h2,
.rte * + h3 {
  margin-top: 1.5em;
}

.rte a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rte ul,
.rte ol {
  padding-left: 1.25rem;
}

.rte ul { list-style: disc; }
.rte ol { list-style: decimal; }

.rte li + li {
  margin-top: 0.35em;
}

.rte strong,
.rte b {
  font-weight: 700;
}

/* ---------- Buttons, chips, pills ---------- */

.push-btn {
  position: relative;
  display: inline-block;
  padding-bottom: var(--btn-shadow);
  text-align: center;
  cursor: pointer;
}

.push-btn::after {
  content: "";
  position: absolute;
  inset: var(--btn-shadow) 0 0;
  background: var(--color-text);
  border-radius: 9999px;
}

.push-btn__surface {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  background: var(--color-text);
  color: var(--color-bg);
  box-shadow: inset 0 0 0 var(--btn-border) var(--color-text);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  transition: transform 0.1s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.push-btn__surface--secondary {
  background: var(--color-bg);
  color: var(--color-text);
}

.push-btn:hover .push-btn__surface,
.push-btn:focus-visible .push-btn__surface {
  transform: translateY(var(--btn-shadow));
}

.push-btn:focus-visible {
  outline: none;
}

.push-btn:focus-visible .push-btn__surface {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.push-btn--large .push-btn__surface {
  min-height: 64px;
  padding: 1rem 3rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 2px var(--color-text);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--size-small);
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.chip:hover,
.chip.is-active {
  background: var(--color-text);
  color: var(--color-bg);
}

.chip--small {
  min-height: 30px;
  padding: 0 0.75rem;
  font-size: 0.75rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-list li {
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  box-shadow: inset 0 0 0 2px var(--color-text);
  font-size: var(--size-small);
  line-height: 1.3;
}

/* ---------- Form controls ---------- */

.input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 9999px;
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: inset 0 0 0 2px var(--color-text);
  font-size: 1rem;
  line-height: 1.4;
  appearance: none;
}

.input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.input:focus {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--color-text);
}

.input--select {
  width: auto;
  min-height: 40px;
  padding: 0.5rem 2.75rem 0.5rem 1rem;
  background: var(--color-bg) url("data:image/svg+xml,%3Csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 12l22 24 22-24' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 1rem center / 12px;
  font-size: var(--size-small);
  cursor: pointer;
}

/* ---------- Media + cards ---------- */

.media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: var(--border) solid var(--color-text);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card {
  position: relative;
  margin: 0 var(--card-shadow) var(--card-shadow) 0;
}

.card::after {
  content: "";
  position: absolute;
  inset: var(--card-shadow) calc(var(--card-shadow) * -1) calc(var(--card-shadow) * -1) var(--card-shadow);
  background: var(--color-text);
  border-radius: var(--radius);
}

.card__surface {
  position: relative;
  z-index: 1;
  border: var(--border) solid var(--color-text);
  border-radius: var(--radius);
  background: var(--color-bg);
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 40;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-text);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0.5rem var(--section-x);
}

.site-header__left {
  display: flex;
  align-items: center;
}

.site-header__right {
  display: flex;
  justify-content: flex-end;
}

.site-header__logo img {
  width: clamp(110px, 8vw + 70px, 200px);
}

.site-header__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.625rem;
  text-transform: uppercase;
}

.site-header__link svg {
  width: 22px;
  height: 22px;
}

.site-header__nav a:hover,
.site-header__nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.site-header__menu-btn {
  margin-left: -0.625rem;
}

.site-header__nav {
  display: none;
}

.site-header__nav ul {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.625rem;
}

@media (min-width: 990px) {
  .site-header__menu-btn {
    display: none;
  }

  .site-header__nav {
    display: block;
  }

  /* Home page: header sits on top of the hero image */
  .site-header--overlay {
    position: absolute;
    inset: 0 0 auto;
    background: transparent;
    border-bottom: 0;
  }
}

/* ---------- Mobile drawer ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.drawer[hidden] {
  display: none;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.drawer__panel {
  position: relative;
  width: min(85vw, 24rem);
  height: 100%;
  overflow-y: auto;
  padding: 1rem var(--section-x) 2rem;
  background: var(--color-bg);
  animation: drawer-in 0.25s ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.drawer__top {
  display: flex;
  justify-content: flex-end;
}

.drawer__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -0.625rem;
}

.drawer__close svg {
  width: 22px;
  height: 22px;
}

.drawer__menu {
  margin-top: 1rem;
  border-top: 2px solid var(--color-text);
}

.drawer__menu a {
  display: block;
  padding: 1rem 0;
  border-bottom: 2px solid var(--color-text);
  font-size: 1.25rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero__image {
  width: 100%;
}

.hero__content {
  display: none;
}

@media (min-width: 990px) {
  .hero__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: clamp(5rem, 8vw, 8rem) var(--section-x) var(--section-y);
  }

  .hero__text {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
  }

  .hero__heading {
    max-width: min(36rem, 40%);
  }

  .hero__text .push-btn {
    margin-top: clamp(1rem, 2vw, 1.75rem);
  }
}

/* ---------- Product grid + tiles ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--gap) * 1.5) var(--gap);
}

@media (min-width: 750px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 990px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-tile__link {
  display: block;
  height: 100%;
}

.product-tile__media img {
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-tile__link:hover .product-tile__media img {
  transform: scale(1.04);
}

.product-tile__title {
  margin-top: 0.875rem;
  font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.product-tile__link:hover .product-tile__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Promo banner ---------- */

.promo {
  padding: 0 var(--section-x);
}

.promo__link {
  display: block;
  max-width: 1500px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: clamp(1rem, 2.5vw, 2rem);
}

.promo__image {
  width: 100%;
  transition: transform 0.4s ease;
}

.promo__link:hover .promo__image {
  transform: scale(1.02);
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: var(--gap);
  max-width: 72rem;
  margin: 0 auto;
}

@media (min-width: 990px) {
  .faq-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: calc(var(--gap) * 1.5);
  }
}

.faq-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 1rem 1.125rem;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--size-secondary);
  line-height: 1.05;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

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

.faq-card__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.faq-card details[open] .faq-card__chevron {
  transform: rotate(180deg);
}

.faq-card__answer {
  padding: 0 1.125rem 1.125rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: var(--section-y) 0 2rem;
  border-top: 2px solid var(--color-text);
}

.site-footer__top {
  display: grid;
  gap: 2.5rem;
}

.site-footer__brand img {
  width: 120px;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 2rem var(--gap);
}

.site-footer__nav li + li {
  margin-top: 0.75rem;
}

.site-footer__copyright {
  margin-top: var(--section-y);
  font-size: var(--size-small);
  color: var(--color-muted);
}

.site-footer__warning {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ccc;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--color-muted);
}

@media (min-width: 990px) {
  .site-footer__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }
}

/* ---------- Collection listing ---------- */

.listing__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-text);
}

.listing__filters {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.listing__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--size-small);
}

@media (max-width: 749px) {
  .listing__filters {
    flex: 1 1 100%;
    overflow-x: auto;
    margin: 0 calc(var(--section-x) * -1);
    padding: 2px var(--section-x);
    scrollbar-width: none;
  }

  .listing__filters::-webkit-scrollbar {
    display: none;
  }

  .listing__meta {
    flex: 1 1 100%;
  }
}

@media (min-width: 750px) {
  .listing__filters {
    flex-wrap: wrap;
  }
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  padding: 1.25rem 0;
  font-size: var(--size-small);
  color: var(--color-muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
}

.breadcrumb a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.breadcrumb [aria-current] {
  color: var(--color-text);
}

/* ---------- Product page ---------- */

.product {
  display: grid;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-bottom: var(--section-y);
}

@media (min-width: 990px) {
  .product {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
  }

  .product__gallery {
    position: sticky;
    top: 1.5rem;
  }
}

.product__stage {
  touch-action: pan-y;
}

.product__slide {
  position: absolute;
  inset: 0;
  padding: 4%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.product__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.product__slide img {
  object-fit: contain;
}

.product__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-text);
  border-radius: 50%;
  background: var(--color-bg);
  transform: translateY(-50%);
  transition: background-color 0.15s, color 0.15s;
}

.product__arrow:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.product__arrow svg {
  width: 20px;
  height: 20px;
}

.product__arrow--prev { left: 0.75rem; }
.product__arrow--next { right: 0.75rem; }

.product__thumbs {
  display: flex;
  gap: 0.625rem;
  margin-top: 0.875rem;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.product__thumbs li {
  flex: 0 0 clamp(64px, 16%, 96px);
}

.product__thumb {
  width: 100%;
  border-width: 2px;
  opacity: 0.55;
  transition: opacity 0.15s, box-shadow 0.15s;
}

.product__thumb img {
  padding: 6%;
  object-fit: contain;
}

.product__thumb:hover,
.product__thumb.is-active {
  opacity: 1;
}

.product__thumb.is-active {
  box-shadow: inset 0 0 0 1px var(--color-text);
}

.product__info {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.product__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.product__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2rem, 1.4rem + 2vw, 3.25rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}

.product__options {
  display: grid;
  gap: 1rem;
}

.product__option dt {
  margin-bottom: 0.5rem;
  font-size: var(--size-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product__actions {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .product__actions {
    grid-template-columns: 1fr 1fr;
  }
}

.product__description {
  padding-top: 1.5rem;
  border-top: 2px solid var(--color-text);
}

/* ---------- Age gate ---------- */

.age-gate {
  display: none;
}

.age-gate-open {
  overflow: hidden;
}

.age-gate-open .age-gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  overflow-y: auto;
  padding: var(--section-x);
  background: var(--color-bg);
}

.age-gate__card {
  width: 100%;
  max-width: 30rem;
  margin: auto;
}

.age-gate__surface {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
}

.age-gate__surface img {
  width: 180px;
}

.age-gate__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}
