/* ==========================================================
   TROPICOR FOODS — Homepage
   ========================================================== */

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh; /* fallback for browsers without svh */
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--ink);
}
.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Multi-video rotation: two stacked players crossfade so clips hand
   over without cuts, black frames or loading gaps. The active player
   also re-runs a slow settle-zoom each time it takes the screen. */
.hero-media video {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
  /* Keep the crossfade + settle-zoom on the compositor thread */
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.hero-media video.is-active {
  opacity: 1;
  animation: hero-zoom 16s var(--ease-out) forwards;
}
@keyframes hero-zoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}
/* Phones: bias the crop toward the visual centre of the food footage
   so the plated subject stays in frame on tall, narrow screens. */
@media (max-width: 39.99em) {
  .hero-media video { object-position: 50% 45%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media video, .hero-media img { animation: none; }
  .hero-media video { transition: none; }
}

/* Grade: darkened bottom for type + a unifying ink-teal wash so any footage
   reads on-brand and white type always clears the imagery. */
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(12, 22, 19, 0.85) 0%, rgba(12, 22, 19, 0.34) 45%, rgba(12, 22, 19, 0.44) 100%),
    rgba(16, 42, 38, 0.18);
}

/* Scroll cue: a thin line that draws itself downward (no arrow, no icon) */
.hero-cue {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  width: 1px;
  height: 3.25rem;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.hero-cue::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #fff;
  animation: cue-draw 2.4s var(--ease-out) infinite;
}
@keyframes cue-draw {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (max-width: 39.99em) { .hero-cue { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero-cue::before { animation: none; transform: none; }
}

.hero-inner {
  width: 100%;
  padding-bottom: clamp(3rem, 7vh, 5.5rem);
}

.hero h1 {
  max-width: 20ch;
  font-weight: 700;
  text-wrap: balance;
}
/* Accent phrase on its own colour, kept together on the line flow */
.hero h1 em { color: #A8E6DE; }

.hero-sub {
  max-width: 52ch;
  margin-top: 1.75rem;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
/* Phones: the hero keeps only the first sentence — a hook, not a paragraph */
@media (max-width: 39.99em) {
  .hero-sub-more { display: none; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* Entrance animation */
.hero [data-hero] {
  opacity: 0;
  transform: translateY(28px);
  animation: hero-in 1s var(--ease-out) forwards;
}
.hero [data-hero="2"] { animation-delay: 0.15s; }
.hero [data-hero="3"] { animation-delay: 0.3s; }
@keyframes hero-in { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero [data-hero] { animation: none; opacity: 1; transform: none; }
}

/* Trust bar styles live in theme.css (shared with the landing page) */

/* ---------- WHO WE ARE (statement + brand film, merged) ----------
   One section carries who Tropicor is, what it delivers and why to
   trust it: short copy + three UI pillars beside the brand film. */
.statement .t-display {
  max-width: 14ch;
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.statement .t-display em { color: var(--teal-deep); }

/* Copy beside the film at its native 16:9 — never cropped. The film
   column is slightly wider so the frame carries real presence, and the
   copy column stays compact so the two sides sit level. */
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}
.who-copy .t-lead { margin-top: 1.25rem; max-width: 44ch; }
.who-copy .btn { margin-top: 2rem; }

/* The three proofs run full-width under the pair — same hairline-row
   band as the Umamite facts and About capabilities. */
.who-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.who-points li {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.who-points h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}
.who-points p {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--muted);
}
@media (max-width: 63.99em) {
  .who-points { grid-template-columns: 1fr; gap: 1.25rem; }
}

@media (max-width: 63.99em) {
  .who-grid { grid-template-columns: 1fr; }
}

/* ---------- CATEGORIES ---------- */
.categories-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.categories-head .t-display { max-width: 16ch; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2vw, 2rem);
}
/* Desktop: asymmetric editorial cut — wide/narrow, then mirrored.
   Equal heights per row via fixed frame height (cover crop). */
@media (min-width: 64em) {
  .categories-grid { grid-template-columns: repeat(12, 1fr); }
  .categories-grid .media-card:nth-child(1) { grid-column: span 7; }
  .categories-grid .media-card:nth-child(2) { grid-column: span 5; }
  .categories-grid .media-card:nth-child(3) { grid-column: span 5; }
  .categories-grid .media-card:nth-child(4) { grid-column: span 7; }
  .categories-grid .media-card .media-frame {
    aspect-ratio: auto;
    height: clamp(17rem, 25vw, 23rem);
  }
}
@media (max-width: 63.99em) { .categories-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 39.99em) {
  /* Swipe strip: near-full-width cards, next one peeking */
  .categories-grid {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .categories-grid::-webkit-scrollbar { display: none; }
  .categories-grid .media-card { flex: 0 0 76%; scroll-snap-align: start; }
  .categories-grid .media-title { font-size: 1.2rem; }
}

/* ---------- FEEGOH (brand masthead) ---------- */
/* Copy left, logo right, vertically centred. The logo column is the
   narrower of the two so the mark reads as a signature, not a banner. */
.feegoh-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  margin-bottom: clamp(3.5rem, 6vw, 5.5rem);
}
.feegoh-copy .t-display { max-width: 18ch; }
.feegoh-copy .t-lead { margin-top: 1.25rem; max-width: 48ch; }
.feegoh-copy .btn { margin-top: 1.75rem; }
/* Brand plaque: the logo mounted on a white card that fills the right
   half, so both columns carry equal weight. The hi-res lockup lets the
   mark run large and stay crisp. */
.feegoh-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 16rem;
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: 0 20px 48px -28px rgba(26, 43, 39, 0.18);
}
.feegoh-brand img { width: min(100%, 27rem); height: auto; }

@media (max-width: 63.99em) {
  .feegoh-head { grid-template-columns: 1fr; gap: 2rem; }
  .feegoh-brand { min-height: 11rem; }
  .feegoh-brand img { width: min(60%, 15rem); }
}

/* ---------- FEEGOH UMAMITE (yeast extract spread highlight) ---------- */
.umamite-card {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: stretch;
  background: var(--teal-deep);
  color: #fff;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 24px 56px -30px rgba(22, 97, 86, 0.6);
}
.umamite-media { position: relative; min-height: 26rem; }
.umamite-media img {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.umamite-media .media-slot {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
}
.umamite-media .media-slot span { color: rgba(255, 255, 255, 0.75); }
.umamite-copy { padding: clamp(2rem, 4vw, 3.5rem); align-self: center; }
.umamite-copy .t-title { max-width: 18ch; }
.umamite-copy p { margin-top: 1.25rem; color: rgba(255, 255, 255, 0.85); max-width: 52ch; }
.umamite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 63.99em) {
  .umamite-card { grid-template-columns: 1fr; }
  .umamite-media { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 39.99em) {
  .umamite-actions .btn { width: 100%; }
}

/* Spotlight framing: section heading above the card */
.umamite-intro { margin-bottom: clamp(2rem, 4vw, 3rem); }
.umamite-intro .t-display { max-width: 16ch; }
.umamite-intro .t-display em { color: var(--teal-deep); }

/* Applications: label above a tidy two-column list */
.umamite-apps {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.umamite-apps span {
  display: block;
  margin-bottom: 0.75rem;
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.umamite-apps ul {
  columns: 2;
  column-gap: 2rem;
  max-width: 30rem;
}
.umamite-apps li {
  break-inside: avoid;
  padding-block: 0.3rem;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.9);
}
@media (max-width: 39.99em) {
  .umamite-apps ul { columns: 1; }
}

/* Fact rows under the card — same editorial device as the stats grid
   and the About-page capabilities: a hairline, a title, one line. */
.umamite-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 2.5vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.umamite-fact {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
.umamite-fact svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--teal-dark);
  margin-bottom: 0.85rem;
}
.umamite-fact h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}
.umamite-fact p {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--muted);
}
@media (max-width: 63.99em) { .umamite-facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 39.99em) { .umamite-facts { grid-template-columns: 1fr; gap: 1.25rem; } }

.feegoh-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2vw, 2rem);
}
@media (max-width: 63.99em) { .feegoh-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 39.99em) {
  /* Swipe strip, matching the categories treatment */
  .feegoh-grid {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .feegoh-grid::-webkit-scrollbar { display: none; }
  .feegoh-grid .media-card { flex: 0 0 76%; scroll-snap-align: start; }
  .feegoh-grid .media-title { font-size: 1.2rem; }
}

.feegoh-grid .media-card .media-frame { aspect-ratio: 3 / 4; }
.feegoh-grid .media-cue {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- PUREES (contained feature cards) ---------- */
.puree-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: var(--white);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 20px 48px -28px rgba(26, 43, 39, 0.22);
}
.puree-block + .puree-block { margin-top: clamp(2rem, 4vw, 3rem); }
.puree-block .media-frame {
  overflow: hidden;
  position: relative;
  min-height: 26rem;
  border-radius: 0;
}
.puree-block .media-frame img {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.puree-block:hover .media-frame img { transform: scale(1.04); }
.puree-copy {
  padding: clamp(2rem, 4vw, 3.5rem);
  align-self: center;
}
.puree-copy .t-title { max-width: 14ch; }
.puree-copy p { margin-top: 1.25rem; color: var(--muted); max-width: 48ch; }
.puree-copy .link-line { margin-top: 1.75rem; color: var(--teal-deep); }

/* Desktop: alternate media side; mobile: image always first (DOM order) */
@media (min-width: 64em) {
  .puree-block:nth-of-type(even) .media-frame { order: 2; }
  .puree-block:nth-of-type(even) .puree-copy { order: 1; }
}
@media (max-width: 63.99em) {
  .puree-block { grid-template-columns: 1fr; }
  .puree-block .media-frame { min-height: 0; aspect-ratio: 16 / 10; }
}

/* Older mobile browsers (iOS <15, old Android WebView) have no
   aspect-ratio support, so frames whose height depends on it collapse
   to zero and their absolutely-positioned photos vanish. Give those
   frames height via padding instead. */
@supports not (aspect-ratio: 1 / 1) {
  @media (max-width: 63.99em) {
    .umamite-media { height: 0; padding-top: 75%; }
    .puree-block .media-frame { height: 0; padding-top: 62.5%; }
  }
}

/* ---------- TROPICOR RANGE INTRO (transition band) ---------- */
.range-intro {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  border-top: 1px solid var(--line);
}
.range-intro-logo {
  display: block;
  width: min(21rem, 72%);
  height: auto;
  margin: 0 auto 1.75rem;
}
.range-intro .t-display { max-width: 16ch; margin-inline: auto; }
.range-intro .t-display em { color: var(--teal-deep); }
.range-intro .t-lead { max-width: 52ch; margin: 1.25rem auto 0; }

/* Puree card awaiting client-supplied product asset */
.media-frame--pending { position: relative; }
.media-frame--pending .media-slot {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

/* ---------- STATS (clean, light) ---------- */
.stats-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}
.stat-figure {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--teal-deep);
}
.stat-name {
  margin-top: 0.7rem;
  font-size: var(--fs-small);
  color: var(--muted);
}

@media (max-width: 63.99em) { .stats-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 39.99em) { .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; } }

/* ---------- OEM BAND ---------- */
.oem-band {
  position: relative;
  color: #fff;
  isolation: isolate;
  padding-block: clamp(6rem, 12vw, 11rem);
}
.oem-band .band-media {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -2;
  overflow: hidden;
}
.oem-band .band-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.oem-band::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(12, 22, 19, 0.85) 25%, rgba(12, 22, 19, 0.45) 75%);
}
.oem-band .t-display { max-width: 16ch; }
.oem-band p {
  max-width: 50ch;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--fs-lead);
  line-height: 1.6;
}
.oem-band .btn { margin-top: 2.25rem; }

/* ---------- CONTACT BAND ---------- */
.contact-band { text-align: left; }
.contact-band .t-hero { max-width: 16ch; }
.contact-band .contact-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
}
.contact-band .contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.contact-band .contact-lines { border-top: 1px solid var(--line); }
.contact-band .contact-line {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
}
.contact-band .contact-line span { color: var(--muted); }
.contact-band .contact-line a { font-weight: 600; transition: color 0.25s; }
.contact-band .contact-line a:hover { color: var(--teal-deep); }

@media (max-width: 63.99em) {
  .contact-band .contact-cols { grid-template-columns: 1fr; }
}
