/* =====================================================================
   Theme Override
===================================================================== */

/* ============================================================
   Design tokens (--d3-*) are defined once in tokens.css
============================================================ */
.d3-home {
  font-family: var(--d3-ff-body);
  color: var(--d3-ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.d3-home h1,
.d3-home h2,
.d3-home h3,
.d3-home h4 {
  font-family: var(--d3-ff-disp);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -.015em;
  font-weight: 600;
}

.d3-home p { margin: 0; }
.d3-home a { color: inherit; text-decoration: none; }
.d3-home img { max-width: 100%; display: block; }

.d3-wrap {
  max-width: var(--d3-maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.d3-section {
  padding: clamp(4rem, 9vw, 7.5rem) 0;
}

/* ============================================================
   BUTTON  (scoped to avoid conflict with existing .button)
============================================================ */
.d3-home .d3-button {
  display: inline-block;
  background: var(--d3-brand);
  color: #fff;
  font-family: var(--d3-ff-nav);
  font-weight: 600;
  font-size: 14px;
  padding: 15px 26px;
  transition: background .2s, transform .2s;
  border: none;
  cursor: pointer;
  text-transform: capitalize;
}

.d3-home .d3-button:hover {
  background: var(--d3-blue);
  color: #fff;
}

.d3-home .d3-button:hover svg { margin-left: 6px; }

.d3-home .d3-button svg {
  margin-left: 4px;
  font-size: 14px;
  transition: margin .2s;
  vertical-align: middle;
}

.d3-home .d3-button--ghost {
  background: transparent;
  color: var(--d3-ink);
  border: 1px solid var(--d3-rule-hard);
  font-family: var(--d3-ff-nav);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 25px;
  display: inline-block;
  transition: all .2s;
}

.d3-home .d3-button--ghost:hover {
  border-color: var(--d3-ink);
  color: var(--d3-ink);
}

/* ============================================================
   KICKER / SECTION HEAD
============================================================ */
.d3-kicker {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--d3-ff-nav);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--d3-brand);
  margin: 0 0 1.2rem;
}

.d3-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--d3-brand);
}

.d3-kicker--dim { color: var(--d3-steel); }
.d3-kicker--dim::before { background: var(--d3-steel); }

.d3-sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.d3-sec-head h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  max-width: 22ch;
}

.d3-sec-head .d3-lede {
  font-size: 1rem;
  color: var(--d3-ink-soft);
  max-width: 36ch;
  line-height: 1.6;
}

.d3-sec-head .d3-lede b {
  font-style: normal;
  font-weight: 600;
}

/* ============================================================
   HERO  — full-bleed background image + left-aligned copy
============================================================ */
.d3-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 62vh, 700px);
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  color: #fff;
  background-image: url('../../images/tci_hero.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.d3-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(3, 16, 49, .72), rgba(3, 16, 49, .55) 58%, transparent 70%);
  z-index: 0;
}

.d3-hero .d3-wrap { position: relative; z-index: 2; width: 100%; }
.d3-hero .d3-hero__copy { max-width: 640px; }

.d3-hero__copy .d3-location {
  font-family: var(--d3-ff-nav);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.d3-hero__copy .d3-location::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--d3-brand);
}

.d3-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 1.4rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .25);
}

.d3-hero__lede {
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 55ch;
  margin: 0 0 2.4rem;
  line-height: 1.7;
}

.d3-hero__lede strong { font-weight: 600; color: #fff; }

.d3-hero__cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.d3-hero .d3-button--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .4);
}

.d3-hero .d3-button--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .08);
}

/* ============================================================
   ASSURANCE LEDGER
============================================================ */
.d3-assure {
  background: var(--d3-white);
  border-bottom: 1px solid var(--d3-rule);
}

.d3-assure .d3-wrap {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3rem);
  padding-top: 20px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}

.d3-assure__cert {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 1 auto;
}

.d3-assure__cert img { height: 64px; width: auto; }

.d3-assure__cert .t {
  font-family: var(--d3-ff-nav);
  font-weight: 600;
  color: var(--d3-ink);
  font-size: .95rem;
  line-height: 1.35;
}

.d3-assure__cert .t span {
  display: block;
  font-weight: 400;
  font-size: .8rem;
  color: #647589;
}

.d3-assure__facts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.d3-assure__facts .f {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  padding: 0 clamp(1rem, 2.6vw, 1.9rem);
  border-right: 1px solid var(--d3-rule);
  font-family: var(--d3-ff-nav);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--d3-ink-soft);
  white-space: nowrap;
}

.d3-assure__facts .f:last-child { border-right: 0; padding-right: 0; }

.d3-assure__facts .f b {
  color: var(--d3-brand);
  font-weight: 600;
  min-width: 8em;
  text-align: right;
  display: inline-block;
}

/* ============================================================
   LIFECYCLE  — horizontal process strip
============================================================ */
.d3-life { background: var(--d3-paper); }

.d3-life .d3-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.8rem, 2vw, 1.6rem);
  position: relative;
}

.d3-life .d3-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--d3-rule-hard);
}

.d3-life-row {
  position: relative;
  padding: 30px .2rem clamp(1.2rem, 2.5vw, 1.8rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.d3-life-row .d3-idx {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  background: var(--d3-paper);
  border: 2px solid var(--d3-brand);
  border-radius: 50%;
  z-index: 1;
}

.d3-life-row h3 {
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: -.01em;
  margin-bottom: .3rem;
  line-height: 1.25;
}

.d3-life-row h3 .n {
  display: block;
  font-family: var(--d3-ff-disp);
  font-size: .74rem;
  color: var(--d3-brand);
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: .2rem;
}

.d3-life-row p {
  color: var(--d3-ink-soft);
  font-size: .88rem;
  line-height: 1.55;
  margin: 0 0 .6rem;
  max-width: 32ch;
}

.d3-life-row .d3-tag {
  font-family: var(--d3-ff-nav);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--d3-steel);
  margin-top: auto;
}

/* ============================================================
   FAMILIES  — four photo plates
============================================================ */
.d3-families { background: var(--d3-paper-2); }

.d3-fam-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.d3-fam { 
  display: flex; 
  flex-direction: column; 
  position: relative;
  min-height: 0;
  height: 100%;
}

.d3-fam__plate {
  position: relative;
  overflow: hidden;
  background: var(--d3-rule);
  aspect-ratio: 4 / 5;
  flex-shrink: 0;
}

.d3-fam__plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.d3-fam:hover .d3-fam__plate img { transform: scale(1.04); }

.d3-fam__plate .d3-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21, 23, 28, .08) 0%, rgba(21, 23, 28, .02) 40%, rgba(21, 23, 28, .72) 100%);
}

.d3-fam__plate .d3-code {
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: #fff;
  font-family: var(--d3-ff-disp);
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw, 3rem);
  letter-spacing: -.02em;
  line-height: 1;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .35);
}

.d3-fam__plate .d3-no {
  position: absolute;
  left: 17px;
  top: 14px;
  font-family: var(--d3-ff-nav);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  opacity: .9;
}

.d3-fam__plate .d3-arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: all .25s;
}

.d3-fam:hover .d3-fam__plate .d3-arrow {
  background: var(--d3-brand);
  border-color: var(--d3-brand);
}

.d3-fam__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 14px 2px 0;
}

.d3-fam__meta .d3-name { font-size: 1rem; font-weight: 500; color: var(--d3-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.d3-fam__meta .d3-which {
  font-family: var(--d3-ff-nav);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--d3-ink-soft);
  white-space: nowrap;
}

.d3-fam__desc {
  font-size: .86rem;
  color: var(--d3-ink-soft);
  padding: 2px 2px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* ============================================================
   CAPABILITY  — datasheet
============================================================ */
.d3-cap { background: var(--d3-paper); }

.d3-cap .d3-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: start;
}

.d3-cap__media { position: relative; }
.d3-cap__media .d3-plate img { aspect-ratio: 848/1264; object-fit: cover; }

.d3-cap__sheet { font-family: var(--d3-ff-nav); }

.d3-cap__sheet h3 {
  font-family: var(--d3-ff-disp);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin: 0 0 1.6rem;
  letter-spacing: -.02em;
}

.d3-sheet { border-top: 1px solid var(--d3-rule-hard); }
.d3-sheet dl { margin: 0; }

.d3-sheet .d3-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--d3-rule);
}

.d3-sheet .d3-row dt {
  font-family: var(--d3-ff-nav);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--d3-brand);
  padding-top: 3px;
}

.d3-sheet .d3-row dd {
  margin: 0;
  font-size: 1rem;
  color: var(--d3-ink);
  line-height: 1.45;
}

.d3-sheet .d3-row dd small {
  display: block;
  color: var(--d3-ink-soft);
  font-size: .86rem;
  margin-top: 2px;
}

/* ============================================================
   LAB  — certified ratings panel
============================================================ */
.d3-lab { background: var(--d3-paper-2); }

.d3-lab__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.d3-lab__panel {
  background: var(--d3-white);
  border: 1px solid var(--d3-rule);
  box-shadow: 0 30px 70px -46px rgba(3, 16, 49, .4);
  padding: clamp(1.6rem, 3.2vw, 2.4rem);
}

.d3-lab__panelhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--d3-rule-hard);
}

.d3-lab__sub {
  font-family: var(--d3-ff-nav);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--d3-brand);
  margin: 0;
}

.d3-lab__panelhead img { height: 52px; width: auto; flex: 0 0 auto; }

.d3-lab__list { list-style: none; margin: 0; padding: 0; }

.d3-lab__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: .95rem 2px;
  border-bottom: 1px solid var(--d3-rule);
}

.d3-lab__list li:last-child { border-bottom: 0; padding-bottom: .35rem; }

.d3-lab__list span { font-size: .96rem; font-weight: 500; color: var(--d3-ink); }

.d3-lab__list b {
  font-family: var(--d3-ff-nav);
  font-size: .82rem;
  font-weight: 400;
  color: var(--d3-steel);
  text-align: right;
}

.d3-lab__note {
  margin: 1.2rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--d3-rule);
  font-size: .9rem;
  line-height: 1.65;
  color: var(--d3-ink-soft);
}

.d3-lab__note b { color: var(--d3-ink); font-weight: 600; }

.d3-lab__media { position: relative; }
.d3-lab__media .d3-plate img { aspect-ratio: 4/3.2; object-fit: cover; }

.d3-plate__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px 2px 0;
  font-family: var(--d3-ff-nav);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--d3-ink-soft);
}

.d3-plate__caption .d3-no { color: var(--d3-brand); font-weight: 600; }


/* ============================================================
   REVEAL ANIMATION
============================================================ */
.d3-home .js-reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(4px);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1),
              transform .9s cubic-bezier(.2, .7, .2, 1),
              filter .9s cubic-bezier(.2, .7, .2, 1);
}

.d3-home .js-reveal.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .d3-home .js-reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1080px) {
  .d3-fam-grid { grid-template-columns: 1fr; }
  .d3-sec-head { grid-template-columns: 1fr; }
  .d3-cap .d3-wrap,
  .d3-lab__grid { grid-template-columns: 1fr; }
  .d3-cap__media .d3-plate img { aspect-ratio: 848/1264; object-fit: cover; }
  .d3-cta .d3-wrap { grid-template-columns: 1fr; gap: 0; }
  .d3-cta .d3-wrap > :nth-child(4) { grid-column: 1; grid-row: 4; }
  .d3-cta .d3-cta__row { flex-direction: row; grid-row: 4; margin-top: .5rem; }
  .d3-life .d3-rail { gap: .5rem; }
  .d3-life-row h3 { font-size: 1rem; }
  .d3-life-row p { font-size: .82rem; }
}

@media (max-width: 900px) {
  .d3-life .d3-rail {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem 1.25rem;
  }
  .d3-life .d3-rail::before { display: none; }
  .d3-life-row { padding-top: 0; }
  .d3-life-row .d3-idx { display: none; }
}

@media (max-width: 640px) {
  .d3-sheet .d3-row { grid-template-columns: 1fr; gap: .4rem; }
  .d3-sheet .d3-row dt { color: var(--d3-brand); }
  .d3-assure__facts { margin-left: 0; width: 100%; }
  .d3-assure__facts .f { border-right: 0; padding: .5rem 0; padding-right: 1.2rem; }
}

@media (max-width: 480px) {
  .d3-fam-grid { 
    gap: 1.5rem;
  }
  .d3-fam {
    min-height: 0;
  }
  .d3-fam__plate {
    aspect-ratio: 4/5;
    background: var(--d3-rule);
  }
  .d3-fam__plate img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .d3-life .d3-rail { grid-template-columns: 1fr; gap: 0; }
  .d3-life .d3-rail::before { display: none; }
  .d3-life-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--d3-rule);
    flex-flow: row wrap;
    align-items: baseline;
    gap: .4rem;
  }
  .d3-life-row:last-child { border-bottom: 0; }
  .d3-life-row .d3-idx { display: none; }
  .d3-life-row h3 { margin: 0; font-size: 1.1rem; }
  .d3-life-row h3 .n {
    display: inline;
    font-size: .7rem;
    margin-right: .4rem;
    margin-bottom: 0;
  }
  .d3-life-row p { flex: 1 1 100%; font-size: .85rem; margin-bottom: .2rem; }
  .d3-life-row .d3-tag { margin-top: .2rem; }
}
