/* ============================================================
   Common Group — Design System
   Palette sampled from the official logo: crimson red + black
   ============================================================ */

:root {
  --red: #d02028;
  --red-deep: #a5161c;
  --red-soft: #f7e3e4;
  --ink: #111111;
  --ink-2: #1d1d1f;
  --ink-hero: #0b0b0c;
  --ash: #6b6b6b;
  --line: #e6e3e0;
  --smoke: #f4f2f0;
  --paper: #ffffff;

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);

  --serif: "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "Roboto Mono", Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Type scale ---------- */
.display {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
  font-size: clamp(2.6rem, 8vw, 6.4rem);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ash);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--red);
}
h2.section-title {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-top: 0.4rem;
}

.lead { font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--ink-2); max-width: 56ch; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
section { padding-block: clamp(64px, 11vw, 140px); position: relative; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 760px; }
.index-tag { font-family: var(--mono); font-size: 0.8rem; color: var(--red); letter-spacing: 0.1em; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gut);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.nav.solid {
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-block: 12px;
}
.nav__logo { display: flex; align-items: center; gap: 12px; height: 58px; }
.nav__logo img { height: 100%; width: auto; transition: filter 0.4s var(--ease); }
.nav__links { display: flex; gap: 28px; align-items: center; margin-left: auto; }
.nav__links a {
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-2);
  position: relative; padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--red);
  transition: width 0.3s var(--ease);
}
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  border: 1.5px solid var(--ink); border-radius: 100px; padding: 9px 20px !important;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--red); border-color: var(--red); color: #fff; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__backdrop { display: none; }
.nav__burger span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav.open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Nav over the dark hero (transparent, not yet scrolled) ---- */
.nav:not(.solid) .nav__logo img { filter: brightness(0) invert(1); }
.nav:not(.solid):not(.open) .nav__burger span { background: #fff; }
/* Desktop only: links + CTA sit in the bar over the dark hero (light).
   On mobile they live in the white slide-in drawer, so keep them dark there. */
@media (min-width: 881px) {
  .nav:not(.solid) .nav__links a { color: #fff; }
  .nav:not(.solid) .nav__cta { border-color: rgba(255,255,255,0.4); color: #fff; }
  .nav:not(.solid) .nav__cta:hover { background: var(--red); border-color: var(--red); color: #fff; }
}

/* ============================================================
   HERO — premium dark cinematic
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding-top: 96px; overflow: hidden;
  background: var(--ink-hero); color: #fff;
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }

/* layered background: glow + technical grid + brand mark */
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero__glow {
  position: absolute; left: 10%; top: 42%; width: 70vw; height: 70vw;
  max-width: 980px; max-height: 980px; transform: translate(-32%, -50%);
  background: radial-gradient(circle, rgba(208,32,40,0.38), rgba(208,32,40,0.14) 40%, rgba(208,32,40,0.04) 60%, transparent 78%);
  filter: blur(22px);
  z-index: 1; /* keep above the brand mark so it isn't covered on narrow viewports */
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 66px 66px;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 62% 50%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 75% at 62% 50%, #000 25%, transparent 78%);
}
.hero__mark {
  position: absolute; right: -4%; top: 50%; transform: translateY(-50%);
  height: 88%; width: auto; max-width: none; opacity: 0.11;
  filter: brightness(0) invert(1); /* red+black raster → crisp white silhouette on dark */
  will-change: transform;
}
@media (max-width: 720px) {
  /* On narrow viewports the mark would otherwise span wider than the screen
     and overwhelm the glow — cap it so both elements coexist. */
  .hero__mark { height: 60%; right: -14%; opacity: 0.09; }
}

/* type */
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: #bdbab7;
}
.hero__eyebrow-rule { width: 46px; height: 1px; background: var(--red); flex: none; }
.hero__title { margin: 28px 0 30px; color: #fff; }
.hero__title .line { display: block; }
.hero__title .line > span { display: block; opacity: 0; transform: translateY(42px); }
.hero__title em { color: var(--red); font-style: normal; }
.hero__sub { max-width: 50ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #a9a6a3; }

/* CTA — hairline pill that fills crimson on hover */
.hero__btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 42px;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.01em; color: #fff;
  border: 1px solid rgba(255,255,255,0.26); border-radius: 100px; padding: 14px 26px;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), gap 0.35s var(--ease);
}
.hero__btn svg { width: 18px; height: 18px; }
.hero__btn:hover { background: var(--red); border-color: var(--red); gap: 18px; }

/* headline fade-rise on load (no clipping — descenders stay intact) */
@keyframes lineUp { to { opacity: 1; transform: translateY(0); } }
.hero__title .line:nth-child(1) > span { animation: lineUp 1s var(--ease) 0.15s forwards; }
.hero__title .line:nth-child(2) > span { animation: lineUp 1s var(--ease) 0.30s forwards; }

.scrollcue {
  position: absolute; bottom: 26px; left: var(--gut); font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: #8d8a87;
  display: flex; align-items: center; gap: 10px; z-index: 2;
}
.scrollcue__line { width: 1px; height: 40px; background: rgba(255,255,255,0.55); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(0.3); opacity: 0.4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================
   WHY US
   ============================================================ */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { background: var(--paper); padding: clamp(28px, 3vw, 40px) clamp(22px, 2.2vw, 32px); transition: background 0.4s var(--ease); }
.pillar:hover { background: var(--smoke); }
.pillar__n { font-family: var(--mono); color: var(--red); font-size: 0.8rem; }
.pillar h3 { font-size: clamp(1.05rem, 1.35vw, 1.22rem); font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; margin: 16px 0 12px; }
.pillar p { font-size: 0.94rem; line-height: 1.68; color: var(--ash); text-align: justify; }

/* ============================================================
   SECTORS
   ============================================================ */
.sectors { background: var(--ink); color: #fff; }
.sectors .eyebrow, .sectors .index-tag { color: #cfcfcf; }
.sectors .eyebrow::before { background: var(--red); }
.sectors h2 { color: #fff; }
.sector-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); }
.sector { background: var(--ink); padding: 26px 24px; display: flex; align-items: center; gap: 16px; transition: background 0.35s var(--ease); }
.sector:hover { background: var(--red); }
.sector svg { width: 30px; height: 30px; flex: none; stroke: var(--red); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.35s var(--ease); }
.sector:hover svg { stroke: #fff; }
.sector span { font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; }

/* ============================================================
   COMPANIES
   ============================================================ */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  position: relative; border: 1px solid var(--line); background: var(--paper); padding: 28px;
  cursor: pointer; overflow: hidden; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
  display: flex; flex-direction: column; min-height: 230px;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--red); transition: width 0.45s var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(0,0,0,0.28); border-color: transparent; }
.card:hover::before { width: 100%; }
.card__logo { width: 56px; height: 56px; margin-bottom: 20px; }
.card__sector { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); }
.card h3 { font-size: 1.22rem; font-weight: 800; letter-spacing: -0.015em; margin: 8px 0 10px; line-height: 1.12; }
.card p { font-size: 0.9rem; color: var(--ash); margin-top: auto; }
.card__more { margin-top: 16px; font-size: 0.8rem; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.card__more svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.card:hover .card__more svg { transform: translateX(5px); }

/* ---------- Modal — dark glass sheet (matches hero theme) ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: flex-end; align-items: stretch; padding: clamp(12px, 2vw, 24px); visibility: hidden; transition: visibility 0s linear 0.55s; }
.modal.open { visibility: visible; transition: visibility 0s linear 0s; }
.modal__backdrop { position: absolute; inset: 0; background: transparent; opacity: 0; transition: opacity 0.4s var(--ease); }
.modal.open .modal__backdrop { opacity: 1; }
.modal__panel {
  position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto;
  color: #e8e6e3;
  background:
    radial-gradient(circle at top right,
      rgba(208,32,40,0.32) 0%,
      rgba(208,32,40,0.12) 22%,
      rgba(208,32,40,0.04) 40%,
      transparent 58%),
    rgba(15,15,15,0.86);
  backdrop-filter: blur(48px) saturate(180%); -webkit-backdrop-filter: blur(48px) saturate(180%);
  --red-on-sheet: #ff5a63;
  border: 1px solid rgba(255,255,255,0.08); border-radius: clamp(16px, 2vw, 24px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.65);
  transform: translateX(calc(100% + 24px)); transition: transform 0.55s var(--ease);
  padding: clamp(28px, 4vw, 56px);
}
.modal.open .modal__panel { transform: none; }
.modal__close { position: sticky; top: 0; margin-left: auto; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 50%; cursor: pointer; float: right; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.modal__close:hover { background: var(--red); border-color: var(--red); color: #fff; }
.modal__head { display: flex; align-items: center; gap: 18px; margin-bottom: 6px; }
.modal__logo { width: 64px; height: 64px; flex: none; background: #efece8; padding: 8px; border-radius: 12px; box-sizing: border-box; }
.modal__sector { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red-on-sheet); font-weight: 700; }
.modal__panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 6px 0 4px; color: #fff; }
.modal__loc { color: #a9a6a3; font-size: 0.9rem; }
.modal__rule { height: 1px; background: rgba(255,255,255,0.1); margin: 28px 0; }
.modal h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #a9a6a3; margin-bottom: 16px; }
.md { display: flex; gap: 16px; align-items: flex-start; }
.md__avatar { width: 60px; height: 60px; border-radius: 50%; flex: none; overflow: hidden; }
.md__name { font-weight: 800; color: #fff; }
.md__role { color: var(--red-on-sheet); font-size: 0.82rem; font-family: var(--mono); letter-spacing: 0.06em; }
.md__statement { font-size: 0.95rem; color: #c9c6c2; margin-top: 14px; text-align: justify; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 0.82rem; padding: 7px 14px; border: 1px solid rgba(255,255,255,0.18); border-radius: 100px; color: #d9d6d2; }
.areas { display: grid; gap: 10px; }
.area { display: flex; gap: 14px; align-items: baseline; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); color: #d9d6d2; }
.area b { font-family: var(--mono); color: var(--red-on-sheet); font-size: 0.8rem; }
.modal__contact a { color: var(--red-on-sheet); font-weight: 600; }

/* ============================================================
   REACH
   ============================================================ */
.reach { background: var(--smoke); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 56px; }
.stat { background: var(--smoke); padding: 34px 24px; }
.stat b { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; display: block; line-height: 1; }
.stat span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.countries { display: flex; flex-wrap: wrap; gap: 12px 0; }
.country { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); padding-right: 28px; margin-right: 28px; position: relative; transition: color 0.3s var(--ease); }
.country:not(:last-child)::after { content: "·"; position: absolute; right: 0; color: var(--red); }
.country:hover { color: var(--red); }

/* ============================================================
   LEADERSHIP
   ============================================================ */
.leader { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.leader__photo { aspect-ratio: 4/5; border: 1px solid var(--line); overflow: hidden; background: var(--smoke); }
.leader__quote { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.35; letter-spacing: -0.01em; text-align: justify;}
.leader__quote .mark { color: var(--red); font-size: 1.4em; line-height: 0; vertical-align: -0.35em; margin-right: 0.1em; }
.leader__name { margin-top: 28px; font-weight: 800; font-size: 1.1rem; }
.leader__role { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); margin-top: 4px; }

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 160px 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); align-items: start; }
.tl:last-child { border-bottom: 1px solid var(--line); }
.tl__year { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; }
.tl__place { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-top: 4px; }
.tl__body h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.tl__body p { color: var(--ash); margin-top: 8px; max-width: 60ch; }

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact { background: var(--ink); color: #fff; }
.contact h2 { color: #fff; }
.contact .eyebrow { color: #cfcfcf; }
.contact__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__cta { font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.btn { display: inline-flex; align-items: center; gap: 12px; background: var(--red); color: #fff; padding: 16px 30px; border-radius: 100px; font-weight: 700; margin-top: 28px; transition: background 0.25s var(--ease), transform 0.25s var(--ease); }
.btn:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.dir { display: grid; gap: 14px; }
.dir a { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.14); font-size: 0.9rem; transition: color 0.25s; }
.dir a:hover { color: var(--red); }
.dir a span:first-child { color: #fff; font-weight: 600; }
.dir a span:last-child { color: #9a9a9a; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: clamp(56px, 8vw, 90px); padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 0.8rem; color: #9a9a9a; }
.foot img { height: 56px; opacity: 0.85; filter: brightness(0) invert(1); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) { .sector-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .sector-grid { grid-template-columns: repeat(2, 1fr); } }
/* Single column on small phones — long unbreakable labels (e.g. "Petrochemical")
   force a min column width that overflows narrow viewports in a 2-col grid. */
@media (max-width: 425px) {
  .sector-grid { grid-template-columns: 1fr; }
  .sector { padding: 22px 20px; }
}

body.nav-open { position: fixed; width: 100%; overflow-y: scroll; }

@media (max-width: 880px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 80%); background: var(--paper);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 22px; padding: 40px;
    transform: translateX(100%); transition: transform 0.5s var(--ease); box-shadow: -20px 0 50px -20px rgba(0,0,0,0.2);
    z-index: 101;
  }
  .nav.open .nav__links { transform: none; }
  .nav__links a { font-size: 1.1rem; }
  .nav__burger { display: flex; z-index: 102; }
  .nav__backdrop {
    display: block; position: fixed; inset: 0; background: rgba(17,17,17,0.55);
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s var(--ease); z-index: 100;
  }
  .nav.open .nav__backdrop { opacity: 1; pointer-events: auto; }
  .leader { grid-template-columns: 1fr; }
  .leader__photo { max-width: 260px; }
  .contact__grid { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scrollcue__line { animation: none; }
  .hero__title .line > span { opacity: 1; transform: none; animation: none; }
  .hero__mark { transform: translateY(-50%) !important; }
  * { transition-duration: 0.001s !important; }
}
