/* Medland Trading and Contracting — redesign
   Brand colors from official colour scheme */

:root {
  --grey: #413b3b;
  --light-red: #892c32;
  --dark-red: #84011c;
  --maroon: #670d1f;
  --light-grey: #979696;
  --black: #000000;
  --white: #ffffff;
  --fog: #ececeb;
  --ink: #1a1717;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --max: 1180px;
  --nav-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ---------- Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition:
    background 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

/* Light bar — logo-friendly (no black strip) */
.site-header.is-scrolled,
.site-header.solid {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(65, 59, 59, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.site-header__inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--white);
  transition: color 0.35s var(--ease);
}

.site-header.is-scrolled .brand,
.site-header.solid .brand {
  color: var(--grey);
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  filter: none;
}

.site-header.is-scrolled .brand img,
.site-header.solid .brand img {
  box-shadow: 0 1px 4px rgba(65, 59, 59, 0.12);
  filter: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand__tag {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.35s var(--ease);
}

.site-header.is-scrolled .brand__tag,
.site-header.solid .brand__tag {
  color: var(--light-grey);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.35s var(--ease);
}

.site-header.is-scrolled .nav a,
.site-header.solid .nav a {
  color: var(--grey);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: var(--dark-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__cta {
  background: var(--dark-red);
  color: var(--white) !important;
  padding: 0.7rem 1.15rem;
  letter-spacing: 0.1em;
}

.nav__cta::after {
  display: none !important;
}

.nav__cta:hover {
  background: var(--light-red);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--white);
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  transition: color 0.35s var(--ease);
}

.site-header.is-scrolled .nav-toggle,
.site-header.solid .nav-toggle {
  color: var(--grey);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: currentColor;
  transition: 0.3s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  background: var(--black);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: heroZoom 18s var(--ease) forwards;
}

@keyframes heroZoom {
  to {
    transform: scale(1);
  }
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(65, 59, 59, 0.35) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.75) 0%, transparent 45%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) 0 5rem;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0 0 1.25rem;
  max-width: 12ch;
}

.hero__brand span {
  color: var(--light-red);
}

.hero__lead {
  max-width: 36rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--dark-red);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--light-red);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn--dark {
  background: var(--grey);
  color: var(--white);
}

/* ---------- Sections ---------- */
.section {
  padding: 5.5rem 0;
}

.section--dark {
  background: var(--grey);
  color: var(--white);
}

.section--fog {
  background: var(--fog);
}

.section--maroon {
  background: linear-gradient(135deg, var(--maroon), var(--dark-red));
  color: var(--white);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dark-red);
  margin: 0 0 0.75rem;
}

.section--dark .eyebrow,
.section--maroon .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.section__lead {
  max-width: 40rem;
  color: var(--grey);
  margin: 0 0 2.5rem;
}

.section--dark .section__lead,
.section--maroon .section__lead {
  color: rgba(255, 255, 255, 0.82);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.split__media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.split__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 35%;
  height: 8px;
  background: var(--dark-red);
}

/* Product / division tiles — interactive destinations */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.tile {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  color: var(--white);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.7s var(--ease);
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(103, 13, 31, 0.35) 55%, transparent 100%);
}

.tile:hover img {
  transform: scale(1.06);
}

.tile__body {
  padding: 1.5rem;
  width: 100%;
}

.tile__body h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

.tile__body p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 36ch;
}

.tile--wide {
  grid-column: 1 / -1;
  min-height: 300px;
}

/* Stats / reasons */
.reason-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.reason {
  padding: 1.5rem 0;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.reason strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.reason p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

/* Brand logos — infinite horizontal marquee */
.brand-marquee {
  position: relative;
  margin-top: 0.5rem;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.brand-marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 0;
  animation: brand-scroll 45s linear infinite;
  will-change: transform;
}

.brand-marquee:hover .brand-marquee__track {
  animation-play-state: paused;
}

.brand-marquee__set {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  padding-right: 3.5rem;
}

.brand-marquee__item {
  flex: 0 0 auto;
  width: 200px;
  height: 110px;
  display: grid;
  place-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  border: 1px solid rgba(65, 59, 59, 0.08);
}

.brand-marquee__item img {
  max-width: 100%;
  max-height: 78px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@keyframes brand-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 700px) {
  .brand-marquee__set {
    gap: 1.5rem;
    padding-right: 1.5rem;
  }

  .brand-marquee__item {
    width: 150px;
    height: 88px;
    padding: 0.55rem 0.85rem;
  }

  .brand-marquee__item img {
    max-height: 58px;
  }

  .brand-marquee__track {
    animation-duration: 32s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-marquee__track {
    animation: none;
  }
}

/* Category filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.filter-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--grey);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(65, 59, 59, 0.25);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--dark-red);
  color: var(--white);
  box-shadow: none;
}

.filter-count {
  font-size: 0.9rem;
  color: var(--light-grey);
  margin: -1rem 0 1.5rem;
}

/* Product / gallery photo grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.product-card {
  overflow: hidden;
  background: var(--fog);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.35s var(--ease);
}

.product-card[hidden] {
  display: none !important;
}

.product-card:hover {
  transform: translateY(-3px);
}

.product-card__media {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--white);
  display: grid;
  place-items: center;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform 0.6s var(--ease);
}

.product-card:hover .product-card__media img {
  transform: scale(1.04);
}

.product-card__body {
  padding: 0.85rem 0.9rem 1rem;
  border-top: 2px solid var(--dark-red);
}

.product-card__body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}

.product-card__cat {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-grey);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.88);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__inner {
  max-width: min(920px, 100%);
  max-height: 90vh;
  text-align: center;
  color: var(--white);
}

.lightbox__inner img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  margin: 0 auto 1rem;
  background: var(--white);
}

.lightbox__caption {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 0;
  background: var(--dark-red);
  color: var(--white);
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.contact-list li {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(65, 59, 59, 0.15);
}

.contact-list span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-red);
  margin-bottom: 0.25rem;
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

.contact-form input,
.contact-form textarea {
  border: 0;
  border-bottom: 1.5px solid rgba(65, 59, 59, 0.35);
  background: transparent;
  padding: 0.75rem 0;
  color: var(--ink);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--dark-red);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.9rem;
  color: var(--light-grey);
  margin: 0.5rem 0 0;
}

.map-block {
  margin-top: 3.5rem;
}

.map-block__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 320px;
  overflow: hidden;
  background: var(--grey);
  box-shadow: inset 0 0 0 1px rgba(65, 59, 59, 0.12);
}

.map-block__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.15) contrast(1.05);
}

.map-block__link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-red);
}

.map-block__link:hover {
  color: var(--maroon);
}

@media (max-width: 900px) {
  .map-block__frame {
    aspect-ratio: 4 / 3;
    min-height: 260px;
  }
}

/* Page hero (inner) */
.page-hero {
  position: relative;
  min-height: 42vh;
  display: grid;
  align-items: end;
  color: var(--white);
  background: var(--black);
  overflow: hidden;
}

.page-hero__media {
  position: absolute;
  inset: 0;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.page-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), rgba(103, 13, 31, 0.35));
}

.page-hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 0 3rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

/* Product detail blocks */
.product-block {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(65, 59, 59, 0.12);
  align-items: start;
}

.product-block:last-child {
  border-bottom: 0;
}

.product-block h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--maroon);
}

.product-block p {
  margin: 0;
  color: var(--grey);
}

/* Footer */
.site-footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.78);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.site-footer .brand__name {
  color: var(--white);
}

.site-footer h4 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 1rem;
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Local preview banner */
.preview-banner {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 200;
  background: var(--maroon);
  color: var(--white);
  padding: 0.55rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(65, 59, 59, 0.1);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.25rem 2rem;
    gap: 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.35s var(--ease);
  }

  .nav a {
    color: var(--grey);
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .split,
  .contact-grid,
  .product-block,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tile-grid,
  .reason-row {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split__media {
    min-height: 280px;
  }

  .hero__content {
    padding-bottom: 3.5rem;
  }
}
