/* ============================================
   HOME.CSS — Premium homepage redesign
   Beta Trials South Africa
   ============================================ */

:root {
  --black: #080808;
  --charcoal: #111111;
  --charcoal-2: #1a1a1a;
  --offwhite: #f5f5f5;
  --white: #ffffff;
  --red: #e30613;
  --red-dark: #b5000b;
  --grey-mid: #a7a7a7;
  --grey-light: #e8e8e8;

  --font-display: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.55;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

.eyebrow {
  color: var(--red);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--red);
  display: inline-block;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.5px;
}

.section-pad { padding: 90px 6vw; }
@media (max-width: 700px) { .section-pad { padding: 60px 5vw; } }

.container { max-width: 1280px; margin: 0 auto; }

/* Buttons */
.btn-primary, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  padding: 15px 26px;
  border-radius: 4px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border: 1px solid var(--red);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-outline.dark { color: var(--charcoal); border-color: rgba(0,0,0,0.3); }
.btn-outline.dark:hover { border-color: var(--charcoal); background: rgba(0,0,0,0.05); }
.arrow { transition: transform 0.25s ease; }
.btn-primary:hover .arrow, .btn-outline:hover .arrow, .card-link:hover .arrow { transform: translateX(4px); }

/* ============ HEADER ============ */
.hm-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5vw;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0));
  transition: background 0.35s ease, padding 0.35s ease, backdrop-filter 0.35s ease;
}
.hm-header.scrolled {
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(8px);
  padding: 14px 5vw;
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hm-brand { display: flex; align-items: center; gap: 10px; }
.hm-brand img { height: 40px; width: 40px; border-radius: 50%; }
.hm-brand span {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.95rem;
  text-transform: uppercase;
  line-height: 1.1;
}
.hm-brand span small { display:block; font-size: 0.6rem; color: var(--grey-mid); font-weight:400; letter-spacing: 2px; }

.hm-nav {
  display: flex;
  gap: 36px;
  align-items: center;
}
.hm-nav a {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 4px;
}
.hm-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width 0.25s ease;
}
.hm-nav a:hover::after, .hm-nav a.active::after { width: 100%; }
.hm-nav a.active { color: var(--white); }

.hm-header-actions { display: flex; align-items: center; gap: 20px; }
.hamburger {
  background: none; border: none;
  display: flex; flex-direction: column; gap: 5px;
  padding: 6px;
}
.hamburger span { width: 24px; height: 2px; background: var(--white); display:block; transition: all 0.25s ease; }

@media (max-width: 980px) {
  .hm-nav { display: none; }
}

/* ============ OFF-CANVAS MENU ============ */
.hm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.hm-overlay.open { opacity: 1; pointer-events: auto; }

.hm-side-menu {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  max-width: 88vw;
  height: 100vh;
  background: var(--black);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  padding: 32px 40px;
  overflow-y: auto;
}
.hm-side-menu.open { transform: translateX(0); }

.hm-side-close {
  position: absolute;
  top: 28px; right: 32px;
  background: none; border: none;
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
}

.hm-side-menu .side-line {
  width: 30px; height: 3px; background: var(--red);
  margin: 60px 0 24px;
}

.hm-side-links { display: flex; flex-direction: column; }
.hm-side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  text-transform: uppercase;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.hm-side-links a.active { color: var(--red); }
.hm-side-links a .side-arrow { color: var(--red); font-size: 1.1rem; }

.hm-side-menu .btn-primary { width: 100%; justify-content: center; margin: 28px 0 32px; }

.hm-side-contact .eyebrow { margin-bottom: 14px; }
.hm-side-contact p {
  color: var(--grey-mid);
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hm-side-social {
  display: flex; gap: 12px; margin-top: 20px;
}
.hm-side-social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 0.85rem;
}

body.menu-open { overflow: hidden; }

/* ============ HERO ============ */
.hm-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hm-hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.08);
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
.hm-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.15) 75%);
  z-index: 1;
}
.hm-hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 0 6vw;
  color: var(--white);
}
.hm-hero-content .eyebrow { color: var(--white); font-size: 0.85rem; }
.hm-hero-content .eyebrow::before { background: var(--red); }
.hm-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-style: italic;
  font-weight: 700;
  margin-bottom: 22px;
}
.hm-hero h1 .red { color: var(--red); display: block; }
.hm-hero h1 span { display: block; }
.hm-hero-content p {
  font-size: 1.05rem;
  color: var(--grey-light);
  max-width: 480px;
  margin-bottom: 32px;
}
.hm-hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.hm-scroll-indicator {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--grey-light);
  font-size: 0.7rem;
  letter-spacing: 2px;
  animation: bobDown 2s ease-in-out infinite;
}
@keyframes bobDown {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
.hm-scroll-indicator .mouse {
  width: 22px; height: 34px;
  border: 2px solid var(--grey-light);
  border-radius: 12px;
  position: relative;
}
.hm-scroll-indicator .mouse::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 6px;
  background: var(--grey-light);
  border-radius: 2px;
}

/* Fade up reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============ ABOUT SECTION ============ */
.hm-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 100px 6vw 140px;
  position: relative;
}
.hm-about-text h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 18px; color: var(--black); }
.hm-about-text > p { color: #555; max-width: 480px; margin-bottom: 22px; }
.hm-checklist { margin-bottom: 26px; }
.hm-checklist li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #333; font-size: 0.95rem; }
.hm-checklist li::before { content: '✓'; color: var(--red); font-weight: 700; }

.hm-about-visual {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  min-height: 460px;
  background-size: cover;
  background-position: center;
}
.hm-about-visual::after {
  content: '';
  position: absolute;
  top: -40px; right: -60px;
  width: 260px; height: 260px;
  background: linear-gradient(135deg, var(--red), transparent 70%);
  opacity: 0.18;
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 70%);
  z-index: 1;
}

/* ============ STATS BAR ============ */
.hm-stats {
  background: var(--black);
  border-radius: 8px;
  margin: -90px 6vw 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.hm-stats > div {
  padding: 34px 26px;
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.hm-stats > div:last-child { border-right: none; }
.hm-stats .stat-icon {
  width: 38px; height: 38px;
  border: 1px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.hm-stats h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 4px; }
.hm-stats p { color: var(--grey-mid); font-size: 0.82rem; }

@media (max-width: 900px) {
  .hm-about { grid-template-columns: 1fr; padding-bottom: 200px; }
  .hm-stats { grid-template-columns: 1fr 1fr; margin-top: 20px; }
  .hm-stats > div { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
}
@media (max-width: 560px) { .hm-stats { grid-template-columns: 1fr; } }

/* ============ CATEGORY SECTION ============ */
.hm-categories { background: var(--charcoal); padding-top: 150px; }
.hm-section-head { text-align: center; margin-bottom: 46px; }
.hm-section-head .eyebrow { justify-content: center; }
.hm-section-head h2 { color: var(--white); font-size: clamp(1.7rem, 3vw, 2.4rem); }
.hm-section-head.light h2 { color: var(--black); }

.hm-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-cat-card {
  position: relative;
  height: 380px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: flex-end;
}
.hm-cat-card .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.5s ease;
}
.hm-cat-card:hover .bg { transform: scale(1.08); }
.hm-cat-card::before {
  content:'';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.9) 100%);
  z-index: 1;
}
.hm-cat-card-body { position: relative; z-index: 2; padding: 26px; color: var(--white); }
.hm-cat-card-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.hm-cat-card-body p { font-size: 0.85rem; color: var(--grey-light); margin-bottom: 14px; }
.card-link { color: var(--red); font-weight: 600; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; display:inline-flex; gap:8px; align-items:center; }

@media (max-width: 900px) { .hm-cat-grid { grid-template-columns: 1fr; } }

/* ============ PRODUCT SECTION ============ */
.hm-products { background: var(--offwhite); position: relative; }
.hm-products-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 40px; flex-wrap: wrap; gap: 20px;
}
.hm-products-head .hm-section-head { text-align: left; margin-bottom: 0; }
.hm-products-head .hm-section-head .eyebrow { justify-content: flex-start; }
.hm-slider-arrows { display: flex; gap: 10px; }
.hm-slider-arrows button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: var(--white);
  color: var(--black);
  display: flex; align-items: center; justify-content: center;
}
.hm-slider-arrows button.primary { background: var(--red); border-color: var(--red); color: var(--white); }

.hm-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-product-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  padding: 22px;
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.hm-product-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.08); transform: translateY(-4px); }
.hm-product-tag {
  position: absolute; top: 18px; right: 18px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--grey-light); color: #555;
}
.hm-product-tag.factory { background: var(--red); color: var(--white); }
.hm-product-card .photo {
  height: 160px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 18px;
}
.hm-product-card h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--black); }
.hm-product-meta { font-size: 0.8rem; color: var(--red); margin-bottom: 8px; font-weight: 600; }
.hm-product-meta span { color: var(--grey-mid); font-weight: 400; }
.hm-product-card > p.desc { font-size: 0.85rem; color: #666; margin-bottom: 16px; }
.hm-product-footer { display: flex; align-items: center; justify-content: space-between; gap:10px; flex-wrap: wrap; }
.hm-price { font-family: var(--font-display); font-weight: 700; color: var(--red); font-size: 1.15rem; }

@media (max-width: 900px) { .hm-product-grid { grid-template-columns: 1fr; } }

/* ============ EVERYTHING YOU NEED ============ */
.hm-everything { background: var(--charcoal); }
.hm-everything-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.hm-ev-card {
  position: relative;
  background: var(--black);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease;
}
.hm-ev-card:hover { transform: translateY(-6px); }
.hm-ev-card .img { height: 140px; background-size: cover; background-position: center; overflow:hidden; }
.hm-ev-card .img div { width:100%; height:100%; background-size:cover; background-position:center; transition: transform 0.5s ease; }
.hm-ev-card:hover .img div { transform: scale(1.1); }
.hm-ev-icon {
  width: 42px; height: 42px;
  background: var(--red);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 1.2rem;
  position: relative;
  margin: -21px 20px 14px;
  z-index: 2;
}
.hm-ev-card-body { padding: 0 20px 22px; }
.hm-ev-card h3 { color: var(--white); font-size: 1rem; margin-bottom: 8px; }
.hm-ev-card p { color: var(--grey-mid); font-size: 0.82rem; margin-bottom: 14px; }

@media (max-width: 900px) { .hm-everything-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hm-everything-grid { grid-template-columns: 1fr; } }

/* ============ TRUST SECTION ============ */
.hm-trust { background: var(--white); }
.hm-trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.hm-trust-item { text-align: left; }
.hm-trust-icon {
  width: 46px; height: 46px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.hm-trust-item h3 { font-family: var(--font-display); text-transform: none; font-size: 1rem; color: var(--black); margin-bottom: 6px; letter-spacing: 0; }
.hm-trust-item p { color: #666; font-size: 0.85rem; }

@media (max-width: 900px) { .hm-trust-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hm-trust-grid { grid-template-columns: 1fr; } }

/* ============ FINAL CTA ============ */
.hm-cta {
  position: relative;
  background: var(--black);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
}
.hm-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.92) 30%, rgba(0,0,0,0.45) 100%);
}
.hm-cta::after {
  content: '';
  position: absolute;
  top: 0; right: 10%;
  width: 3px; height: 100%;
  background: var(--red);
  opacity: 0.6;
  transform: skewX(-12deg);
}
.hm-cta-content { position: relative; z-index: 2; max-width: 620px; color: var(--white); }
.hm-cta-content h2 { font-size: clamp(2rem, 4vw, 3rem); font-style: italic; margin-bottom: 18px; }
.hm-cta-content h2 .red { color: var(--red); }
.hm-cta-content p { color: var(--grey-light); margin-bottom: 30px; max-width: 480px; }
.hm-cta-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============ FOOTER ============ */
.hm-footer { background: var(--black); color: var(--grey-mid); padding: 70px 6vw 26px; }
.hm-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}
.hm-footer h4 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.hm-footer-brand img { height: 46px; margin-bottom: 14px; border-radius: 50%; }
.hm-footer-brand p { font-size: 0.85rem; line-height: 1.6; margin-bottom: 16px; }
.hm-footer a, .hm-footer p.line { display: block; font-size: 0.85rem; margin-bottom: 10px; color: var(--grey-mid); }
.hm-footer a:hover { color: var(--white); }
.hm-footer-social { display: flex; gap: 10px; }
.hm-footer-social a {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 0.8rem;
}
.hm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 22px;
  text-align: center;
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .hm-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hm-footer-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hm-hero-bg { animation: none; }
  .hm-scroll-indicator { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
