/* Homepage-only styles: Hero + Why Ajwa Organics band. Loaded only by index.njk. */

  /* ============================================================
     7. HERO
  ============================================================ */
  .hero {
    position: relative;
    background: var(--c-cream);
    overflow: hidden;
    padding: 72px 0 96px;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--c-stone) 1.3px, transparent 1.3px);
    background-size: 28px 28px;
    opacity: 0.35;
    -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
    mask-image: linear-gradient(to bottom, black, transparent 75%);
    pointer-events: none;
  }
  .hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
  }
  @media (min-width: 1024px) {
    .hero .container { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  }

  .hero-copy {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-copy .eyebrow {
    margin-bottom: 12px;
  }

  .hero-title {
    display: flex;
    flex-direction: column;
    gap: 6px; /* Bypasses font baseline estimation to standardize inter-line rhythm gap */
    font-size: clamp(2.5rem, 3.3vw + 1.6rem, 4.1rem);
    line-height: 1; /* Locked baseline values */
    margin-bottom: 24px;
  }
  .hero-title span { display: block; }
  .hero-title .accent {
    font-style: italic;
    font-weight: 400;
    color: var(--c-honey);
  }
  .hero-title .weight { font-weight: 600; }

  .hero-sub {
    font-size: 1.08rem;
    line-height: 1.6;
    max-width: 46ch;
    margin-bottom: 36px;
  }

  .hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
  }

  .trust-points {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
  }
  .trust-point {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--c-ink-soft);
  }
  .trust-point .icon { width: 18px; height: 18px; color: var(--c-forest); flex-shrink: 0; }

  /* Hero visual collage */
  .hero-visual {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-rows: minmax(184px, 1fr) minmax(184px, 1fr);
    gap: 16px;
    position: relative;
  }
  .visual-card {
    border-radius: var(--radius-lg);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    min-height: 180px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
  }
  .visual-card .icon-figure { width: 76px; height: 88px; }
  .visual-card .icon-figure .icon { width: 100%; height: 100%; }
  .visual-card .hero-visual-img {
    width: 76px; height: 88px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }
  .visual-card-label {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 500;
  }
  .visual-card-tag {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .visual-card--honey {
    grid-column: 1; grid-row: 1 / 3;
    background: linear-gradient(160deg, var(--c-honey-soft), var(--c-stone) 120%);
    color: var(--c-olive);
  }
  .visual-card--honey .visual-card-tag { color: var(--c-honey); }
  .visual-card--honey .visual-card-label { color: var(--c-olive); }
  .visual-card--honey .icon-figure { color: var(--c-forest); }

  .visual-card--coconut {
    grid-column: 2; grid-row: 1;
    background: linear-gradient(160deg, var(--c-moss-light), var(--c-sage) 130%);
    color: var(--c-olive);
    min-height: 184px;
  }
  .visual-card--coconut .visual-card-tag { color: var(--c-forest-dark); }
  .visual-card--coconut .visual-card-label { color: var(--c-olive); }
  .visual-card--coconut .icon-figure { color: var(--c-olive); width: 60px; height: 64px; }

  .visual-card--mustard {
    grid-column: 2; grid-row: 2;
    background: linear-gradient(160deg, var(--c-forest), var(--c-olive) 130%);
    color: var(--c-cream);
    min-height: 184px;
  }
  .visual-card--mustard .visual-card-tag { color: var(--c-honey-light); }
  .visual-card--mustard .visual-card-label { color: var(--c-cream); }
  .visual-card--mustard .icon-figure { color: var(--c-cream-ink); width: 58px; height: 62px; }

  /* Hero image overlay — applied when site.heroImage* is set in Site Settings.
     Converts any .visual-card into a full-bleed photo card with text overlaid.
     When no hero image is set the card falls through to the existing gradient +
     icon treatment above — zero change to the default visual. */
  .visual-card-text { position: relative; }
  .visual-card-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
    border-radius: inherit;
  }
  /* Dark scrim at the bottom so overlaid text stays legible against any photo.
     rgba is necessary here — there is no CSS variable for a semi-transparent
     dark overlay (scrim opacity is additive, not a brand colour choice). */
  .visual-card.has-hero-img {
    background: var(--c-ink); /* solid colour shows while photo loads */
  }
  .visual-card.has-hero-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.68) 0%,
      rgba(0, 0, 0, 0.14) 55%,
      transparent 100%
    );
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
  }
  .visual-card.has-hero-img .visual-card-text { z-index: 2; }
  .visual-card.has-hero-img .visual-card-tag,
  .visual-card.has-hero-img .visual-card-label { color: var(--c-cream) !important; }

  /* .site-logo-img sizing now lives in style.css (global stylesheet) since
     the header/footer that use this class are shared across every page,
     not just the homepage. See style.css .brand section. */

  /* ============================================================
     9. WHY AJWA ORGANICS (dark band)
  ============================================================ */
  .promise {
    background: #E4EFCF;
    color: #1C300E;
    position: relative;
    overflow: hidden;
  }
  .promise::after {
    content: "";
    position: absolute;
    right: -120px; top: -120px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(95,128,64,0.12), transparent 70%);
    pointer-events: none;
  }
  .promise .container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
  }
  @media (min-width: 920px) {
    .promise .container { grid-template-columns: 0.85fr 1.15fr; align-items: center; }
  }

  .promise-intro .eyebrow { color: #5F8040; }
  .promise-intro h2 {
    color: #1C300E;
    font-size: clamp(1.9rem, 1.6vw + 1.4rem, 2.5rem);
    margin-bottom: 18px;
  }
  .promise-intro p {
    color: rgba(28,48,14,0.70);
    font-size: 1.02rem;
    max-width: 46ch;
    margin-bottom: 28px;
  }

  .feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: rgba(54,65,41,0.12);
    border: 1px solid rgba(54,65,41,0.12);
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  @media (min-width: 560px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
  }
  .feature-item {
    background: #D0E6BA;
    padding: 32px; /* 8px baseline alignment grid */
    display: flex;
    flex-direction: column;
    gap: 16px; /* standard 16px baseline layout flow */
  }
  .feature-item .icon { width: 26px; height: 26px; color: #5F8040; margin-bottom: 4px; }
  .feature-item h3 { 
    color: #1C300E; 
    font-size: 1.15rem; 
    font-weight: 500; 
    line-height: 1.3;
    min-height: 1.5rem;
  }
  .feature-item p { 
    color: rgba(28,48,14,0.65); 
    font-size: 0.9rem; 
    line-height: 1.5; 
    min-height: 3.1rem; /* Exactly 2 lines of text height inside columns */
  }


  /* ============================================================
     CLICKABLE HERO VISUAL CARDS
     visual-card elements are now <button> tags so clicking opens
     the product modal. Styles override only the button-reset
     defaults and add hover/focus affordances.
  ============================================================ */
  button.visual-card {
    cursor: pointer;
    text-align: left;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    transition: transform 0.18s var(--ease, ease), box-shadow 0.18s var(--ease, ease);
  }
  button.visual-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.14);
  }
  button.visual-card:focus-visible {
    outline: 2.5px solid var(--c-honey);
    outline-offset: 3px;
  }

  /* "View Product →" CTA hint — hidden by default, fades in on hover */
  .visual-card-cta {
    display: block;
    position: relative;
    z-index: 3;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .visual-card--honey .visual-card-cta   { color: var(--c-forest); }
  .visual-card--coconut .visual-card-cta { color: var(--c-forest-dark, #2a3d1a); }
  .visual-card.has-hero-img .visual-card-cta { color: var(--c-cream); }
  .visual-card--mustard .visual-card-cta { color: var(--c-honey-light, #f5d98e); }
  button.visual-card:hover .visual-card-cta {
    opacity: 1;
    transform: translateY(0);
  }

  /* ============================================================
     HERO PRODUCT MODAL
     Full-screen overlay. Opened by clicking a hero visual card.
  ============================================================ */
  #hero-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 6, 0.72);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 1;
    transition: opacity 0.2s ease;
  }
  #hero-modal-overlay[aria-hidden="true"] {
    pointer-events: none;
    opacity: 0;
  }

  body.modal-open { overflow: hidden; }

  #hero-modal {
    position: relative;
    background: var(--c-paper, #fffdf7);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 24px 72px rgba(0,0,0,0.28);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr;
  }
  @media (min-width: 600px) {
    #hero-modal { grid-template-columns: 1fr; }
  }

  #hero-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--c-line, #e8e3d8);
    background: var(--c-paper, #fffdf7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-ink, #1a1a0e);
    transition: background 0.15s ease, color 0.15s ease;
  }
  #hero-modal-close:hover {
    background: var(--c-cream-soft, #f5f0e6);
    color: var(--c-forest, #3d5c22);
  }
  #hero-modal-close:focus-visible {
    outline: 2.5px solid var(--c-honey);
    outline-offset: 2px;
  }
  #hero-modal-close .icon { width: 18px; height: 18px; pointer-events: none; }

  .hero-modal-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  @media (min-width: 560px) {
    .hero-modal-panel { grid-template-columns: 240px 1fr; }
  }
  .hero-modal-panel[hidden] { display: none; }

  .hero-modal-media {
    position: relative;
    background: var(--c-cream-soft, #f5f0e6);
    border-radius: var(--radius-lg, 16px) 0 0 var(--radius-lg, 16px);
    overflow: hidden;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  @media (max-width: 559px) {
    .hero-modal-media {
      border-radius: var(--radius-lg, 16px) var(--radius-lg, 16px) 0 0;
      min-height: 200px;
    }
  }
  .hero-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    inset: 0;
  }
  .hero-modal-icon-figure {
    width: 80px;
    height: 92px;
    color: var(--c-forest, #3d5c22);
  }
  .hero-modal-icon-figure .icon { width: 100%; height: 100%; }
  .hero-modal-media .product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
  }

  .hero-modal-body {
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .hero-modal-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--c-ink, #1a1a0e);
    padding-right: 32px; /* clear the × button */
    line-height: 1.2;
    margin: 0;
  }
  .hero-modal-desc {
    font-size: 0.95rem;
    color: var(--c-ink-soft, #5a5845);
    line-height: 1.6;
    margin: 0;
  }

  .hero-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--c-line, #e8e3d8);
  }

