/* ============================================================
   EGCSS Drilling Chemical Co. — one-page site
   Light theme: white + light blue / teal, matching the logo
   (teal-cyan globe mark, deep-navy wordmark).
   ============================================================ */

:root {
  /* surfaces */
  --bg: #ffffff;
  --bg-alt: #e9f4fa;      /* light blue tinted band */
  --bg-soft: #f3f9fc;     /* panels */
  --line: rgba(12, 46, 70, 0.12);
  --line-soft: rgba(12, 46, 70, 0.08);

  /* ink / text */
  --ink: #0c2e46;         /* deep navy — headings (logo wordmark) */
  --ink-2: #16455f;
  --body: #45606f;        /* body copy */
  --muted: #6f8798;
  --muted-dim: #9aabb8;

  /* brand blue */
  --cyan: #16a9d1;        /* logo cyan */
  --cyan-bright: #29c1e8;
  --teal: #1489aa;        /* logo teal (globe mark) */
  --teal-deep: #0e6f8a;

  --white: #ffffff;

  --maxw: 1200px;
  --pad: clamp(1.25rem, 5vw, 5rem);

  --ff-display: "Archivo", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 50px -22px rgba(12, 46, 70, 0.35);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--cyan); color: #fff; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--cyan-bright));
  z-index: 100; transition: width 0.1s linear;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(12, 46, 70, 0.5);
  padding-top: 0.65rem; padding-bottom: 0.65rem;
}
.nav__logo-chip { display: inline-flex; }
.nav__logo-chip img { height: 54px; width: auto; transition: height 0.4s var(--ease); }
.nav.is-scrolled .nav__logo-chip img { height: 46px; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-2);
  position: relative; transition: color 0.25s var(--ease);
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--cyan); transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--cyan); }
.nav__links a:hover:not(.nav__cta)::after { width: 100%; }
.nav__cta {
  padding: 0.55rem 1.2rem; border: 1px solid var(--cyan);
  border-radius: 999px; color: var(--teal-deep) !important; font-weight: 600;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav__cta:hover { background: var(--cyan); color: #fff !important; transform: translateY(-1px); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em; padding: 0.9rem 1.8rem; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn--primary { background: linear-gradient(100deg, var(--teal), var(--cyan)); color: #fff; box-shadow: 0 12px 30px -10px rgba(20, 137, 170, 0.7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(20, 137, 170, 0.85); }
.btn--ghost { border-color: rgba(12, 46, 70, 0.25); color: var(--ink); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--teal-deep); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- Contour motif (echoes the profile cover, now in blue) ---------- */
.contour {
  position: absolute; pointer-events: none; z-index: 0;
  width: 640px; height: 640px; opacity: 0.5;
  background:
    repeating-radial-gradient(circle at 0% 50%,
      transparent 0 14px, var(--cyan) 14px 15px, transparent 15px 30px);
  -webkit-mask-image: radial-gradient(circle at 0% 50%, #000 60%, transparent 72%);
  mask-image: radial-gradient(circle at 0% 50%, #000 60%, transparent 72%);
}
.contour--hero { top: 40%; left: -260px; transform: translateY(-50%); opacity: 0.28; }
.contour--contact { top: -80px; right: -220px; opacity: 0.4; transform: scaleX(-1); }

/* ---------- Section shell ---------- */
.section {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad);
}
.section--alt {
  max-width: none; background: var(--bg-alt);
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.section--alt > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { max-width: 760px; margin-bottom: 3.5rem; }
.section__kicker {
  display: inline-block; font-family: var(--ff-display); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1rem; position: relative; padding-left: 2.6rem;
}
.section__kicker::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 2rem; height: 2px; background: var(--cyan);
}
.section__title {
  font-family: var(--ff-display); font-weight: 800; line-height: 1.05; color: var(--ink);
  font-size: clamp(1.9rem, 4.5vw, 3.1rem); letter-spacing: -0.02em;
}
.section__intro { margin-top: 1.4rem; color: var(--body); font-size: 1.08rem; max-width: 64ch; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 7rem var(--pad) 4rem; overflow: hidden;
  background: radial-gradient(120% 90% at 78% 18%, #d7edf7 0%, #eef7fc 42%, #ffffff 100%);
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.7) 42%, rgba(255,255,255,0) 72%);
}
.hero__inner { position: relative; z-index: 3; max-width: 760px; width: 100%; }
.eyebrow {
  font-family: var(--ff-display); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin-bottom: 1.3rem;
}
.hero__title {
  font-family: var(--ff-display); font-weight: 900; letter-spacing: -0.03em; color: var(--ink);
  font-size: clamp(2.4rem, 7vw, 5rem); line-height: 0.98;
}
.hero__title .accent {
  background: linear-gradient(100deg, var(--teal), var(--cyan-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede { margin-top: 1.6rem; font-size: 1.15rem; color: var(--ink-2); max-width: 56ch; text-shadow: 0 1px 14px rgba(255,255,255,0.85); }
.hero__actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__stats {
  margin-top: 3.2rem; list-style: none; display: grid;
  grid-template-columns: repeat(4, auto); gap: clamp(1.2rem, 4vw, 3rem);
}
.hero__stats li { display: flex; flex-direction: column; }
.stat__num {
  font-family: var(--ff-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1; color: var(--ink); text-shadow: 0 1px 14px rgba(255,255,255,0.9);
}
.stat__label { font-size: 0.8rem; color: var(--ink-2); margin-top: 0.4rem; letter-spacing: 0.02em; font-weight: 500; text-shadow: 0 1px 12px rgba(255,255,255,0.95); }

.hero__hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.hero__hint-line { width: 1px; height: 42px; background: linear-gradient(var(--cyan), transparent); animation: hintPulse 2.2s var(--ease) infinite; }
@keyframes hintPulse { 0%,100% { opacity: 0.3; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- Company ---------- */
.company__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.company__lead p { font-family: var(--ff-display); font-weight: 500; font-size: 1.35rem; line-height: 1.4; color: var(--ink); }
.company__body p { color: var(--body); }
.company__body p + p { margin-top: 1.1rem; }

.vision {
  margin-top: 4rem; position: relative; padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, #f2fafd, #ffffff);
  box-shadow: var(--shadow); overflow: hidden;
}
.vision__mark { position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(var(--teal), var(--cyan)); }
.vision__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
.vision__cols p { color: var(--body); }
.vision__cols .section__kicker { margin-bottom: 0.8rem; }

/* ---------- Services ---------- */
.services { list-style: none; display: grid; gap: 0; counter-reset: svc; }
.service {
  display: grid; grid-template-columns: 130px 1fr; gap: clamp(1rem, 4vw, 3rem);
  padding: 2.2rem 0; border-top: 1px solid var(--line); align-items: baseline;
  transition: background 0.3s var(--ease);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover { background: rgba(22, 169, 209, 0.05); }
.service__num {
  font-family: var(--ff-display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: transparent; -webkit-text-stroke: 1.5px var(--cyan); line-height: 1;
  transition: color 0.3s var(--ease);
}
.service:hover .service__num { color: var(--cyan); }
.service__body h3 { font-family: var(--ff-display); font-weight: 700; font-size: 1.4rem; margin-bottom: 0.6rem; color: var(--ink); }
.service__body p { color: var(--body); max-width: 68ch; }

/* ---------- Global Reach ---------- */
.reach__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.reach__offices { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.office {
  display: flex; gap: 1rem; padding: 1.4rem; border: 1px solid var(--line);
  border-radius: 14px; background: var(--white);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.office:hover { transform: translateY(-4px); border-color: rgba(22,169,209,0.5); box-shadow: var(--shadow); }
.office__flag { font-size: 1.6rem; line-height: 1; }
.office h3 { font-family: var(--ff-display); font-weight: 700; font-size: 1.15rem; margin-bottom: 0.4rem; color: var(--ink); }
.office__tag {
  font-family: var(--ff-body); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--teal-deep); border: 1px solid var(--cyan);
  border-radius: 999px; padding: 2px 8px; margin-left: 0.4rem; vertical-align: middle;
}
.office p { font-size: 0.88rem; color: var(--body); margin-bottom: 0.5rem; }
.office a { font-size: 0.9rem; color: var(--cyan); font-weight: 600; }
.reach__facilities { padding-top: 0.5rem; }
.reach__facilities h3 { font-family: var(--ff-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 1rem; color: var(--ink); }
.reach__facilities p { color: var(--body); }
.reach__facilities p + p { margin-top: 1rem; }

/* ---------- Portfolio ---------- */
.portfolio__controls {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap; margin-bottom: 1.4rem;
}
.search {
  display: flex; align-items: center; gap: 0.7rem; flex: 1 1 340px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.85rem 1.3rem; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(22,169,209,0.14); }
.search svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.search input { flex: 1; background: none; border: 0; color: var(--ink); font-size: 1rem; font-family: var(--ff-body); outline: none; }
.search input::placeholder { color: var(--muted-dim); }
.portfolio__meta { font-family: var(--ff-display); font-weight: 700; color: var(--muted); white-space: nowrap; }
.portfolio__meta span { color: var(--teal); }

.az-rail { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 2rem; }
.az-rail button {
  font-family: var(--ff-display); font-weight: 700; font-size: 0.82rem;
  min-width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  background: var(--white); color: var(--muted); border: 1px solid var(--line);
  transition: all 0.2s var(--ease);
}
.az-rail button:hover:not(:disabled) { color: var(--teal-deep); border-color: var(--cyan); }
.az-rail button.is-active { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.az-rail button:disabled { opacity: 0.4; cursor: default; }

.portfolio__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.7rem;
}
.pcard {
  position: relative; padding: 1rem 1.1rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--white);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  animation: cardIn 0.4s var(--ease) both;
}
.pcard:hover { transform: translateY(-3px); border-color: rgba(22,169,209,0.6); box-shadow: 0 14px 30px -18px rgba(20,137,170,0.6); }
.pcard__letter {
  font-family: var(--ff-display); font-weight: 800; font-size: 0.72rem; color: var(--teal);
  letter-spacing: 0.1em;
}
.pcard__name { font-size: 0.95rem; font-weight: 500; color: var(--ink); margin-top: 0.25rem; line-height: 1.35; }
.pcard__name mark { background: rgba(22,169,209,0.22); color: var(--teal-deep); border-radius: 3px; padding: 0 2px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.portfolio__empty { text-align: center; color: var(--body); padding: 2.5rem 0; }
.portfolio__empty span { color: var(--teal); }

/* ---------- Quality ---------- */
.quality__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.quality__lead { font-family: var(--ff-display); font-weight: 500; font-size: 1.2rem; line-height: 1.5; color: var(--ink); }
.quality__grid p:not(.quality__lead) { color: var(--body); }

.assurance { margin-top: 3.2rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.assurance__item {
  padding: 1.4rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-soft);
}
.assurance__k { display: block; font-family: var(--ff-display); font-weight: 800; font-size: 1.5rem; color: var(--cyan); margin-bottom: 0.4rem; }
.assurance__v { font-size: 0.85rem; color: var(--body); }

.industries { margin-top: 3.5rem; max-width: 760px; }
.industries p { color: var(--body); margin-top: 0.6rem; }
.industries__chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.industries__chips span {
  font-family: var(--ff-display); font-weight: 600; font-size: 0.9rem;
  padding: 0.5rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink);
}

/* ---------- Contact ---------- */
.section--contact { position: relative; overflow: hidden; max-width: none; background: var(--bg-alt); border-top: 1px solid var(--line-soft); }
.section--contact > *:not(.contour) { max-width: var(--maxw); margin-inline: auto; position: relative; z-index: 1; }
.contact__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); letter-spacing: 0.02em; }
.field input, .field textarea {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.85rem 1rem; color: var(--ink); font-family: var(--ff-body); font-size: 1rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(22,169,209,0.14); }
.contact__note { font-size: 0.82rem; color: var(--muted); text-align: center; }
.contact__note a { color: var(--cyan); }

.contact__info {
  padding: 2rem; border: 1px solid var(--line); border-radius: 18px;
  background: var(--white); box-shadow: var(--shadow);
}
.contact__logo { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 12px; padding: 1.2rem; margin-bottom: 1.6rem; }
.contact__list { list-style: none; display: grid; gap: 1rem; }
.contact__list li { display: flex; flex-direction: column; gap: 0.15rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.contact__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.contact__list span { font-family: var(--ff-display); font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.contact__list a { color: var(--cyan); font-size: 0.92rem; }
.contact__web { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.4rem; }
.contact__web a { color: var(--ink); font-weight: 600; }
.contact__web a:hover { color: var(--cyan); }

/* ---------- Footer ---------- */
.footer {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
  padding: 2.5rem var(--pad); max-width: var(--maxw); margin: 0 auto;
  border-top: 1px solid var(--line);
}
.footer__brand { font-family: var(--ff-display); font-weight: 900; font-size: 1.3rem; line-height: 1; letter-spacing: 0.02em; color: var(--ink); }
.footer__brand span { font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.08em; }
.footer__line { flex: 1; height: 1px; background: var(--line); min-width: 40px; }
.footer__copy { font-size: 0.8rem; color: var(--muted); max-width: 42ch; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__hint-line { animation: none; }
  .pcard { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .company__grid, .vision__cols, .reach__grid, .quality__grid, .contact__grid { grid-template-columns: 1fr; }
  .assurance { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
}
@media (max-width: 720px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.8rem;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(18px); padding: 2rem;
    box-shadow: -20px 0 50px -30px rgba(12,46,70,0.5);
    transform: translateX(100%); transition: transform 0.4s var(--ease);
  }
  .nav.is-open .nav__links { transform: translateX(0); }
  .nav__links a { font-size: 1.2rem; }
  .nav__toggle { display: flex; z-index: 95; }
  .service { grid-template-columns: 70px 1fr; }
  .reach__offices { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .assurance { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}
