/* =====================================================================
   Ze Yuan Trade — main stylesheet (homepage)
   Light theme · royal-blue accent · editorial serif + clean sans
   ===================================================================== */

:root {
  --paper: #F7F6F1;
  --paper-2: #EFEEE6;
  --card: #FFFFFF;
  --ink: #17191E;
  --muted: #5B5F68;
  --line: #E3E1D7;
  --accent: #1B4FD8;
  --accent-deep: #12338F;
  --accent-soft: #E8EEFB;
  --accent-soft-2: #DCE5F8;
  --on-accent: #FFFFFF;
  --success: #1F7A4D;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-label::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--accent);
}

/* ---------- Buttons (slanted / parallelogram motif) ---------- */

.btn {
  display: inline-block;
  transform: skewX(-8deg);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 30px;
  border: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn span {
  display: inline-block;
  transform: skewX(8deg);
}

.btn:hover {
  background: var(--accent-deep);
  transform: skewX(-8deg) translateY(-2px);
}

.btn.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.btn.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* =====================================================================
   Split navigation (CTA on the left)
   ===================================================================== */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-nav.scrolled {
  background: var(--card);
  box-shadow: 0 8px 30px #1a1c2012;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
}

.nav-brand .brand-mark {
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 700;
}

.nav-cta {
  transform: skewX(-8deg);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  white-space: nowrap;
  transition: background 0.25s ease;
}

.nav-cta:hover {
  background: var(--accent-deep);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  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);
}

/* =====================================================================
   Hero — diagonal split + left text / right visual
   ===================================================================== */

.hero {
  padding: 170px 0 120px;
  background: linear-gradient(158deg, var(--paper) 0%, var(--paper) 55%, var(--accent-soft) 55.1%, var(--accent-soft) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(227, 225, 215, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(227, 225, 215, 0.4) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .section-label {
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  margin-bottom: 24px;
}

.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
}

.hero-lede {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}

.hero-proof {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}

.hero-proof .proof-item {
  display: flex;
  flex-direction: column;
}

.hero-proof .proof-num {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
}

.hero-proof .proof-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Right-side visual: layered system cards */
.hero-visual {
  position: relative;
  min-height: 420px;
}

.vis-card {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px #1a1c2014;
  padding: 22px;
  border-radius: 4px;
}

.vis-card.dashboard {
  top: 0;
  right: 6%;
  width: 78%;
  z-index: 3;
}

.vis-card.metrics {
  bottom: 8%;
  left: 0;
  width: 56%;
  z-index: 4;
}

.vis-card.chip {
  bottom: 26%;
  right: 0;
  z-index: 5;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
}

.vis-title {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.vis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.vis-row strong {
  font-family: var(--serif);
  font-size: 1.15rem;
}

.vis-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 84px;
  margin-top: 14px;
}

.vis-bars span {
  flex: 1;
  background: var(--accent);
}

.vis-bars span:nth-child(1) { height: 38%; }
.vis-bars span:nth-child(2) { height: 62%; }
.vis-bars span:nth-child(3) { height: 46%; }
.vis-bars span:nth-child(4) { height: 80%; }
.vis-bars span:nth-child(5) { height: 58%; }
.vis-bars span:nth-child(6) { height: 92%; }
.vis-bars span:nth-child(7) { height: 70%; }

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

.metric-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.metric-item .m-key {
  color: var(--muted);
}

.metric-item .m-val {
  font-weight: 600;
}

/* =====================================================================
   Full-width statement row
   ===================================================================== */

.statement {
  background: var(--ink);
  color: var(--paper);
  padding: 110px 24px;
  position: relative;
  overflow: hidden;
}

.statement::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  border: 1px solid #2a2d34;
  border-radius: 50%;
}

.statement .container {
  position: relative;
  z-index: 2;
}

.statement .big {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.25;
  max-width: 20em;
  color: var(--paper);
}

.statement .big em {
  font-style: italic;
  color: #9db7f5;
}

.statement .statement-sub {
  margin-top: 26px;
  color: #b8bcc4;
  max-width: 40rem;
  font-size: 1.02rem;
}

/* =====================================================================
   Stats band (counters)
   ===================================================================== */

.stats {
  background: var(--paper);
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat-cell {
  background: var(--card);
  padding: 40px 30px;
}

.stat-cell .stat-num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-cell .stat-num .suffix {
  font-size: 1.6rem;
}

.stat-cell .stat-label {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =====================================================================
   Capabilities — numbered full-width rows
   ===================================================================== */

.capabilities {
  padding: 110px 0;
  background: var(--paper);
}

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  margin-top: 16px;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

.cap-row {
  display: grid;
  grid-template-columns: 120px 1fr 1.1fr;
  gap: 32px;
  align-items: start;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.cap-row:last-child {
  border-bottom: 1px solid var(--line);
}

.cap-num {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent);
}

.cap-title {
  font-size: 1.5rem;
  font-family: var(--serif);
  font-weight: 600;
}

.cap-desc {
  color: var(--muted);
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cap-tags span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 20px;
}

/* =====================================================================
   Process — horizontal timeline
   ===================================================================== */

.process {
  padding: 110px 0;
  background: var(--paper-2);
}

.process .section-head {
  margin-bottom: 70px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-soft-2);
}

.step {
  position: relative;
  padding-top: 60px;
}

.step-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 52px;
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
  z-index: 2;
}

.step h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.step p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* =====================================================================
   Domains — comparison table
   ===================================================================== */

.domains {
  padding: 110px 0;
  background: var(--paper);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--card);
}

.compare-table th,
.compare-table td {
  padding: 20px 24px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare-table thead th {
  font-family: var(--serif);
  font-size: 1.1rem;
  background: var(--accent-soft);
  color: var(--ink);
}

.compare-table thead th.highlight {
  background: var(--accent);
  color: var(--on-accent);
}

.compare-table tbody th {
  font-weight: 600;
  width: 30%;
}

.compare-table tbody td {
  color: var(--muted);
}

.compare-table td.better {
  color: var(--ink);
  font-weight: 500;
}

.compare-table .tick {
  color: var(--success);
  font-weight: 700;
}

.compare-table .cross {
  color: #b33a3a;
  font-weight: 700;
}

/* =====================================================================
   Difference — alternating two-column principle rows
   ===================================================================== */

.difference {
  padding: 110px 0;
  background: var(--paper-2);
}

.principle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.principle:last-child {
  border-bottom: 1px solid var(--line);
}

.principle.reverse .principle-copy {
  order: 2;
}

.principle.reverse .principle-visual {
  order: 1;
}

.principle-copy h3 {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.principle-copy p {
  color: var(--muted);
}

.principle-visual {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 4px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.principle-visual .pv-label {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--accent);
}

/* =====================================================================
   FAQ — accordion
   ===================================================================== */

.faq {
  padding: 110px 0;
  background: var(--paper);
}

.faq-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 14px;
  background: var(--card);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: 0;
  padding: 22px 24px;
  text-align: left;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-q .faq-icon {
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-a-inner {
  padding: 0 24px 22px;
  color: var(--muted);
}

/* =====================================================================
   CTA band — slanted accent block
   ===================================================================== */

.cta-band {
  background: var(--accent);
  clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%);
  padding: 130px 24px;
  color: var(--on-accent);
}

.cta-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.cta-inner h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: var(--on-accent);
  margin-bottom: 18px;
}

.cta-inner p {
  color: #d7e0fa;
  font-size: 1.08rem;
  margin-bottom: 34px;
}

.cta-inner .btn {
  background: var(--on-accent);
  color: var(--accent);
}

.cta-inner .btn:hover {
  background: var(--paper-2);
}

/* =====================================================================
   Contact
   ===================================================================== */

.contact {
  padding: 110px 0;
  background: var(--paper);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 18px;
}

.contact-info p {
  color: var(--muted);
  margin-bottom: 34px;
}

.contact-detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.contact-detail .cd-label {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.contact-detail .cd-value {
  font-weight: 600;
  color: var(--ink);
}

.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

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

.form-status {
  display: none;
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--success);
  font-weight: 600;
}

.form-status.show {
  display: block;
}

/* =====================================================================
   Footer — watermark wordmark + newsletter band + columns
   ===================================================================== */

.site-footer {
  background: var(--ink);
  color: #c4c8cf;
  position: relative;
  overflow: hidden;
}

.footer-watermark {
  position: absolute;
  bottom: -40px;
  left: -20px;
  font-family: var(--serif);
  font-size: clamp(5rem, 16vw, 14rem);
  font-weight: 700;
  line-height: 0.8;
  color: #23262d;
  pointer-events: none;
  letter-spacing: -0.03em;
}

.newsletter {
  border-bottom: 1px solid #2a2d34;
  padding: 70px 0;
  position: relative;
  z-index: 2;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.newsletter-inner h3 {
  color: var(--paper);
  font-size: 1.7rem;
  max-width: 24rem;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-form input {
  width: 280px;
  padding: 14px 16px;
  border: 1px solid #34373f;
  background: #22252c;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  border-radius: 4px;
}

.newsletter-form input::placeholder {
  color: #7c818b;
}

.newsletter-form .btn {
  border-radius: 0;
}

.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding: 70px 0 60px;
  position: relative;
  z-index: 2;
}

.footer-brand .nav-brand {
  color: var(--paper);
  margin-bottom: 18px;
  display: inline-flex;
}

.footer-brand p {
  font-size: 0.92rem;
  color: #9ba0a9;
  max-width: 22rem;
}

.footer-col h4 {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  color: #9ba0a9;
  font-size: 0.92rem;
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--paper);
}

.footer-bottom {
  border-top: 1px solid #2a2d34;
  padding: 24px 0;
  position: relative;
  z-index: 2;
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: #7c818b;
}

.footer-bottom a {
  color: #9ba0a9;
  font-size: 0.85rem;
  margin-left: 20px;
}

.footer-bottom a:hover {
  color: var(--paper);
}

/* =====================================================================
   Scroll reveal
   ===================================================================== */

.js .fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .fade-up.visible {
  opacity: 1;
  transform: none;
}

/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 960px) {
  .hero {
    padding: 150px 0 90px;
  }

  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 360px;
  }

  .cap-row {
    grid-template-columns: 72px 1fr;
  }

  .cap-desc {
    grid-column: 2;
  }

  .timeline {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .timeline::before {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: var(--card);
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px #1a1c2014;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 24px;
    width: 100%;
    border-top: 1px solid var(--line);
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .principle,
  .principle.reverse {
    grid-template-columns: 1fr;
  }

  .principle.reverse .principle-copy {
    order: 1;
  }

  .principle.reverse .principle-visual {
    order: 2;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-form input {
    width: 100%;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 34px;
  }
}
