/* ==========================================================================
   RMarin · Home page
   Sections only used on the home page. Load after the components.
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-bottom: 78%;
  background: var(--color-hero-bg);
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 58%;
  object-fit: cover;
  object-position: 78% bottom;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 40px var(--gutter) 0;
}

.hero__eyebrow {
  color: var(--color-heading-gray);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.hero__title {
  max-width: 640px;
  margin-top: 16px;
  color: var(--color-orange);
  font-family: var(--font-display);
  font-size: clamp(26px, 8.2vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero__cta {
  margin-top: 20px;
  padding: 0 22px;
}

/* Decorative arrows: desktop only */
.hero__arrow {
  display: none;
}

@media (min-width: 600px) {
  .hero__content { padding-top: 48px; }
}

@media (min-width: 768px) {
  .hero { padding-bottom: 46%; }

  .hero__image {
    height: 64%;
    object-position: 80% bottom;
  }

  .hero__eyebrow { font-size: 16px; }

  .hero__title { font-size: clamp(30px, 6vw, 52px); }

  .hero__cta { margin-top: 28px; }
}

@media (min-width: 1024px) {
  .hero {
    height: calc(920 * var(--u));
    padding-bottom: 0;
  }

  .hero__image {
    inset: 0;
    height: 100%;
    object-position: center;
  }

  .hero__content {
    padding: calc(180 * var(--u)) 0 0 var(--gutter);
  }

  .hero__eyebrow {
    font-size: max(14px, calc(24 * var(--u)));
  }

  .hero__title {
    max-width: calc(800 * var(--u));
    margin-top: calc(40 * var(--u));
    font-size: calc(64 * var(--u));
  }

  .hero__cta {
    margin-top: calc(80 * var(--u));
    padding: 0 calc(24 * var(--u));
  }

  .hero__arrow {
    position: absolute;
    top: calc(424 * var(--u));
    z-index: 1;
    display: block;
    width: calc(42 * var(--u));
    height: calc(76 * var(--u));
  }

  .hero__arrow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 78'%3E%3Cpath d='M40 2 3 39l37 37' fill='none' stroke='%23030303' stroke-width='3.2'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .hero__arrow--prev {
    left: calc(50 * var(--u));
  }

  .hero__arrow--next {
    right: calc(60 * var(--u));
    transform: scaleX(-1);
  }
}

/* ---------- Highlights ---------- */
.highlights {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-space) var(--gutter) 0;
}

.highlights__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 12px;
}

.highlights__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-orange);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.highlights__item img {
  width: auto;
  height: 40px;
}

.highlights__number {
  font-size: 52px;
  line-height: 1;
}

@media (min-width: 600px) {
  /* Icon and text in a row (except the "+30" counter) */
  .highlights__item:not(.highlights__item--years) {
    flex-direction: row;
    text-align: left;
  }
}

@media (min-width: 768px) {
  .highlights__list { gap: 32px 24px; }

  .highlights__item { font-size: max(19px, calc(24 * var(--u))); }

  .highlights__item img { height: 48px; }

  .highlights__number { font-size: 60px; }
}

@media (min-width: 1024px) {
  .highlights {
    padding: var(--section-space) calc(180 * var(--u)) 0;
  }

  .highlights__list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  .highlights__item {
    justify-content: normal;
    gap: calc(6 * var(--u));
  }

  .highlights__item--years {
    gap: 0;
  }

  .highlights__item img {
    height: calc(56 * var(--u));
  }

  .highlights__number {
    font-size: calc(80 * var(--u));
  }
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 32px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-space) var(--gutter) 0;
}

.about__media {
  overflow: hidden;
}

.about__image {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.about__title {
  color: var(--color-orange);
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.about__text {
  margin-top: 20px;
  color: var(--color-muted);
  font-size: max(18px, calc(28.5 * var(--u)));
  font-weight: 400;
  line-height: 1.4;
}

.about__link {
  margin-top: 28px;
  color: var(--color-muted);
  font-size: max(18px, calc(28 * var(--u)));
  font-weight: 400;
}

.about__link:hover {
  color: var(--color-orange-strong);
}

@media (min-width: 1024px) {
  .about {
    grid-template-columns: calc(582 * var(--u)) 1fr;
    gap: calc(80 * var(--u));
    padding: var(--section-space) calc(180 * var(--u)) 0;
  }

  .about__image {
    max-width: 100%;
    margin: 0;
  }

  .about__content {
    padding-top: calc(100 * var(--u));
  }

  .about__title {
    font-size: calc(33 * var(--u));
  }

  .about__text {
    max-width: calc(826 * var(--u));
    margin-top: calc(40 * var(--u));
    font-weight: 300;
  }

  .about__link {
    margin-top: calc(66 * var(--u));
    font-weight: 300;
  }
}

/* ---------- Product lines ---------- */
.products {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-top: var(--section-space);
  text-align: center;
}

.products__intro {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter);
  text-align: left;
}

.products__title {
  color: var(--color-orange);
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.products__text {
  color: var(--color-muted);
  font-size: max(18px, calc(28 * var(--u)));
  font-weight: 400;
  line-height: 1.4;
}

.products__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
  padding: 0 var(--gutter);
}

.product-card {
  position: relative;
  display: block;
  aspect-ratio: 582 / 822;
  overflow: hidden;
  background: var(--color-black);
  color: var(--color-white);
}

.product-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  transition: --hover-scale 0.6s var(--ease), opacity 0.6s var(--ease);
}

.product-card:hover .product-card__image,
.product-card:focus-visible .product-card__image {
  --hover-scale: 1.04;
  opacity: 0.55;
}

.product-card__title {
  position: absolute;
  top: 44.5%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-orange);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.product-card__title-main {
  font-size: clamp(30px, 11vw, 48px);
}

.product-card__title-sub {
  margin-top: 4px;
  font-size: clamp(22px, 8.4vw, 38px);
}

.product-card__title--stacked {
  top: 44%;
}

.product-card__title--stacked .product-card__title-main {
  font-size: clamp(26px, 9.2vw, 44px);
}

.product-card__title--stacked .product-card__title-sub {
  font-size: clamp(22px, 7.8vw, 36px);
}

.product-card__link {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  font-size: 17px;
  font-weight: 300;
}

.products__cta {
  margin-top: 20px;
  padding: 0 32px;
}

@media (min-width: 768px) {
  .products__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 40px;
    padding: 0 12px;
  }

  .product-card__title-main { font-size: clamp(20px, 4.4vw, 40px); }

  .product-card__title-sub { font-size: clamp(16px, 3.4vw, 32px); }

  .product-card__title--stacked .product-card__title-main { font-size: clamp(18px, 3.7vw, 34px); }

  .product-card__title--stacked .product-card__title-sub { font-size: clamp(15px, 3.1vw, 28px); }

  .product-card__link { font-size: 16px; }

  .products__cta { margin-top: 32px; }
}

@media (min-width: 1024px) {
  .products__intro {
    grid-template-columns: calc(640 * var(--u)) calc(790 * var(--u));
    justify-content: space-between;
    gap: 0;
    padding: 0 calc(180 * var(--u));
  }

  .products__title {
    font-size: calc(34.4 * var(--u));
  }

  .products__text {
    font-weight: 300;
    line-height: 1.2;
  }

  .products__list {
    gap: calc(40 * var(--u));
    margin-top: calc(80 * var(--u));
    padding: 0 calc(40 * var(--u)) 0 calc(60 * var(--u));
  }

  .product-card__title-main {
    font-size: calc(78 * var(--u));
  }

  .product-card__title-sub {
    margin-top: calc(14 * var(--u));
    font-size: calc(59 * var(--u));
  }

  .product-card__title--stacked .product-card__title-main {
    font-size: calc(69 * var(--u));
  }

  .product-card__title--stacked .product-card__title-sub {
    font-size: calc(59 * var(--u));
  }

  .product-card__link {
    left: calc(41 * var(--u));
    right: auto;
    bottom: calc(34 * var(--u));
    font-size: max(15px, calc(29 * var(--u)));
  }

  .products__list li:nth-child(2) .product-card__link { left: calc(35 * var(--u)); }
  .products__list li:nth-child(3) .product-card__link { left: calc(48 * var(--u)); }

  .products__cta {
    margin-top: calc(60 * var(--u));
    padding: 0 calc(24 * var(--u));
  }
}

/* ---------- Mining ---------- */
/* Mobile: image on top and text below on a dark background.
   768–1023: image as background with a gradient over it. ≥1024: reference. */
.mining {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-top: var(--section-space);
}

.mining__header {
  padding: 0 calc(180 * var(--u));
  text-align: center;
}

.mining__title {
  color: var(--color-orange);
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.mining__subtitle {
  max-width: 560px;
  margin: calc(16 * var(--u)) auto 0;
  color: var(--color-muted);
  font-size: max(18px, calc(28 * var(--u)));
  font-weight: 400;
  line-height: 1.4;
}

.mining__banner {
  position: relative;
  margin-top: 32px;
  padding-bottom: 48px;
  overflow: hidden;
  background: #1c1c1c;
}

.mining__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.mining__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 88% center;
}

.mining__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 28px var(--gutter) 0;
}

.mining__banner-title {
  color: var(--color-orange);
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.mining__text {
  margin-top: 16px;
  color: var(--color-white);
  font-size: max(17px, calc(28 * var(--u)));
  font-weight: 400;
  line-height: 1.4;
}

.mining__text strong {
  font-weight: 700;
}

.mining__content .btn {
  height: auto;
  min-height: 48px;
  margin: 20px 0 0;
  padding: 12px 22px;
  white-space: normal;
  text-align: center;
}

.mining__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

.mining__dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-white);
}

.mining__dots .is-active {
  background: radial-gradient(circle, var(--color-white) 0 28%, var(--color-orange) 31%);
}

@media (min-width: 768px) {
  .mining__banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(20, 20, 20, 0.92) 0%, rgba(20, 20, 20, 0.75) 60%, rgba(20, 20, 20, 0.35) 100%);
  }

  .mining__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .mining__image { object-position: 85% center; }

  .mining__content { padding-top: 40px; }

  .mining__content .btn {
    margin-top: 28px;
    height: max(44px, calc(55 * var(--u)));
    min-height: 44px;
    padding: 0 max(20px, calc(32 * var(--u)));
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .mining__title {
    font-size: calc(34.4 * var(--u));
  }

  .mining__subtitle {
    max-width: calc(800 * var(--u));
    font-weight: 300;
    line-height: 1.2;
  }

  .mining__banner {
    height: calc(560 * var(--u));
    margin-top: calc(40 * var(--u));
    padding-bottom: 0;
  }

  .mining__banner::before {
    content: none;
  }

  .mining__image {
    object-position: right center;
  }

  .mining__content {
    max-width: calc(1160 * var(--u));
    padding: calc(52 * var(--u)) 0 0 calc(133 * var(--u));
  }

  .mining__banner-title {
    font-size: calc(54 * var(--u));
  }

  .mining__text {
    margin-top: calc(34 * var(--u));
    font-weight: 300;
  }

  .mining__content .btn {
    margin: calc(42 * var(--u)) 0 0 calc(7 * var(--u));
  }

  .mining__dots {
    bottom: calc(12 * var(--u));
    gap: calc(6 * var(--u));
  }

  .mining__dots span {
    width: calc(21 * var(--u));
    height: calc(21 * var(--u));
  }
}

/* ---------- Process ---------- */
.process {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-space) var(--gutter);
  text-align: center;
}

.process__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}

.process__title {
  max-width: 620px;
  color: var(--color-orange);
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.process__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: var(--color-black);
  color: var(--color-orange);
  font-size: max(17px, calc(28 * var(--u)));
  font-weight: 700;
}

.process__steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 16px;
  margin-top: 48px;
}

.process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.process-step:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 280px;
}

.process-step__icon {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--color-black);
  transition: transform var(--duration) var(--ease);
}

.process-step__icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.process-step:hover .process-step__icon {
  transform: translateY(-6px);
}

.process-step__title {
  margin-top: 20px;
  color: var(--color-orange);
  font-size: max(19px, calc(22 * var(--u)));
  font-weight: 700;
  line-height: 1.4;
}

.process-step__text {
  margin-top: calc(4 * var(--u));
  color: var(--color-muted);
  font-size: max(17px, calc(21.5 * var(--u)));
  font-weight: 400;
  line-height: 1.4;
}

.process__cta {
  height: auto;
  min-height: 48px;
  margin-top: 20px;
  padding: 12px 24px;
  white-space: normal;
}

@media (min-width: 600px) {
  .process__steps { grid-template-columns: repeat(3, 1fr); }

  .process-step:last-child {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
  }
}

@media (min-width: 768px) {
  .process-step__icon { width: 130px; height: 130px; }

  .process-step__icon img { width: 76px; height: 76px; }

  .process__cta {
    margin-top: 48px;
    height: max(48px, calc(70 * var(--u)));
    padding: 0 max(28px, calc(70 * var(--u)));
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .process {
    padding: var(--section-space) calc(180 * var(--u));
  }

  .process__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0;
  }

  .process__title {
    max-width: calc(700 * var(--u));
    font-size: calc(34.4 * var(--u));
  }

  .process__badge {
    width: calc(727 * var(--u));
    height: calc(55 * var(--u));
    padding: 0;
  }

  .process__steps {
    grid-template-columns: repeat(5, calc(299 * var(--u)));
    justify-content: center;
    gap: 0;
    margin-top: calc(120 * var(--u));
  }

  .process-step {
    padding: 0 calc(24 * var(--u));
  }

  /* Connector line between circles */
  .process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(95 * var(--u));
    left: 50%;
    width: 100%;
    height: 1px;
    background: var(--color-line);
    z-index: -1;
  }

  .process-step__icon {
    width: calc(190 * var(--u));
    height: calc(190 * var(--u));
  }

  .process-step__icon img {
    width: calc(115 * var(--u));
    height: calc(115 * var(--u));
  }

  .process-step__title {
    margin-top: calc(39 * var(--u));
  }

  .process-step__text {
    font-weight: 300;
  }

  .process__cta {
    margin-top: calc(80 * var(--u));
  }
}

/* ---------- Blog ---------- */
.blog {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-space) 0;
  background: var(--color-surface);
  text-align: center;
}

.blog__title {
  color: var(--color-orange);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.blog__track {
  margin-top: 32px;
  padding-bottom: var(--space-2);
  text-align: left;
}

.blog__track .splide__slide {
  width: min(80vw, 440px);
  margin-right: 20px;
}

.blog-card__media {
  aspect-ratio: 696 / 344;
  overflow: hidden;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__title {
  margin-top: 14px;
  color: var(--color-orange);
  font-size: max(24px, calc(32 * var(--u)));
  font-weight: 500;
  line-height: 1.4;
}

.blog-card__text {
  margin-top: calc(4 * var(--u));
  color: var(--color-muted);
  font-size: max(17px, calc(20.5 * var(--u)));
  font-weight: 400;
  line-height: 1.4;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin: 18px 0 0;
  color: var(--color-black);
  font-size: max(17px, calc(22 * var(--u)));
  font-weight: 500;
}

.blog-card__link::after {
  content: "→";
  transition: transform var(--duration) var(--ease);
}

.blog-card__link:hover::after,
.blog-card__link:focus-visible::after {
  transform: translateX(5px);
}

.blog__cta {
  margin-top: 20px;
  padding: 0 28px;
  border-width: 1px;
}

@media (min-width: 768px) {
  .blog__cta { margin-top: 40px; }
}

@media (min-width: 1024px) {
  .blog__title {
    font-size: calc(38 * var(--u));
  }

  .blog__track {
    margin-top: 0;
    padding-top: calc(80 * var(--u));
    padding-bottom: 0;
  }

  .blog__track .splide__slide {
    width: calc(696 * var(--u));
    margin-right: calc(40 * var(--u));
  }

  .blog-card__title {
    margin-top: calc(18 * var(--u));
    padding-left: calc(13 * var(--u));
  }

  .blog-card__text {
    max-width: calc(500 * var(--u));
    padding-left: calc(13 * var(--u));
    font-weight: 300;
  }

  .blog-card__link {
    margin: calc(30 * var(--u)) 0 0 calc(13 * var(--u));
  }

  .blog__cta {
    margin-top: calc(80 * var(--u));
    padding: 0 calc(24 * var(--u));
  }
}

@media (prefers-reduced-motion: reduce) {
  .process-step:hover .process-step__icon {
    transform: none;
  }

  .product-card:hover .product-card__image {
    --hover-scale: 1;
    will-change: auto;
  }
}
