/* fit-b: viewport-fit overrides (owned by one agent)
   Sections: #collection, #origins, section.finishes
   Goal: each section fits one screen at 100% zoom (1920x1080 and 1366x768). */

/* ---------- shared: tighter panel padding for these three sections ---------- */
#collection > .wrap,
#origins > .wrap,
.section.finishes > .wrap { padding-block: clamp(24px, 2vw, 46px); }

/* =====================================================================
   COLLECTION
   Desktop: heading, intro and stock call in a left column; tabs and grid right.
   ===================================================================== */
.collection .stone-swatch { aspect-ratio: 3 / 2; }
.collection .stone-meta { padding-top: 8px; margin-top: 8px; }
.collection .stone-name { font-size: 1.25rem; }
.collection .stone-use { margin-top: 3px; }

@media (min-width: 1081px) {
  #collection > .wrap {
    display: grid;
    grid-template-columns: minmax(0, .36fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    column-gap: clamp(36px, 3.6vw, 64px);
    align-items: start;
  }
  #collection .section-head {
    grid-column: 1; grid-row: 1 / 4; align-self: start;
    margin: 0; text-align: left; justify-items: start; gap: 16px;
  }
  #collection .section-head .eyebrow.center::after { display: none; }
  #collection .section-head h2 { font-size: clamp(2.1rem, 1.4rem + 1.5vw, 3.2rem); line-height: 1.08; }
  /* stock call sits under the heading; the stone grid spans beside both */
  #collection .collection-foot {
    grid-column: 1; grid-row: 4; align-self: end; margin-top: 20px !important;
    flex-direction: column; align-items: flex-start; text-align: left;
    gap: 16px; margin: 0;
  }
  #collection .tabs { grid-column: 2; grid-row: 1; justify-content: flex-start; margin-bottom: 12px; }
  #collection .tab { padding-bottom: 10px; }
  #collection .tab-note { grid-column: 2; grid-row: 2; text-align: left; margin: 0 0 14px; max-width: none; }
  #collection .stone-panel { grid-column: 2; grid-row: 3 / 5; align-self: start; }
  #collection .stone-grid { gap: clamp(12px, 1.2vw, 20px); }
  #collection .stone-swatch { aspect-ratio: 16 / 10; }
  #collection .stone-meta { flex-direction: column; align-items: flex-start; gap: 3px; }

  /* yard call-to-action tiles: fill their grid cell instead of a fixed ratio */
  #collection .stone-grid > .stone-cta .stone-swatch,
  #collection .stone-grid > .stone-cta.span-2 .stone-swatch { aspect-ratio: auto; position: absolute; inset: 0; height: auto; min-height: 0; }
  #collection .stone-grid > .stone-cta { position: relative; min-height: 200px; }
  #collection .cta-over { gap: 8px; padding: clamp(16px, 1.6vw, 26px); }
  #collection .cta-over .stone-name { font-size: clamp(1.4rem, 1.1rem + .6vw, 1.9rem); }
}

/* =====================================================================
   ORIGINS
   Desktop: [heading | trade chart | Italy] on top, India band + cards below.
   ===================================================================== */
@media (min-width: 1081px) {
  #origins > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .42fr) minmax(0, 1fr);
    grid-template-areas:
      "head map  iband"
      "head map  italy"
      "band band band"
      "cards cards cards";
    grid-template-rows: auto 1fr auto auto;
    column-gap: clamp(24px, 2.4vw, 44px);
  }
  #origins .section-head { grid-area: head; margin: 0; gap: 14px; align-self: center; }
  #origins .section-head h2 { font-size: clamp(2.1rem, 1.4rem + 1.5vw, 3.2rem); line-height: 1.08; }

  /* the trade chart sits in its own column, never behind any text */
  #origins .origins-map {
    grid-area: map; position: relative !important; z-index: 0;
    top: auto !important; right: auto !important;
    width: 100% !important; height: 100%; max-height: 100%;
    opacity: .8; align-self: stretch;
    -webkit-mask-image: none !important; mask-image: none !important;
  }

  #origins .origin-band { grid-area: band; margin: clamp(12px, 1.4vw, 26px) 0 8px; }
  #origins .origin-cards + .origin-band { grid-area: iband; margin: 0 0 10px; }
  #origins .ob-label { font-size: clamp(1.5rem, 1rem + 1vw, 2.2rem); line-height: 1.1; }

  #origins .origin-cards { grid-area: cards; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.1fr); gap: 12px; margin: 0; }
  #origins .origin-card { padding: 12px 14px 14px; }
  #origins .oc-top { margin-bottom: 6px; }
  #origins .oc-num { font-size: 1.7rem; }
  #origins .oc-km { font-size: .98rem; line-height: 1.2; }
  #origins .oc-state { font-size: clamp(1.35rem, 1.1rem + .5vw, 1.7rem); margin-bottom: 8px; }
  #origins .oc-towns { gap: 2px 0; margin-bottom: 8px; line-height: 1.5; }
  #origins .oc-towns li { padding: 0; border: 0; letter-spacing: .14em; }
  #origins .oc-towns li:not(:last-child)::after { content: "\00B7"; margin: 0 .5em; color: var(--ivory-faint); }
  #origins .oc-known { line-height: 1.4; }
  #origins .oc-note { gap: 12px; }
  #origins .oc-note p { font-size: 1.05rem; line-height: 1.35; }

  /* Italy: the quarry photo becomes the backdrop, copy over it */
  #origins .italy { grid-area: italy; display: block; min-height: 0; }
  #origins .italy-media { position: absolute; inset: 0; }
  #origins .italy-media::after { background: linear-gradient(90deg, rgba(26, 20, 15, .8), rgba(26, 20, 15, .93) 75%); }
  #origins .italy-copy {
    position: relative; z-index: 1; height: 100%;
    gap: 12px; padding: clamp(16px, 1.6vw, 28px);
    background: transparent;
  }
  #origins .italy-quote { font-size: clamp(1.35rem, 1.05rem + .7vw, 1.8rem); }
  #origins .italy-regions { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; }
  #origins .italy-regions > div { grid-template-columns: 1fr; padding: 10px 0 0; border-bottom: 0; }
  #origins .ir-place { font-size: 1.3rem; }
  #origins .ir-region { margin-top: 2px; }
  #origins .ir-stones { font-size: .7rem; letter-spacing: .1em; line-height: 1.4; }
}

/* =====================================================================
   FINISHES
   ===================================================================== */
.finishes .f-img { aspect-ratio: 4 / 3; margin-bottom: 14px; }
.finishes .finish { padding-bottom: clamp(16px, 1.6vw, 24px); }
.finishes .finish h3 { font-size: 1.6rem; margin-bottom: 6px; }
.finishes .finish .f-feel { margin-bottom: 10px; }
.finishes .finish p { line-height: 1.5; }

@media (min-width: 1081px) {
  .finishes .section-head {
    max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(32px, 4vw, 72px); row-gap: 12px; align-items: end;
    margin-bottom: clamp(20px, 2vw, 32px);
  }
  .finishes .section-head .eyebrow { grid-column: 1; grid-row: 1; }
  .finishes .section-head h2 { grid-column: 1; grid-row: 2; }
  .finishes .section-head .lead { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .finishes .finish > h3, .finishes .finish > .f-feel, .finishes .finish > p { padding: 0 clamp(14px, 1.4vw, 22px); }
}

/* origins: final trims so the 1366 laptop view stays near one screen */
@media (min-width: 1081px) {
  #origins > .wrap { padding-block: clamp(20px, 1.6vw, 46px); }
  #origins .italy-copy { gap: 10px; }
  #origins .italy-quote { font-size: clamp(1.25rem, .95rem + .7vw, 1.8rem); }
  #origins .italy-regions > div { padding-top: 8px; }
  #origins .oc-state { margin-bottom: 6px; }
  #origins .origin-band { margin-top: clamp(10px, 1.1vw, 26px); }
  #origins .section-head .lead { line-height: 1.38; }
  #origins .origin-card { padding-top: 10px; padding-bottom: 12px; }
  #origins .origin-band { margin-bottom: 6px; }
  #origins .origin-cards + .origin-band { margin-bottom: 6px; }
}

/* large screens have the height to spare: fuller stone swatches */
@media (min-width: 1600px) {
  #collection .stone-swatch { aspect-ratio: 4 / 3; }
}

/* Origins map as a mild full-panel background (owner request), not a squeezed column */
@media (min-width: 1081px) {
  #origins > .wrap {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) !important;
    grid-template-areas:
      "head iband"
      "head italy"
      "band band"
      "cards cards" !important;
  }
  #origins .origins-map {
    grid-area: auto !important;
    position: absolute !important; z-index: 0 !important;
    top: 50% !important; left: 50% !important; right: auto !important;
    width: 62% !important; height: auto !important; max-height: none !important;
    transform: translate(-30%, -50%);
    opacity: .22 !important;
    -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000 45%, transparent 100%) !important;
            mask-image: radial-gradient(60% 60% at 50% 50%, #000 45%, transparent 100%) !important;
  }
  #origins .om-labels text, #origins .om-yard text { font-size: 15px; }
}
@media (max-width: 1080px) {
  #origins .origins-map { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; opacity: .14 !important; }
}
