/* ==========================================================================
   KARALUB — TotalEnergies dedicated brand page
   Scoped entirely under .te-page so nothing here touches any other
   page's styling. Built on the site's existing tokens (--container,
   --radius-*, --shadow-*, --ease, --dur, --line) rather than
   redefining them — only the brand-specific accent colors below are
   new, and they're scoped to .te-page too.
   ========================================================================== */

.te-page{
  --te-red: #CC0000;
  --te-red-dark: #9E0000;
  --te-red-tint: #FDEDED;
  --te-ink: var(--primary);
}

.te-main{ overflow-x: hidden; }

.te-section{ padding: 88px 0; }
.te-section--alt{ background: var(--bg); }
.te-section__note{ text-align: center; color: var(--gray-light); max-width: 640px; margin: -32px auto 40px; }

.te-h2{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  color: var(--te-ink);
  line-height: 1.2;
  margin: 0 0 16px;
}
.te-h2--center{ text-align: center; max-width: 720px; margin-inline: auto; margin-bottom: 48px; }

.te-eyebrow{
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--te-red);
  margin: 0 0 18px;
}

.btn{ display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease); }
.te-btn-primary{ background: var(--te-red); color: #fff; box-shadow: var(--shadow-sm); }
.te-btn-primary:hover{ background: var(--te-red-dark); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.te-btn-secondary{ background: transparent; color: var(--te-ink); border: 1.5px solid var(--line); }
.te-btn-secondary:hover{ border-color: var(--te-red); color: var(--te-red); }
.te-btn-outline{ background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); }
.te-btn-outline:hover{ border-color: #fff; background: rgba(255,255,255,0.1); }

/* ---------- 1. Hero ---------- */
.te-hero{
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #FAFAFB 0%, #F4F5F6 55%, #FDEDED 100%);
}
.te-hero__bg{
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(204,0,0,0.10), transparent 45%),
    radial-gradient(circle at 12% 85%, rgba(27,77,255,0.08), transparent 40%),
    radial-gradient(circle at 60% 100%, rgba(0,169,157,0.08), transparent 45%);
  pointer-events: none;
}
.te-hero__inner{
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  padding-block: 64px;
}
.te-hero__title{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4rem);
  line-height: 1.08;
  color: var(--te-ink);
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.te-hero__sub{ font-size: 1.08rem; line-height: 1.65; color: var(--dark); max-width: 540px; margin: 0 0 34px; }
.te-hero__cta{ display: flex; flex-wrap: wrap; gap: 14px; }

.te-hero__visual{ position: relative; display: flex; align-items: center; justify-content: center; }
.te-hero__logo-plate{
  position: relative;
  width: min(340px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.te-hero__logo{ width: 58%; height: 58%; object-fit: contain; }
.te-hero__logo-fallback{
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 3.5rem;
  color: var(--te-red);
}
.te-hero__logo[style*="display: none"] + .te-hero__logo-fallback,
.te-hero__logo.img-fallback + .te-hero__logo-fallback{ display: flex; }
.te-hero__ring{
  position: absolute;
  width: min(420px, 95%); aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(204,0,0,0.18);
  animation: te-ring-spin 40s linear infinite;
}
@media (prefers-reduced-motion: reduce){ .te-hero__ring{ animation: none; } }
@keyframes te-ring-spin{ to{ transform: rotate(360deg); } }

/* ---------- 2. Trust / intro ---------- */
.te-intro{ max-width: 780px; margin: 0 auto 56px; text-align: center; }
.te-intro__copy{ font-size: 1.05rem; line-height: 1.75; color: var(--dark); }
.te-stats{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 960px; margin-inline: auto; }
.te-stat{ text-align: center; padding: 28px 16px; border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.te-stat__num{ display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; color: var(--te-red); margin-bottom: 6px; }
.te-stat__label{ font-size: 0.88rem; color: var(--gray-light); }

/* ---------- 3. Product families ---------- */
.te-family-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.te-family-card{
  display: block; text-decoration: none; color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.te-family-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.te-family-card__media{
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  position: relative;
}
.te-family-card:nth-child(5n+1) .te-family-card__media{ background: linear-gradient(135deg, var(--te-red), var(--te-red-dark)); }
.te-family-card__body{ padding: 26px 24px 28px; }
.te-family-card__body h3{ font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--te-ink); margin: 0 0 10px; }
.te-family-card__body p{ font-size: 0.92rem; color: var(--gray-light); line-height: 1.55; margin: 0 0 16px; }
.te-family-card__cta{ font-weight: 600; font-size: 0.9rem; color: var(--te-red); display: inline-flex; align-items: center; gap: 6px; transition: gap var(--dur) var(--ease); }
.te-family-card:hover .te-family-card__cta{ gap: 10px; }

/* ---------- 4. Featured products ---------- */
.te-product-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.te-product-card{ border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.te-product-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.te-product-card__media{ aspect-ratio: 16/10; background: linear-gradient(135deg, var(--te-red-tint), #fff); }
.te-product-card__body{ padding: 24px; }
.te-product-card__brand{ font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--te-red); }
.te-product-card__body h3{ font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--te-ink); margin: 8px 0 4px; }
.te-product-card__grade{ font-size: 0.85rem; color: var(--gray-light); margin: 0 0 16px; }
.te-product-card__cta{ font-weight: 600; font-size: 0.88rem; color: var(--secondary-text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.te-product-card__cta:hover{ text-decoration: underline; }

/* ---------- 5. Why TotalEnergies ---------- */
.te-why{ display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.te-why__media{ aspect-ratio: 4/5; border-radius: var(--radius-lg); background: linear-gradient(150deg, var(--primary), var(--te-red-dark) 130%); }
.te-why__list{ display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.te-why__item h3{ font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--te-ink); margin: 0 0 8px; }
.te-why__item p{ font-size: 0.92rem; line-height: 1.6; color: var(--gray-light); margin: 0; }

/* ---------- 6. Industries ---------- */
.te-industry-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.te-industry-tile{
  position: relative;
  display: flex; align-items: flex-end;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  background-size: cover; background-position: center;
  overflow: hidden;
  text-decoration: none;
}
.te-industry-tile__overlay{
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(11,30,61,0.85) 0%, rgba(11,30,61,0.15) 55%, rgba(11,30,61,0) 100%);
  transition: background var(--dur) var(--ease);
}
.te-industry-tile__label{
  position: relative; z-index: 1;
  padding: 20px;
  color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; gap: 8px;
}
.te-industry-tile__arrow{ opacity: 0; transform: translateX(-6px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
html[dir="rtl"] .te-industry-tile__arrow{ transform: translateX(6px); }
.te-industry-tile:hover .te-industry-tile__arrow{ opacity: 1; transform: translateX(0); }
.te-industry-tile:hover{ background-size: 108%; }
.te-industry-tile{ transition: background-size .6s var(--ease); }

/* ---------- 7. Sustainability ---------- */
.te-sustain{
  background: linear-gradient(135deg, #E9F7F5 0%, #EAF0FB 100%);
}
.te-sustain__inner{ max-width: 720px; margin-inline: auto; text-align: center; }
.te-sustain__inner h2{ color: var(--accent-text); }
.te-sustain__inner p{ font-size: 1.02rem; line-height: 1.7; color: var(--dark); }

/* ---------- 8. Resources ---------- */
.te-resource-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-bottom: 40px; }
.te-resource-card{
  display: block; text-decoration: none;
  padding: 26px 22px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.te-resource-card:hover{ border-color: var(--te-red); transform: translateY(-4px); }
.te-resource-card h3{ font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--te-ink); margin: 0 0 8px; }
.te-resource-card p{ font-size: 0.88rem; color: var(--gray-light); line-height: 1.55; margin: 0; }
.te-resource-cta{ text-align: center; }

/* ---------- 9. Final CTA ---------- */
.te-final-cta{
  padding: 96px 0;
  background: linear-gradient(135deg, var(--te-red) 0%, var(--te-red-dark) 100%);
  color: #fff;
  text-align: center;
}
.te-final-cta__inner{ max-width: 680px; margin-inline: auto; }
.te-final-cta h2{ font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin: 0 0 18px; }
.te-final-cta p{ font-size: 1.05rem; line-height: 1.6; opacity: 0.92; margin: 0 0 32px; }
.te-final-cta__buttons{ display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.te-final-cta .te-btn-primary{ background: #fff; color: var(--te-red); }
.te-final-cta .te-btn-primary:hover{ background: #f2f2f2; }

/* ==========================================================================
   Responsive — same breakpoint values used site-wide
   ========================================================================== */
@media (max-width: 1100px){
  .te-family-grid, .te-product-grid{ grid-template-columns: repeat(2, 1fr); }
  .te-industry-grid{ grid-template-columns: repeat(3, 1fr); }
  .te-resource-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px){
  .te-hero__inner{ grid-template-columns: 1fr; padding-block: 48px; text-align: center; }
  .te-hero__content{ order: 1; }
  .te-hero__visual{ order: 0; margin-bottom: 12px; }
  .te-hero__sub{ margin-inline: auto; }
  .te-hero__cta{ justify-content: center; }
  .te-why{ grid-template-columns: 1fr; }
  .te-why__media{ aspect-ratio: 16/9; }
}
@media (max-width: 900px){
  .te-stats{ grid-template-columns: repeat(2, 1fr); }
  .te-why__list{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .te-section{ padding: 64px 0; }
  .te-family-grid, .te-product-grid, .te-resource-grid{ grid-template-columns: 1fr; }
  .te-industry-grid{ grid-template-columns: repeat(2, 1fr); }
  .te-hero{ min-height: auto; }
}
@media (max-width: 480px){
  .te-stats{ grid-template-columns: 1fr 1fr; gap: 14px; }
  .te-stat{ padding: 20px 12px; }
  .te-industry-grid{ grid-template-columns: 1fr; }
  .te-hero__cta{ flex-direction: column; align-items: stretch; }
  .te-hero__cta .btn{ justify-content: center; }
  .te-final-cta__buttons{ flex-direction: column; align-items: stretch; }
}
