/* Newbuy Inc.*/
/* Reset & base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
:root {
  --bg: #0b1220;
  --panel: #0f1a2b;
  --text: #e6f1ff;
  --muted: #9db0cf;
  --brand: #15d1e3;
  --brand-2: #0ea5b5;
  --accent: #7dd3fc;
  --ok: #22c55e;
  --warn: #f59e0b;
  --risk: #ef4444;
  --link: #8bafff;
  --ring: rgba(21, 209, 227, 0.6);
  --card: #0c1728;
  --border: #1e2a3f;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7fafc;
    --panel: #ffffff;
    --text: #0b1220;
    --muted: #3b556f;
  }
}
body { background: var(--bg); color: var(--text); margin: 0; font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.container { width: min(1080px, 92%); margin: 0 auto; }
.section { padding: 64px 0; }

/* Header */
header.sticky { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(8px); background: color-mix(in srgb, var(--bg) 85%, transparent); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.nav a { color: var(--muted); text-decoration: none; margin: 0 10px; font-weight: 600; }
.nav a:hover { color: var(--text); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo .badge { font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* Hero */
.hero { position: relative; padding: 30px 0 20px; }
#graph-bg { position: absolute; inset: 0; z-index: 0; opacity: .35; }
.hero .content { position: relative; z-index: 1; }
.kicker { color: var(--brand); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.1; margin: 12px 0 16px; }
.lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 780px; }
.btns { display: flex; gap: 12px; margin-top: 24px; }
.btn {
  --bgc: linear-gradient(90deg, var(--brand), var(--brand-2));
  display: inline-block; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--panel) 85%, transparent);
}
.btn.primary { background: var(--bgc); border: none; }
.pill { display: inline-block; padding: 6px 10px; border: 1px solid var(--border); color: var(--muted); border-radius: 999px; margin: 6px 8px 0 0; }

/* Grid & cards */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.icon { margin-right: 8px; }

/* Footer */
footer { padding: 40px 0; border-top: 1px solid var(--border); color: var(--muted); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; width: auto; height: auto; background: #02131a; padding: 8px 10px; border-radius: 8px; z-index: 100; }

/* Language switch button */
.lang-switch { margin-left: 8px; padding: 6px 10px; border: 1px solid var(--border); background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--muted); border-radius: 10px; cursor: pointer; font-weight: 700; }
.lang-switch:hover { color: var(--text); }

/* === Full-page particles background (excludes header & footer) === */
#particles-bg {
  position: fixed;
  left: 0; right: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .25; 
}
main, .hero { position: relative; z-index: 1; }


/* === Contact form layout fix === */
form#contact {
  display: grid;
  grid-template-columns: 1fr;   /* 垂直排布 */
  gap: 14px;
  max-width: 560px;             /* 控制表单宽度 */
  justify-self: start;          /* 在右侧列靠左对齐 */
}

form#contact label {
  display: flex;                /* label 包含标题 + 控件 */
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--muted);
}

form#contact input,
form#contact textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none; /* 兼容 Safari */
          appearance: none;
}

form#contact textarea {
  min-height: 140px;
  resize: vertical;
}

form#contact input::placeholder,
form#contact textarea::placeholder {
  color: var(--muted);
  opacity: .75;
}

form#contact button {
  align-self: start;            /* 让按钮靠左 */
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}
form#contact button:hover { filter: brightness(1.06); }


/* === Contact form: align to right column width === */
.section #contact {
  width: 100%;
  max-width: none;        /* 100% */
  justify-self: stretch;  /* right side full */
}

.section #contact button {
  width: auto;            /* natual width */
}

/* full */
@media (max-width: 900px) {
  .section #contact {
    width: 100%;
    justify-self: start;
  }
}


.hero .content{ position:relative; z-index:2; }


/* Hero layering: canvas is bottom，content middle；tooltip is top */
.hero { position: relative; overflow: hidden;}
#graph-bg { position: absolute; inset: 0; z-index: 0; opacity: .60; }  /* more clear */
.hero .content { position: relative; z-index: 1; }

.graph-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: pre-line;
  max-width: 280px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 9999;
}



/* Hero below */
.hero-graph {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;   /* 减少高度从360px到200px */
  margin-top: 1rem;  /* 减少上边距从2rem到1rem */
  margin-bottom: 1rem;  /* 减少下边距从2rem到1rem */
  position: relative;
}


/* Hero graph visibility + layering */
#graph-bg{
  width: 100%;
  height: 100%;
  display: block;
}