/* ============================================================
   DENIM.CSS — Arihant Fabrics
   Role: Page-specific styles for denim.html
   Loads after: base.css · layout.css · components.css · utilities.css
   Scope: Denim fabric page only — not shared
   ============================================================ */


/* ── Page-scoped design tokens ── */
:root {
  --page-accent:       var(--accent-denim); /* #0a2575 */
  --cert-bg:           #EAF3DE;
  --cert-text:         #27500A;
  --cert-border:       #C0DD97;
  --spec-label-colour: rgba(10, 37, 117, 0.55);
}


/* ============================================================
   1. PAGE HERO
   Navy tint gradient with -45deg diagonal stripe overlay.
   -45deg matches the homepage denim card stripe direction.
   ============================================================ */

.page-hero--denim {
  position: relative;
  background: linear-gradient(
    to bottom,
    rgba(10, 37, 117, 0.10) 0%,
    var(--color-white)       100%
  );
  padding: 28px var(--page-padding-inline) 36px;
  overflow: hidden;
}

/* Diagonal stripe texture — fades out downward */
.page-hero--denim::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(10, 37, 117, 0.025) 0px,
    rgba(10, 37, 117, 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(10, 37, 117, 0.65); /* was 0.45 — increased to pass WCAG AA 4.5:1 */ white-space: nowrap; }
.page-hero__rule       { flex: 1; border: none; border-top: 0.5px solid rgba(10, 37, 117, 0.25); margin: 0; }

.page-hero__heading    { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; color: var(--accent-denim); 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(10, 37, 117, 0.38); 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--denim { padding: 2.5rem 24px; }
}


/* ============================================================
   2. ANCHOR NAV
   Sticky below the site header. Active underline: navy.
   ============================================================ */

.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; }

.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
   ============================================================ */

.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;
}

/* Footer reveal shadow — clip-path prevents upward bleed */
.fabric-section:last-child {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  clip-path: inset(0 -60px -60px -60px);
}

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


/* ============================================================
   4. FABRIC CARDS
   ============================================================ */

.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: Weight | Width | Fabric Character ── */

.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; }

.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; }

/* ── Fabric character pills — consistent with greige .fabric-pill ── */

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

.fabric-char-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;
}


/* ============================================================
   5. BOTTOM ROW — Option C: equal 1/2 Weave + 1/2 Composition
   Approved during denim pre-coding checklist review.
   Breakpoint: 767px (our standard — prototype used 640px).
   ============================================================ */

.fabric-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.fabric-constructions-col {
  padding: 14px 20px 0 0;
  border-right: 1px solid rgba(10, 37, 117, 0.08);
}

.fabric-composition-col {
  padding: 14px 0 0 20px;
  display: flex;
  flex-direction: column;
}

/* Weave construction list */
.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; }

/* Composition */
.fabric-composition-text {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(10, 37, 117, 0.6);
  line-height: 1.7;
  margin: 8px 0 0;
}

.fabric-composition-note {
  font-family: var(--font-body);
  font-size: 10px;
  font-style: italic;
  color: rgba(10, 37, 117, 0.38);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(10, 37, 117, 0.06);
}

/* ── Mobile responsive ── */

@media (max-width: 767px) {
  .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; }

  .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; }

  .fabric-bottom-row { grid-template-columns: 1fr; }
  .fabric-constructions-col { padding-right: 0; border-right: none; border-bottom: 1px solid rgba(10, 37, 117, 0.08); padding-bottom: 14px; }
  .fabric-composition-col   { padding-left: 0; padding-top: 14px; }
}
