/* ============================================================
   GREIGE.CSS — Arihant Fabrics
   Role: Page-specific styles for greige.html
   Loads after: base.css · layout.css · components.css · utilities.css
   Scope: Greige fabric page only — not shared with other pages
   ============================================================ */


/* ── Page-scoped design tokens ── */
:root {
  --page-accent:       var(--accent-greige); /* #707067 */
  --cert-bg:           #EAF3DE;
  --cert-text:         #27500A;
  --cert-border:       #C0DD97;
  --spec-label-colour: #916f23;  /* amber — spec row labels */
}


/* ============================================================
   1. PAGE HERO
   Option A: diagonal-stripe overlay on greige→white gradient.
   Approved in greige preview session.
   ============================================================ */

.page-hero--greige {
  position: relative;
  background: linear-gradient(
    to bottom,
    rgba(112, 112, 103, 0.12) 0%,
    var(--color-white)         100%
  );
  padding: 28px var(--page-padding-inline) 36px;
  overflow: hidden;
}

/* Diagonal stripe texture — subtle, fades out downward */
.page-hero--greige::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(112, 112, 103, 0.025) 0px,
    rgba(112, 112, 103, 0.025) 1px,
    transparent                1px,
    transparent                8px
  );
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  max-width: var(--max-width);
  margin-inline: auto;
}

.page-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.page-hero__label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(112, 112, 103, 0.55);
  white-space: nowrap;
}

.page-hero__rule {
  flex: 1;
  border: none;
  border-top: 0.5px solid rgba(112, 112, 103, 0.35);
  margin: 0;
}

.page-hero__heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--accent-greige);
  line-height: 1;
  margin: 0 0 7px;
  letter-spacing: -0.5px;
}

.page-hero__subheading {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1.25rem + (1vw - 0.2rem) * 1.25, 2rem);
  font-style: italic;
  color: rgba(112, 112, 103, 0.48);
  margin: 0 0 18px;
  line-height: 1.3;
}

.page-hero__body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-navy);
  line-height: var(--line-height-body);
  margin: 0 0 10px;
  max-width: 62ch;
}

.page-hero__note {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(10, 37, 117, 0.38);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}

@media (max-width: 767px) {
  .page-hero--greige {
    padding: 2.5rem 24px;
  }
}


/* ============================================================
   2. ANCHOR NAV
   Sticky below the site header. FILTER BY label frozen left.
   Fabric type links scroll horizontally with hidden scrollbar.
   Active underline is navy (not page accent) — approved.
   ============================================================ */

.anchor-nav-wrapper {
  background: var(--color-white);
  border-top:    1px solid rgba(10, 37, 117, 0.18);
  border-bottom: 1px solid rgba(10, 37, 117, 0.15);
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  overflow: hidden;
}

.anchor-nav-inner {
  display: flex;
  align-items: stretch;
  height: 46px;
  padding: 0 var(--page-padding-inline);
}

.anchor-filter-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(10, 37, 117, 0.38);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-right: 12px;
}

.anchor-divider {
  width: 1px;
  background: rgba(10, 37, 117, 0.15);
  flex-shrink: 0;
  align-self: stretch;
  margin: 10px 0;
}

.anchor-links-scroll {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  flex: 1;
  padding-left: 14px;
  min-width: 0;
}

.anchor-links-scroll::-webkit-scrollbar {
  display: none;
}

.anchor-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  padding: 0 14px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .anchor-link { transition: color 0.18s ease; }
}

.anchor-link:hover {
  color: var(--color-navy);
  text-decoration: none;
}

.anchor-link:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: -3px;
  border-radius: 2px;
}

.anchor-link.is-active {
  color: var(--color-navy);
  font-weight: 500;
}

/* Active underline — docked to the nav border-bottom */
.anchor-link.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--color-navy);
}

@media (max-width: 767px) {
  .anchor-nav-inner  { padding: 0 24px; }
  .anchor-link       { padding: 0 10px; font-size: 12px; }
  .anchor-link.is-active::after { left: 10px; right: 10px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .anchor-link { padding: 0 12px; }
  .anchor-link.is-active::after { left: 12px; right: 12px; }
}


/* ============================================================
   3. FABRIC SECTIONS — outer container
   Background #f8f8f6 so white cards lift off the surface.
   ============================================================ */

.fabric-section {
  padding: min(3rem, 4vw) var(--page-padding-inline) min(3.5rem, 4.5vw);
  border-bottom: 0.5px solid var(--color-border);
  background: var(--color-bg-light);
}

.fabric-card-wrap {
  max-width: var(--max-width);
  margin-inline: auto;
}

@media (max-width: 767px) {
  .fabric-section { padding: 2rem 24px 2.5rem; }
}


/* ============================================================
   4. FABRIC CARDS — shared card structure
   Used by Cotton · Linen · Polyester · Rayon/Viscose ·
   Modal · Lyocell (standard layout).
   Blends and Specialty use variant structures below.
   ============================================================ */

.fabric-card {
  background: var(--color-white);
  border: 1px solid rgba(10, 37, 117, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Card header ── */

.fabric-card__header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(10, 37, 117, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.fabric-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  margin: 0 0 4px;
}

.fabric-name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 2px;
  line-height: 1.1;
}

.fabric-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(10, 37, 117, 0.5);
  margin: 0;
}

.fabric-cert-col {
  flex-shrink: 0;
  text-align: right;
}

.fabric-badge-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.fabric-badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--cert-bg);
  color: var(--cert-text);
  border: 1px solid var(--cert-border);
  display: inline-block;
}

.fabric-cert-note {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  margin: 6px 0 0;
  text-align: right;
}

/* ── Card body ── */

.fabric-card__body {
  padding: 16px 24px 20px;
}

/* 3-column spec row */

.fabric-specs-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid rgba(10, 37, 117, 0.08);
}

.fabric-spec-cell {
  padding: 12px 0;
}

.fabric-spec-cell:not(:last-child) {
  padding-right: 20px;
  border-right: 1px solid rgba(10, 37, 117, 0.08);
}

.fabric-spec-cell:not(:first-child) {
  padding-left: 20px;
}

/* Spec label with extending rule */
.fabric-spec-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--spec-label-colour);
  margin: 0 0 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fabric-spec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(10, 37, 117, 0.08);
}

.fabric-spec-big {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-navy);
  margin: 0 0 2px;
}

.fabric-spec-note {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(10, 37, 117, 0.5);
  margin: 0;
}

/* Pill group (ELS varieties, fibre brands) */

.fabric-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.fabric-pill {
  font-family: var(--font-body);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(10, 37, 117, 0.04);
  color: rgba(10, 37, 117, 0.6);
  border: 1px solid rgba(10, 37, 117, 0.10);
  display: inline-block;
}

/* Constructions */

.fabric-constructions-row {
  padding: 14px 0 0;
}

.fabric-construction-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fabric-construction-item {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(10, 37, 117, 0.6);
  line-height: 1.55;
}

.fabric-umbrella {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-navy);
  margin-right: 2px;
}

/* ── Card responsive ── */

@media (max-width: 767px) {
  /* Header: cert col drops below title group */
  .fabric-card__header  { flex-direction: column; }
  .fabric-cert-col      { text-align: left; }
  .fabric-badge-row     { justify-content: flex-start; }
  .fabric-cert-note     { text-align: left; }

  /* Spec row: stacks to 1 column */
  .fabric-specs-row { grid-template-columns: 1fr; }

  .fabric-spec-cell:not(:last-child) {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(10, 37, 117, 0.08);
    padding-bottom: 12px;
  }
  .fabric-spec-cell:not(:first-child) {
    padding-left: 0;
    padding-top: 12px;
  }
}


/* ============================================================
   5. FABRIC CARDS — BLENDS variant
   No certs in header. Body = label/items table + request note
   + cert row at bottom.
   ============================================================ */

.fabric-blend-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}

.fabric-blend-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(10, 37, 117, 0.06);
  align-items: baseline;
}

.fabric-blend-row:last-child {
  border-bottom: none;
}

.fabric-blend-row-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-navy);
  letter-spacing: 0.02em;
}

.fabric-blend-row-items {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(10, 37, 117, 0.6);
  line-height: 1.6;
}

.fabric-request-note {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  margin: 0 0 20px;
  line-height: 1.6;
  padding: 12px 16px;
  background: rgba(10, 37, 117, 0.03);
  border-radius: var(--radius);
  border: 1px solid rgba(10, 37, 117, 0.07);
}

.fabric-cert-row {
  border-top: 1px solid rgba(10, 37, 117, 0.08);
  padding-top: 16px;
}

.fabric-cert-row .fabric-badge-row {
  justify-content: flex-start;
}

.fabric-cert-row .fabric-cert-note {
  text-align: left;
}

@media (max-width: 767px) {
  .fabric-blend-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}


/* ============================================================
   6. FABRIC CARDS — SPECIALTY & SUSTAINABLE variant
   No certs in header. Body = 2-col fibre group grid +
   request note + cert row.
   ============================================================ */

.fabric-fibre-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.fabric-fibre-group-label {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(10, 37, 117, 0.4);
  margin: 0 0 10px;
}

.fabric-fibre-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fabric-fibre-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(10, 37, 117, 0.03);
  border: 1px solid rgba(10, 37, 117, 0.08);
  border-radius: var(--radius);
}

.fabric-fibre-name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-navy);
}

.fabric-fibre-desc {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */
  line-height: 1.4;
}

@media (max-width: 767px) {
  .fabric-fibre-groups { grid-template-columns: 1fr; }
}


/* ============================================================
   7. FOOTER REVEAL SHADOW
   Applied to the last fabric section so its shadow falls onto
   the navy footer as it is revealed beneath main content.
   Mirrors home.css .cta-section — same value, same intent.
   ============================================================ */

.fabric-section:last-child {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  /* Prevents the shadow from bleeding upward into the gap above this section.
     clip-path top is 0 (clips at element top edge — no upward shadow bleed).
     Negative values on the other three sides allow the shadow to extend
     outward freely so the downward reveal shadow onto the footer is preserved. */
  clip-path: inset(0 -60px -60px -60px);
}
