/* =========================================================
   Taihang EPC — Design System & Styles
   Local-first static site. No build step.
   ========================================================= */

:root {
  /* Brand */
  --ink:        #0a1826;
  --navy:       #0e2237;
  --navy-700:   #16324c;
  --brand:      #f7a827;   /* solar amber */
  --brand-600:  #e2920e;
  --brand-tint: #fff4e0;
  --green:      #10996e;   /* energy green */
  --green-600:  #0c7d5a;
  --green-tint: #e7f6f0;

  /* Neutrals */
  --text:     #15202b;
  --muted:    #566675;
  --muted-2:  #7d8b98;
  --line:     #e6ebf1;
  --bg:       #ffffff;
  --bg-soft:  #f5f8fb;
  --bg-soft2: #eef3f8;
  --white:    #ffffff;

  /* System */
  --font-head: 'Sora', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --radius:   16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10,24,38,.06), 0 2px 8px rgba(10,24,38,.05);
  --shadow:    0 10px 30px rgba(10,24,38,.08), 0 2px 6px rgba(10,24,38,.05);
  --shadow-lg: 0 24px 60px rgba(10,24,38,.16);
  --container: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--soft { background: var(--bg-soft); }
.section--tight { padding-top: clamp(40px, 6vw, 72px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand-600);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--brand); border-radius: 2px; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin-bottom: 0; }
.lead { font-size: 1.14rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--brand); --fg: #1b1203;
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--bg); color: var(--fg); cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .22s var(--ease), background .2s, color .2s, border-color .2s;
  box-shadow: 0 8px 20px rgba(247,168,39,.28); white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(247,168,39,.38); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn--ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
  box-shadow: none;
}
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.btn--light { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn--light:hover { background: var(--brand); color: #1b1203; }
.btn--outline-light {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none;
}
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-2px); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(10,24,38,.06); }
.nav { display: flex; align-items: center; gap: 1.5rem; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--font-head); font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.brand__mark { width: 40px; height: 40px; flex: 0 0 auto; }
.brand__name { font-size: 1.22rem; line-height: 1; }
.brand__name span { color: var(--brand-600); }
.brand__tag { display:block; font-family: var(--font-body); font-weight:500; font-size:.62rem; letter-spacing:.18em; text-transform:uppercase; color: var(--muted-2); margin-top:3px; }
.nav__links { display: flex; align-items: center; gap: 1.6rem; margin-left: auto; }
.nav__links a { font-weight: 500; font-size: .98rem; color: var(--navy); position: relative; padding: 4px 0; }
.nav__links a::after { content:""; position:absolute; left:0; right:100%; bottom:-2px; height:2px; background: var(--brand); transition: right .25s var(--ease); border-radius:2px; }
.nav__links a:hover::after { right: 0; }
.nav__cta { margin-left: .4rem; }
.nav__links .nav__cta { display: none; } /* in-menu CTA shows on mobile only */
.nav__toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav__toggle span::before { transform: translateY(-6px); }
.nav__toggle span::after  { transform: translateY(4px); }
body.nav-open .nav__toggle span { background: transparent; }
body.nav-open .nav__toggle span::before { transform: rotate(45deg); }
body.nav-open .nav__toggle span::after  { transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(105deg, rgba(8,18,30,.94) 0%, rgba(10,24,38,.82) 42%, rgba(10,24,38,.42) 100%),
    linear-gradient(to top, rgba(8,18,30,.75), rgba(8,18,30,0) 40%);
}
.hero__inner { padding: clamp(72px, 11vw, 140px) 0 clamp(96px, 12vw, 160px); max-width: 760px; }
.hero__eyebrow { color: var(--brand); }
.hero h1 { color: #fff; margin-bottom: 1.1rem; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero__sub { font-size: 1.18rem; color: rgba(255,255,255,.86); max-width: 600px; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.4rem; }
.hero__areas { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem; font-size: .9rem; color: rgba(255,255,255,.72); }
.hero__areas strong { color:#fff; font-weight:600; font-family: var(--font-head); }
.hero__areas .dot { width:5px; height:5px; border-radius:50%; background: var(--brand); display:inline-block; }
.hero__group { display:inline-flex; align-items:center; gap:.55rem; font-size:.9rem; color:rgba(255,255,255,.85); background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); padding:.5rem .95rem; border-radius:999px; margin-bottom:1.7rem; }
.hero__group svg { width:18px; height:18px; color: var(--brand); flex:0 0 auto; }
.hero__group strong { color:#fff; font-family: var(--font-head); font-weight:600; }

/* ---------- Stats bar ---------- */
.stats { position: relative; z-index: 2; margin-top: -58px; }
.stats__grid {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line);
}
.stat { padding: 2rem 1.75rem; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.stat__num span { color: var(--brand-600); }
.stat__label { color: var(--muted); font-size: .92rem; margin-top: .5rem; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service__media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service:hover .service__media img { transform: scale(1.06); }
.service__icon {
  position: absolute; left: 16px; bottom: -22px; width: 52px; height: 52px; border-radius: 14px;
  background: var(--brand); color: #1b1203; display: grid; place-items: center; box-shadow: var(--shadow);
}
.service__icon svg { width: 26px; height: 26px; }
.service__body { padding: 32px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.service h3 { margin-bottom: .5rem; }
.service__body > p { color: var(--muted); font-size: .98rem; }
.service__list { margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--line); display: grid; gap: .5rem; }
.service__list li { position: relative; padding-left: 1.5rem; font-size: .92rem; color: var(--navy); }
.service__list li::before {
  content: ""; position: absolute; left: 0; top: .52em; width: 12px; height: 7px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 2rem 1.6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step__n {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--brand-600);
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand-tint);
  display: grid; place-items: center; margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.14rem; }
.step p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 2.65rem; right: -14px; width: 22px; height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent); z-index: 1;
}

/* ---------- Projects ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.project {
  position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate;
  box-shadow: var(--shadow);
}
.project img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.project::after { content:""; position:absolute; inset:0; z-index:-1; background: linear-gradient(to top, rgba(8,18,30,.92) 6%, rgba(8,18,30,.35) 55%, rgba(8,18,30,.12) 100%); }
.project:hover img { transform: scale(1.07); }
.project__badge {
  position: absolute; top: 16px; left: 16px; background: var(--brand); color: #1b1203;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem; padding: .35rem .75rem; border-radius: 999px;
}
.project__body { padding: 1.5rem 1.4rem 1.4rem; }
.project__loc { display: flex; align-items: center; gap: .4rem; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); font-family: var(--font-head); font-weight: 600; margin-bottom: .35rem; }
.project__loc svg { width: 14px; height: 14px; }
.project h3 { color: #fff; font-size: 1.22rem; margin-bottom: .35rem; }
.project p { color: rgba(255,255,255,.82); font-size: .92rem; margin-bottom: 0; }

/* ---------- Features (Why) ---------- */
.why { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.feature__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--green-tint); color: var(--green-600); display: grid; place-items: center; margin-bottom: .85rem; }
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.feature p { color: var(--muted); font-size: .93rem; margin-bottom: 0; }
.why__media { position: relative; }
.why__media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.why__badge {
  position: absolute; left: -24px; bottom: 28px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 1.1rem 1.3rem; display: flex; align-items: center; gap: .9rem; max-width: 260px;
}
.why__badge .big { font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--ink); line-height: 1; }
.why__badge small { color: var(--muted); font-size: .82rem; }
.why__badge .ring { width: 46px; height:46px; border-radius:50%; background: conic-gradient(var(--brand) 85%, var(--brand-tint) 0); display:grid; place-items:center; flex:0 0 auto;}
.why__badge .ring b { width:34px;height:34px;border-radius:50%;background:#fff;display:grid;place-items:center;font-family:var(--font-head);font-size:.72rem;color:var(--brand-600);}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 68px); align-items: center; }
.about__media img { border-radius: var(--radius); box-shadow: var(--shadow); width:100%; aspect-ratio: 5/4; object-fit: cover; }
.about__list { display: grid; gap: .8rem; margin-top: 1.4rem; }
.about__list li { display:flex; gap:.7rem; align-items:flex-start; color: var(--navy); font-size:.98rem; }
.about__list svg { width: 22px; height: 22px; color: var(--green-600); flex:0 0 auto; margin-top:1px; }

/* ---------- CTA band ---------- */
.cta { position: relative; color: #fff; overflow: hidden; isolation: isolate; text-align: center; }
.cta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta::after { content:""; position:absolute; inset:0; z-index:-1; background: linear-gradient(120deg, rgba(10,24,38,.95), rgba(14,34,55,.82)); }
.cta__inner { padding: clamp(64px, 9vw, 110px) 0; max-width: 680px; margin-inline: auto; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.82); font-size: 1.1rem; margin-bottom: 1.8rem; }
.cta .hero__actions { justify-content: center; margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 64px); }
.contact__info h2 { margin-bottom: 1rem; }
.contact__cards { display: grid; gap: 14px; margin-top: 1.6rem; }
.cinfo { display:flex; gap: 1rem; align-items:flex-start; padding: 1.1rem 1.2rem; background:#fff; border:1px solid var(--line); border-radius: var(--radius-sm); }
.cinfo__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-600); display:grid; place-items:center; flex:0 0 auto; }
.cinfo__ic svg { width: 22px; height: 22px; }
.cinfo b { display:block; font-family: var(--font-head); color: var(--ink); font-size:.98rem; }
.cinfo span { color: var(--muted); font-size: .92rem; }
.cinfo a { color: var(--brand-600); font-weight:500; }
.eml i { font-style: normal; color: var(--muted-2); } /* no-JS fallback: "info at domain" */
.cinfo a:hover { text-decoration: underline; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-sm); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display:block; font-size:.86rem; font-weight:600; font-family: var(--font-head); color: var(--navy); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: 10px; font: inherit;
  font-size: .96rem; color: var(--text); background: var(--bg-soft); transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(247,168,39,.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.form__note { font-size: .82rem; color: var(--muted-2); margin-top: .8rem; text-align:center; }
.form__ok { display:none; margin-top:1rem; padding:.9rem 1rem; border-radius:10px; background: var(--green-tint); color: var(--green-600); font-size:.92rem; font-weight:500; }
.form__ok.show { display:block; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.72); padding: clamp(56px, 7vw, 84px) 0 0; }
.footer a { color: rgba(255,255,255,.72); transition: color .2s; }
.footer a:hover { color: var(--brand); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer .brand__name { color:#fff; }
.footer .brand__name span { color: var(--brand); }
.footer__about p { font-size: .95rem; margin-top: 1rem; max-width: 320px; }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.1rem; font-family: var(--font-head); }
.footer__links { display: grid; gap: .6rem; font-size: .95rem; }
.footer__areas { display:flex; flex-wrap:wrap; gap:.5rem; }
.footer__areas span { font-size:.82rem; background: rgba(255,255,255,.08); padding:.3rem .7rem; border-radius:999px; }
.footer__social { display:flex; gap:.6rem; margin-top:1rem; }
.footer__social a { width:38px;height:38px;border-radius:10px;border:1px solid rgba(255,255,255,.14);display:grid;place-items:center; }
.footer__social a:hover { background: var(--brand); border-color: var(--brand); color:#1b1203; }
.footer__social svg { width:18px;height:18px; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display:flex; flex-wrap:wrap; gap:.6rem 1.2rem; justify-content:space-between; font-size:.84rem; color: rgba(255,255,255,.55); }
.footer__bar a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.js-ready .reveal[data-d="1"] { transition-delay: .08s; }
.js-ready .reveal[data-d="2"] { transition-delay: .16s; }
.js-ready .reveal[data-d="3"] { transition-delay: .24s; }
.js-ready .reveal[data-d="4"] { transition-delay: .32s; }
/* No-JS / reduced motion: always visible */
html:not(.js-ready) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .why { grid-template-columns: 1fr; }
  .why__media { order: -1; max-width: 460px; }
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 18px 24px 28px; gap: .2rem; margin: 0;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform .32s var(--ease); z-index: 55;
  }
  body.nav-open .nav__links { transform: translateY(0); }
  .nav__links a { padding: .85rem .2rem; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav__links .nav__cta { display: inline-flex; margin-top: .8rem; margin-left: 0; }
  .nav__toggle { display: inline-flex; }
  .nav__cta.desktop-only { display: none; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .services-grid, .projects-grid, .features { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__about { grid-column: 1 / -1; }
  .why__badge { left: 0; }
}
@media (max-width: 460px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: none !important; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}
