/* ============================================================
   YingDeng — Integrated Systems
   Palette: deep forest + warm ivory + terracotta + sage
   ============================================================ */

:root {
  --bg: #0D1A14;
  --bg-2: #12221B;
  --bg-3: #173027;
  --bg-4: #1C3A2E;
  --line: #244034;
  --text: #F3F1E9;
  --muted: #A9BDB1;
  --muted-2: #7FA08F;
  --accent: #E07A5F;
  --accent-strong: #F08A6C;
  --accent-deep: #B85A40;
  --sage: #8FBFAA;
  --gold: #DDB76A;
  --sidebar-w: 264px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Sora", "Inter", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ============================ SIDEBAR NAV ============================ */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background-color: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 32px 24px 28px;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--bg);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: "Sora", sans-serif; font-weight: 700; font-size: 18px; color: var(--text); }
.brand-tag { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

.sidebar-menu { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.side-link:hover { background-color: var(--bg-3); color: var(--text); }

.side-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  width: 20px;
}

.sidebar-foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 20px; }

.side-minor { font-size: 13px; color: var(--muted-2); transition: color 0.2s ease; }
.side-minor:hover { color: var(--text); }

.side-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 10px;
  background-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.side-cta:hover { background-color: var(--accent-strong); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: var(--bg-2);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  z-index: 45;
  transition: opacity 0.3s ease;
}
.nav-overlay.show { pointer-events: auto; }

/* ============================ MAIN CONTENT SHELL ============================ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* ============================ SHARED SECTION HEAD ============================ */
.section-head { max-width: 720px; margin-bottom: 56px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 18px;
}

.section-sub { font-size: 17px; color: var(--muted); max-width: 640px; }

/* ============================ HERO ============================ */
.hero-section {
  padding: 96px 56px 80px;
  background:
    radial-gradient(1100px 500px at 85% -10%, var(--bg-3) 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(40px, 5.6vw, 68px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}

.hero-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-accent { background-color: var(--accent); color: var(--bg); }
.btn-accent:hover { background-color: var(--accent-strong); transform: translateY(-2px); }

.btn-ghost { background-color: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hero-points li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.hero-points li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background-color: var(--sage); flex-shrink: 0; }

.hero-panel {
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-dot { width: 9px; height: 9px; border-radius: 50%; background-color: var(--accent); }

.panel-items { padding: 8px 24px; }

.panel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.panel-item:last-child { border-bottom: none; }

.panel-value { font-family: "Sora", sans-serif; font-weight: 800; font-size: 30px; color: var(--accent); }
.panel-label { font-size: 14px; color: var(--muted); text-align: right; }

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted-2);
}

/* ============================ STATEMENT ============================ */
.statement-section {
  padding: 96px 56px;
  background-color: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

.statement-inner { max-width: 900px; margin: 0 auto; position: relative; padding-left: 40px; }

.statement-mark {
  position: absolute;
  left: 0;
  top: -6px;
  width: 4px;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), var(--sage));
}

.statement-text {
  font-family: "Sora", sans-serif;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
}

.statement-by { margin-top: 24px; font-size: 14px; color: var(--muted); letter-spacing: 0.03em; }

/* ============================ CAPABILITIES ============================ */
.capabilities-section { padding: 96px 56px; border-bottom: 1px solid var(--line); }

.capability-list { list-style: none; max-width: 1180px; margin: 0 auto; }

.capability-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}
.capability-row:last-child { border-bottom: none; }

.cap-index { font-family: "Sora", sans-serif; font-weight: 800; font-size: 40px; color: var(--line); transition: color 0.3s ease; }
.capability-row:hover .cap-index { color: var(--accent); }

.cap-title { font-size: 24px; margin-bottom: 12px; }
.cap-text { color: var(--muted); max-width: 760px; margin-bottom: 16px; }

.cap-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.cap-tags span {
  font-size: 13px;
  font-weight: 600;
  color: var(--sage);
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ============================ APPROACH / TIMELINE ============================ */
.approach-section { padding: 96px 56px; background-color: var(--bg-2); border-bottom: 1px solid var(--line); }

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

.phase {
  background-color: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.phase:hover { border-color: var(--accent); transform: translateY(-4px); }

.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--bg);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 18px;
}

.phase-title { font-size: 20px; margin-bottom: 10px; }
.phase-text { color: var(--muted); font-size: 15px; }

/* ============================ DIFFERENCE / COMPARE ============================ */
.difference-section { padding: 96px 56px; border-bottom: 1px solid var(--line); }

.compare-table { max-width: 900px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }

.compare-row { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.compare-row > .compare-cell { padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 15px; }
.compare-row:last-child > .compare-cell { border-bottom: none; }

.compare-head { background-color: var(--bg-2); }
.compare-head .compare-cell { font-weight: 700; font-family: "Sora", sans-serif; }

.compare-label { color: var(--muted); font-weight: 600; }
.compare-cell { color: var(--muted); }
.compare-cell.compare-yingdeng { background-color: var(--bg-2); color: var(--text); font-weight: 500; }
.compare-row .compare-cell.compare-yingdeng { border-left: 1px solid var(--line); }
.compare-head .compare-cell.compare-yingdeng { color: var(--accent); }

/* ============================ METRICS ============================ */
.metrics-section {
  padding: 80px 56px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
  border-bottom: 1px solid var(--line);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}

.metric { display: flex; flex-direction: column; gap: 8px; }

.metric-value { font-family: "Sora", sans-serif; font-weight: 800; font-size: clamp(40px, 5vw, 60px); color: var(--text); }
.metric-label { font-size: 15px; color: var(--sage); letter-spacing: 0.03em; }

/* ============================ INDUSTRIES ============================ */
.industries-section { padding: 96px 56px; background-color: var(--bg-2); border-bottom: 1px solid var(--line); }

.industry-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.industry-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background-color: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px;
  transition: border-color 0.3s ease;
}
.industry-card:hover { border-color: var(--gold); }

.industry-name { font-size: 19px; margin-bottom: 12px; color: var(--text); }
.industry-text { color: var(--muted); font-size: 15px; }

.industry-scroll::-webkit-scrollbar { height: 8px; }
.industry-scroll::-webkit-scrollbar-track { background: var(--bg-2); }
.industry-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ============================ DISCIPLINES / BENTO ============================ */
.disciplines-section { padding: 96px 56px; border-bottom: 1px solid var(--line); }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.bento-card {
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.bento-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.bento-card h3 { font-size: 19px; margin-bottom: 10px; }
.bento-card p { color: var(--muted); font-size: 15px; }

.bento-tall { grid-row: span 2; }
.bento-tall h3 { font-size: 22px; }

/* ============================ CONTACT ============================ */
.contact-section { padding: 96px 56px; background-color: var(--bg-2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 1180px;
  margin: 0 auto;
}

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }

.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.contact-list a, .contact-list span:not(.contact-label) { color: var(--text); font-size: 16px; }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background-color: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; }

.form-field label { font-size: 13px; font-weight: 600; color: var(--muted); }

.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  transition: border-color 0.2s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted-2); }
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--accent); }

.form-field textarea { resize: vertical; min-height: 120px; }

.form-note { font-size: 14px; color: var(--sage); min-height: 20px; }
.form-note.error { color: var(--accent); }

/* ============================ FOOTER ============================ */
.site-footer { border-top: 1px solid var(--line); background-color: var(--bg); }

.newsletter-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 56px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
}

.newsletter-title { font-size: 24px; margin-bottom: 6px; }
.newsletter-sub { color: var(--muted); font-size: 15px; }

.newsletter-form { display: flex; gap: 12px; flex-shrink: 0; }
.newsletter-form input {
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background-color: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  width: 280px;
}
.newsletter-form input::placeholder { color: var(--muted-2); }
.newsletter-form input:focus { outline: none; border-color: var(--accent); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 56px 40px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-brand-col .sidebar-brand { margin-bottom: 12px; }

.footer-about { color: var(--muted); font-size: 15px; max-width: 320px; }

.footer-head { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }

.footer-link { font-size: 15px; color: var(--muted); transition: color 0.2s ease; }
.footer-link:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 28px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.footer-watermark {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--line);
}

.footer-copy { font-size: 13px; color: var(--muted-2); }

/* ============================ SCROLL REVEAL ============================ */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-section, .statement-section, .capabilities-section,
  .approach-section, .difference-section, .industries-section,
  .disciplines-section, .contact-section { padding: 72px 40px; }
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-band { flex-direction: column; align-items: flex-start; }
  .newsletter-form { width: 100%; }
  .newsletter-form input { width: 100%; }
}

@media (max-width: 900px) {
  .sidebar-nav { transform: translateX(-100%); }
  .sidebar-nav.open { transform: translateX(0); box-shadow: 0 0 60px #000000; }
  .main-content { margin-left: 0; }
  .nav-toggle { display: flex; }
  .hero-section, .statement-section, .capabilities-section,
  .approach-section, .difference-section, .industries-section,
  .disciplines-section, .contact-section { padding: 60px 24px; }
  .capability-row { grid-template-columns: 1fr; gap: 14px; }
  .cap-index { font-size: 30px; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-row .compare-cell.compare-yingdeng { border-left: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .timeline { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-tall { grid-row: span 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}
