/* ==========================================================================
   RAÍZ by 2FIT Brands — landing page styles
   ========================================================================== */

:root {
  --ink: #161D1A;          /* deep forest / charcoal */
  --cream: #EFEFE7;
  --paper: #F7F7F3;        /* off-white */
  --purple: #8245A1;       /* signature purple */
  --purple-deep: #6B3686;
  --lavender: #C9A3DD;     /* accent on dark backgrounds */
  --muted: #59625D;
  --line: rgba(22, 29, 26, 0.1);

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 20px;
  --shadow: 0 1px 2px rgba(22, 29, 26, 0.04), 0 18px 40px -18px rgba(22, 29, 26, 0.18);
  --shadow-lift: 0 2px 4px rgba(22, 29, 26, 0.05), 0 30px 60px -24px rgba(22, 29, 26, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture { display: block; max-width: 100%; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

::selection { background: var(--lavender); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.container {
  width: min(1160px, 100% - 3rem);
  margin-inline: auto;
}

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--purple);
}
.eyebrow--light { color: var(--lavender); }

.section { padding-block: clamp(5rem, 11vw, 9rem); }

.section__head {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: 1.1rem;
}

.section__intro {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(300px, 100%);
  min-height: 3.4rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline-color: var(--lavender); }

.btn--solid {
  background: var(--purple);
  color: var(--paper);
  border: 1px solid var(--purple);
  box-shadow: 0 14px 30px -12px rgba(130, 69, 161, 0.7);
}
.btn--solid:hover { background: var(--purple-deep); border-color: var(--purple-deep); }

.btn--outline {
  background: rgba(247, 247, 243, 0.04);
  color: var(--cream);
  border: 1px solid rgba(239, 239, 231, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn--outline:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ==========================================================================
   1. Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6rem 1.5rem 7rem;
  text-align: center;
  color: var(--cream);
  background: var(--ink);
  overflow: hidden;
}

.hero__bg,
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  animation: hero-drift 24s var(--ease) both;
}
.hero__overlay {
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(22, 29, 26, 0.35) 0%, rgba(22, 29, 26, 0.6) 100%),
    linear-gradient(180deg, rgba(22, 29, 26, 0.55) 0%, rgba(22, 29, 26, 0.35) 40%, rgba(22, 29, 26, 0.8) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: rise 1.4s var(--ease) both;
}

.hero__logo img {
  width: clamp(190px, 34vw, 320px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35));
}

.hero__tagline {
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  letter-spacing: 0.01em;
  color: var(--cream);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero__actions {
  margin-top: 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 1px solid rgba(239, 239, 231, 0.55);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: var(--cream);
  animation: scroll-cue 2s var(--ease) infinite;
}

@keyframes hero-drift {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes scroll-cue {
  0%   { opacity: 0; transform: translateY(-2px); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ==========================================================================
   2. Ecosystem
   ========================================================================== */
.ecosystem { background: var(--paper); }

.cards {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.4vw, 2rem);
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.card__media picture { width: 100%; height: 100%; }
.card__media img { width: 100%; height: 100%; }

.card__media--photo img {
  object-fit: cover;
  object-position: 50% 62%;
  transition: transform 1.2s var(--ease);
}
.card:hover .card__media--photo img { transform: scale(1.04); }

/* Menchas logo: shown whole, centered on a matching black field */
.card__media--logo { background: #000; }
.card__media--logo picture {
  display: grid;
  place-items: center;
  padding: 8%;
}
.card__media--logo img { object-fit: contain; }

/* BOlab wordmark placeholder */
.card__media--wordmark {
  background:
    radial-gradient(circle at 50% 45%, rgba(201, 163, 221, 0.28), transparent 60%),
    var(--cream);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.5rem, 6.5vw, 5.25rem);
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--purple);
}

.card__body {
  flex: 1;
  padding: clamp(1.75rem, 2.6vw, 2.25rem);
  border-top: 1px solid var(--line);
}

.card__title {
  margin-top: 0.7rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 2.6vw, 2.3rem);
  line-height: 1.1;
}

.card__text {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

/* ==========================================================================
   3. Our story
   ========================================================================== */
.story {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
}
.story::before {
  /* faint lavender glow for depth */
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, rgba(130, 69, 161, 0.22), transparent 65%);
  pointer-events: none;
}
.story .container { position: relative; }

.story__head {
  text-align: center;
  max-width: 46rem;
  margin-inline: auto;
}
.story .section__title { color: var(--cream); }

.story__copy {
  max-width: 44rem;
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  text-align: center;
  color: rgba(239, 239, 231, 0.82);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.85;
}
.story__copy p + p { margin-top: 1.4rem; }

.pillars {
  margin-top: clamp(4rem, 8vw, 6.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.pillar {
  padding-top: 1.75rem;
  border-top: 1px solid rgba(239, 239, 231, 0.22);
}
.pillar__num {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: rgba(201, 163, 221, 0.75);
}
.pillar__title {
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.1;
  color: var(--lavender);
}
.pillar__text {
  margin-top: 0.6rem;
  color: rgba(239, 239, 231, 0.72);
  font-size: 0.98rem;
}

/* ==========================================================================
   4. Footer
   ========================================================================== */
.footer {
  background: var(--cream);
  padding-block: clamp(3.5rem, 7vw, 5rem);
  text-align: center;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer__logo { display: inline-block; border-radius: 8px; }
.footer__logo img { width: 92px; height: auto; }

.footer__tagline {
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  color: var(--ink);
}
.footer__brands {
  margin-top: 1.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--purple);
}
.footer__legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  width: min(420px, 100%);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ==========================================================================
   Scroll reveal — pure CSS, progressive enhancement
   ========================================================================== */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 28%;
    }
    @keyframes reveal {
      from { opacity: 0; translate: 0 40px; }
      to   { opacity: 1; translate: 0 0; }
    }
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .card__media { aspect-ratio: 4 / 3; }
  .card__media--photo img { object-position: 50% 68%; }
  .card__media--logo picture { padding: 4%; }
}

@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; gap: 2rem; }
  .container { width: min(1160px, 100% - 2.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
