/* ============================================
   ARUMBU CASHEWS — HOMEPAGE (index.html only)
   Loaded after style.css. Uses the existing palette tokens only
   (warm-black / espresso, gold, ivory, ink).

   Type system (whole homepage, incl. header + footer) — matches the
   reference's verified theme fonts:
     Display — Playfair Display   Body/UI — Inter
   The ARUMBU CASHEWS wordmark keeps Bahamas (style.css). Inner pages
   keep their style.css fonts.
============================================ */

.home-v2 {
  --hero-white: #FBF8F1;
  --home-display: 'Playfair Display', Georgia, serif;
  --home-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --btn-radius: 8px;
}

/* The homepage uses only Bahamas (wordmark), Playfair Display and Inter */
body.home-v2 {
  --font-display: var(--home-display);
  --font-body: var(--home-body);
  font-family: var(--home-body);
  font-weight: 400;
  background-color: var(--canvas);
}
.hero-v2 .btn,
.home-main .btn { border-radius: var(--btn-radius); font-family: var(--home-body); font-weight: 500; letter-spacing: 0.01em; }
.home-main .eyebrow,
.hero-v2 .eyebrow { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; }
.home-main .section-title { font-weight: 400; letter-spacing: -0.01em; }
.home-main .section-title em,
.hero-v2-title em { font-style: italic; color: var(--gold-ink); }

/* ============ HEADER: hide on scroll down, return on scroll up ============
   Header stays in normal flow at the top of the hero. Only after it
   has scrolled out of view does home.js pin it, and only while the
   visitor scrolls UP. `top` is animated instead of `transform` so the
   fixed mobile drawer inside the header keeps the viewport as its
   containing block. */
.hero-wrap .site-header.is-pinned {
  position: fixed;
  left: 0; right: 0;
  top: calc(-1 * var(--header-h, 80px) - 2px);
  transition: top 0.32s ease;
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.55);
}
.hero-wrap .site-header.is-pinned.is-shown { top: 0; }

/* ============ HERO (warm white, attached to the header) ============ */
.home-v2 .hero-wrap {
  background:
    var(--bot-left) left -200px top 30px / 340px auto no-repeat,
    var(--bot-right) right -130px top 10px / 350px auto no-repeat,
    var(--canvas);
}

.hero-v2 {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3.5rem;
}
/* Mobile-only language switcher: visible directly in the Home hero so
   visitors do not have to discover the language control inside the menu.
   Desktop keeps the existing header language switcher. */
.hero-mobile-lang { display: none; }
@media (max-width: 1300px) {
  .hero-mobile-lang {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.4rem;
    padding: 0.3rem 0.95rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: #ffffff;
  }
  .hero-mobile-lang-label { display: none; }
}
.hero-mobile-lang-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-right: 0.15rem;
}
.hero-mobile-lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 36px;
  padding: 0.35rem 0.4rem;
  color: var(--ink);
  font-family: var(--home-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.2s ease;
}
.hero-mobile-lang-btn:hover { color: var(--gold-ink); }
.hero-mobile-lang-btn.is-active { color: var(--gold-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.hero-mobile-lang-divider {
  color: var(--gold);
  font-size: 0.8rem;
}

.hero-v2-title {
  font-family: var(--home-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 1.6rem;
}
.hero-v2-rule { display: block; width: 64px; height: 1px; background: var(--gold); margin-bottom: 1.6rem; }
.hero-v2-sub { font-size: 1.02rem; line-height: 1.7; color: var(--ink-muted); max-width: 470px; margin-bottom: 2.4rem; }
.hero-v2-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.8rem; }
.hero-v2-secondary { color: var(--ink); border: 1px solid var(--border-ink); background: transparent; }
.hero-v2-secondary:hover { border-color: var(--gold-ink); color: var(--gold-ink); }
.hero-v2-phone {
  font-size: 0.85rem; letter-spacing: 0.08em; color: var(--ink-muted);
  border-bottom: 1px solid var(--border-ink); padding-bottom: 2px;
}
.hero-v2-phone:hover { color: var(--gold-ink); border-color: var(--gold-ink); }

/* Rotating hero: three photos crossfade inside an arch frame, with a
   thin gold arch offset behind. Text sits beside the image on warm
   white, so it stays readable whatever photo is showing. */
.hero-v2-visual { position: relative; aspect-ratio: 1 / 1.08; }
/* The gold arch is the photograph's own frame: same box as the image,
   grown by a uniform 10px on every side (concentric arch), so frame and
   image edges always align at any size. */
.hero-v2-frame {
  position: absolute; inset: 10px calc(5% + 10px) calc(8% + 10px);
  border-radius: 999px 999px 4px 4px;
  overflow: hidden;
  background: #ffffff;
}
.hero-v2-arch {
  position: absolute; inset: 0 5% 8%;
  border: 1px solid var(--gold);
  border-radius: 999px 999px 6px 6px;
  pointer-events: none;
}
.hero-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
.hero-dots {
  position: absolute; left: 5%; right: 5%; bottom: 2%;
  display: flex; justify-content: center; gap: 0.5rem;
}
.hero-dot {
  width: 6px; height: 6px; padding: 0; border-radius: 50%;
  border: 1px solid var(--gold-ink); background: transparent; cursor: pointer;
  transition: background var(--transition), width var(--transition);
}
.hero-dot.is-active { background: var(--gold-ink); width: 18px; border-radius: 3px; }

/* ============ OUR GRADES (product discovery) ============ */
.grades-section { background: var(--tint-cream); }
.grades-section .eyebrow,
.contact-v2 .eyebrow,
.why-v2 .eyebrow,
.founder-v2-copy .eyebrow { color: var(--gold-ink); }
.grades-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2.8rem;
}
.grades-head .section-title { margin-bottom: 0; color: var(--ink); }
.grades-head > div:first-child { min-width: 0; max-width: 100%; }
.grades-head-actions { display: flex; align-items: center; gap: 1.5rem; flex: none; }
.grades-link {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--gold-ink); border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.grades-link:hover { color: var(--ink); }
.rail-arrows { display: flex; gap: 0.5rem; }
.rail-arrow {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-ink);
  transition: border-color var(--transition), opacity var(--transition);
}
.rail-arrow:hover { border-color: var(--gold-ink); }
.rail-arrow:disabled { opacity: 0.3; cursor: default; }

.grades-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 6rem) / 4);
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.grades-rail::-webkit-scrollbar { display: none; }

/* Borderless, left-aligned product presentation */
.grade-item { scroll-snap-align: start; display: flex; flex-direction: column; }
.grade-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
.grade-media img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.grade-item:hover .grade-media img { transform: scale(1.04); }
.grade-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  background: var(--ivory-2);
  font-family: var(--home-display); font-size: 2rem; color: var(--gold-ink);
}
.grade-placeholder small { font-family: var(--home-body); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.grade-code { font-family: var(--home-display); font-weight: 500; font-size: 1.6rem; color: var(--ink); line-height: 1.1; }
.grade-name { font-size: 0.82rem; color: var(--ink-muted); margin: 0.25rem 0 1rem; }

.pack-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pack-pill {
  font: inherit; font-size: 0.78rem; font-weight: 500;
  padding: 0.35rem 0.85rem; border-radius: 100px; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-ink);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.pack-pill:hover { border-color: var(--gold-ink); }
.pack-pill.is-active { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.grade-order {
  margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--btn-radius);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.85rem; font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.grade-order:hover { background: var(--ink); color: var(--gold-light); }

/* ============ FOUNDER / OUR STORY ============ */
.founder-v2-intro { background: transparent; padding: 6.5rem 1.5rem 5rem; }
.founder-v2-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 5fr 7fr; gap: 5rem; align-items: center;
}
.founder-v2-portrait { margin: 0; padding: 0 1.2rem 0 0; }
.founder-v2-photo { position: relative; }
.founder-v2-photo::before {            /* thin gold frame around the photo: a uniform 10px from each edge */
  content: '';
  position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px;
  border: 1px solid var(--gold);
}
.founder-v2-photo img {
  position: relative;
  width: 100%; height: auto;  /* full photograph: no crop, no overlay */
  background: var(--ivory-2);
}
.founder-v2-plate {
  position: relative;
  margin-top: 2.4rem;
  background: var(--forest-deep);
  padding: 1.2rem 1.4rem;
  display: flex; flex-direction: column; gap: 0.2rem;
  border-left: 2px solid var(--gold);
}
.founder-v2-name { font-family: var(--home-display); font-size: 1.45rem; font-style: italic; color: var(--cream); }
.founder-v2-role { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-light); }
.founder-v2-tags { font-size: 0.8rem; color: var(--cream-dim); }

.founder-v2-heading {
  font-family: var(--home-display); font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.1; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 1.4rem;
}
.founder-v2-heading em { font-style: italic; color: var(--gold-ink); }
.founder-v2-lede { font-size: 1.08rem; line-height: 1.75; color: var(--ink-muted); max-width: 560px; }
.founder-v2-quote {
  margin: 2.6rem 0 0; padding: 1.8rem 0 0 0;
  border-top: 1px solid var(--border-ink);
  position: relative;
}
.founder-v2-quote::before {
  content: '\201C';
  position: absolute; top: 0.6rem; left: -0.15rem;
  font-family: var(--home-display); font-size: 4.2rem; line-height: 1; color: var(--gold);
}
.founder-v2-quote p {
  padding-left: 2.6rem;
  font-family: var(--home-display); font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.45; color: var(--ink);
}

.founder-v2-journey { background: var(--tint-cream); border-top: 1px solid var(--border-ink); padding: 4.5rem 1.5rem 5rem; }
.founder-v2-steps {
  list-style: none; max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.founder-v2-steps li { padding: 0 2rem; position: relative; }
.founder-v2-steps li:first-child { padding-left: 0; }
.founder-v2-steps li:last-child { padding-right: 0; }
.founder-v2-steps li + li { border-left: 1px solid var(--border-ink); }
.founder-v2-step {
  display: flex; align-items: baseline; gap: 0.7rem;
  font-family: var(--home-display); font-size: 1.4rem; color: var(--ink);
  margin-bottom: 1.1rem;
}
.founder-v2-step b { font-family: var(--home-body); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.12em; color: var(--gold-ink); }
.founder-v2-steps p { font-size: 0.9rem; line-height: 1.75; color: var(--ink-muted); }
.founder-v2-link {
  display: inline-block; margin-top: 1.2rem;
  font-size: 0.85rem; font-weight: 500; color: var(--gold-ink);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.founder-v2-link:hover { color: var(--ink); }

/* ============ WHY ARUMBU ============ */
.why-v2 { background: var(--tint-beige); }
.why-v2 .section-title { margin-left: auto; margin-right: auto; text-align: center; color: var(--ink); }
.why-v2-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 3.5rem;
  border-top: 1px solid var(--border-ink);
}
.why-v2-list li { padding: 2.2rem 2rem 0; }
.why-v2-list li + li { border-left: 1px solid var(--border-ink); }
.why-v2-num { display: block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; color: var(--gold-ink); margin-bottom: 1rem; }
.why-v2-list h3 { font-weight: 500; font-size: 1.45rem; color: var(--ink); margin-bottom: 0.6rem; }
.why-v2-list p { font-size: 0.95rem; line-height: 1.7; color: var(--ink-muted); }

/* ============ WHOLESALE (existing block, brand colours) ============ */
.home-v2 .wholesale-cta {
  background: transparent;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.home-v2 .wholesale-cta h2 { font-weight: 500; color: var(--ink); }
.home-v2 .wholesale-inner p { color: var(--ink-muted); }
.home-v2 .wholesale-inner .eyebrow { color: var(--gold-ink); opacity: 1; }

/* ============ CONTACT ============ */
.contact-v2 { background: var(--tint-cream); }
.contact-v2 .section-title { color: var(--ink); }
.contact-v2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-v2-lede { color: var(--ink-muted); max-width: 380px; }
.contact-v2-list { display: grid; gap: 1.4rem; }
.contact-v2-list > div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--border-ink); }
.contact-v2-list dt { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-ink); padding-top: 0.25rem; }
.contact-v2-list dd { display: flex; flex-direction: column; gap: 0.3rem; }
.contact-v2-list dd a { color: var(--ink); font-size: 1.02rem; }
.contact-v2-list dd a:hover { color: var(--gold-ink); }
.contact-v2-more { margin-top: 1.4rem; }

/* ============ REVEAL (one gentle fade per block; home.js) ============
   Applied to blocks, never to individual product items, so it never
   fights the image hover. */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .home-v2 .hero-wrap {
    background:
      var(--bot-left) left -150px top 20px / 230px auto no-repeat,
      var(--bot-right) right -150px top 10px / 240px auto no-repeat,
      var(--canvas);
  }
  .grades-rail { grid-auto-columns: calc((100% - 4rem) / 3); }
  .founder-v2-inner { gap: 3.5rem; }
  .founder-v2-steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.8rem; }
  .founder-v2-steps li,
  .founder-v2-steps li:first-child,
  .founder-v2-steps li:last-child { padding: 0 2rem; }
  .founder-v2-steps li:nth-child(odd) { padding-left: 0; border-left: none; }
  .founder-v2-steps li:nth-child(even) { padding-right: 0; }
}
@media (max-width: 900px) {
  .hero-v2 { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 1.5rem 4rem; text-align: center; }
  .hero-v2-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-v2-sub { margin-left: auto; margin-right: auto; }
  .hero-v2-actions { justify-content: center; }
  .hero-v2-visual { width: min(100%, 460px); margin: 0 auto; }

  .founder-v2-intro { padding: 4.5rem 1.5rem 4rem; }
  .founder-v2-inner { grid-template-columns: 1fr; gap: 3rem; }
  .founder-v2-portrait { width: min(100%, 440px); margin: 0 auto; }

  .why-v2-list { grid-template-columns: 1fr; }
  .why-v2-list li { padding: 2rem 0; }
  .why-v2-list li + li { border-left: none; border-top: 1px solid var(--border-ink); }
  .contact-v2-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 720px) {
  .home-v2 .hero-wrap { min-height: 0; }
  .home-v2 .hero-wrap {
    background:
      var(--bot-corner) left -18px top 6px / 156px auto no-repeat,
      var(--bot-corner-r) right -18px top 6px / 156px auto no-repeat,
      var(--canvas);
  }
  .hero-v2 { padding: 2.2rem 1rem 3rem; gap: 2rem; }
  .hero-v2-visual { width: min(84%, 330px); }

  .grades-head { flex-direction: column; align-items: flex-start; margin-bottom: 1.4rem; }
  .grades-head-actions { width: 100%; justify-content: space-between; }
  .grades-rail { grid-auto-columns: 74%; gap: 1.2rem; }

  .founder-v2-intro { padding: 3.5rem 1.25rem 3.5rem; }
  .founder-v2-quote p { padding-left: 2.2rem; }
  .founder-v2-journey { padding: 3.5rem 1.25rem; }
  .founder-v2-steps { grid-template-columns: 1fr; row-gap: 0; }
  .founder-v2-steps li,
  .founder-v2-steps li:nth-child(odd),
  .founder-v2-steps li:nth-child(even) { padding: 1.8rem 0; border-left: none; }
  .founder-v2-steps li + li { border-top: 1px solid var(--border-ink); }
  .founder-v2-steps li:first-child { padding-top: 0; }

  .contact-v2-list > div { grid-template-columns: 1fr; gap: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .grade-media img,
  .hero-slide,
  .hero-wrap .site-header.is-pinned { transition: none; }
}

/* Tamil runs longer */
html[lang="ta"] .hero-v2-title { font-size: clamp(1.9rem, 3.6vw, 3rem); }
html[lang="ta"] .founder-v2-heading { font-size: clamp(1.7rem, 3vw, 2.5rem); }
html[lang="ta"] .founder-v2-quote p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
html[lang="ta"] .why-v2-list h3 { font-size: 1.2rem; }
