@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #1f1b17;
  --surface: #28231e;
  --surface2: #302b24;
  --border: #3d362d;
  --text: #f5f0e8;
  --text2: #d4c9ba;
  --text3: #a09586;
  --accent: #d4a373;
  --accent2: #deae7a;
  --accent-glow: rgba(212,163,115,.12);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.75;
  overflow-x: hidden;
}

/* ── ambient glow ── */
.ambient { position: fixed; pointer-events: none; z-index: 0; border-radius: 50%; filter: blur(120px); opacity: .12; }
.ambient.a1 { width: 600px; height: 600px; background: #d4a373; top: -200px; left: -150px; }
.ambient.a2 { width: 400px; height: 400px; background: #deae7a; bottom: 10%; right: -100px; }

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(31,27,23,.8); backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  padding: 0 40px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
nav .logo-sm { display: flex; align-items: center; gap: 10px; }
nav .logo-sm svg { width: 28px; height: 28px; }
nav .logo-sm span { font-weight: 700; font-size: 14px; letter-spacing: 4px; color: var(--text); }
nav .links { display: flex; gap: 32px; list-style: none; }
nav .links a { text-decoration: none; color: var(--text2); font-size: 14px; font-weight: 500; transition: color .2s; letter-spacing: .5px; }
nav .links a:hover { color: var(--accent); }
nav .links a.active { color: var(--accent); }

/* ── Hero ── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px 40px 80px; text-align: center; z-index: 1;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(212,163,115,.08) 0%, transparent 70%),
              radial-gradient(ellipse 40% 30% at 30% 70%, rgba(222,174,122,.05) 0%, transparent 70%);
}
.hero > * { position: relative; z-index: 1; }
.hero .logo-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px 44px; margin-bottom: 48px;
  box-shadow: 0 0 60px var(--accent-glow);
}
.hero .logo-wrap svg rect[fill="#c9956b"] { fill: #d4a373; }
.hero .logo-wrap svg { width: 200px; display: block; }
.hero h1 { font-size: 15px; font-weight: 400; color: var(--text2); letter-spacing: 8px; margin-bottom: 12px; text-transform: uppercase; }
.hero .tagline {
  font-size: 36px; font-weight: 800; color: var(--text);
  letter-spacing: -1px; margin-bottom: 8px;
  background: linear-gradient(135deg, #f0ebe3 0%, #deae7a 50%, #d4a373 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .sub { font-size: 14px; color: var(--text3); letter-spacing: 3px; margin-bottom: 32px; }
.hero .beamline-id { font-size: 12px; color: var(--text3); letter-spacing: 2px; padding: 8px 20px; border: 1px solid var(--border); border-radius: 20px; display: inline-block; }

/* ── Page Hero (compact) ── */
.page-hero { position: relative; min-height: 40vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120px 40px 60px; text-align: center; z-index: 1; }
.page-hero::before { content: ''; position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(212,163,115,.06) 0%, transparent 70%); }
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 { font-size: 36px; font-weight: 800; letter-spacing: -1px; margin-bottom: 12px; background: linear-gradient(135deg, #f0ebe3 0%, #deae7a 50%, #d4a373 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.page-hero .sub { font-size: 14px; color: var(--text3); letter-spacing: 3px; }

/* ── Sections ── */
section { padding: 100px 40px; max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
section h2 { font-size: 14px; font-weight: 600; letter-spacing: 4px; color: var(--accent); margin-bottom: 8px; text-transform: uppercase; }
section .section-title-main { font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--text); margin-bottom: 40px; }
section p, section li, .content p, .content li { font-size: 16px; color: var(--text2); line-height: 1.85; }

/* ── Content area for sub-pages ── */
.content { padding: 40px 40px 100px; max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.content h2 { font-size: 26px; font-weight: 700; color: var(--text); margin: 48px 0 16px; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 20px; font-weight: 600; color: var(--accent); margin: 32px 0 12px; }
.content p { margin-bottom: 16px; color: var(--text2); line-height: 1.85; }
.content ul, .content ol { padding-left: 24px; margin-bottom: 16px; color: var(--text2); }
.content li { margin-bottom: 8px; }

/* ── Image banner ── */
.img-banner { width: 100%; height: 320px; border-radius: 16px; overflow: hidden; margin-bottom: 48px; border: 1px solid var(--border); position: relative; }
.img-banner img { width: 100%; height: 100%; object-fit: cover; }
.img-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(31,27,23,.6) 0%, transparent 50%); }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; transition: border-color .3s; margin-bottom: 20px; }
.card:hover { border-color: var(--accent); }
.card h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 12px; }

/* ── Specs grid ── */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.spec-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; }
.spec-item .label { font-size: 10px; font-weight: 600; color: var(--text3); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 6px; }
.spec-item .value { font-size: 16px; font-weight: 700; color: var(--text); }

/* ── Features ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; position: relative; overflow: hidden; }
.feature::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(180deg, var(--accent), var(--accent2)); border-radius: 3px 0 0 3px; }
.feature h4 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--text2); }

/* ── Contact ── */
.contact .card p { margin-bottom: 8px; }
.contact .card a { color: var(--accent); text-decoration: none; }

/* ── Footer ── */
footer { text-align: center; padding: 48px 40px; position: relative; z-index: 1; font-size: 13px; color: var(--text3); border-top: 1px solid var(--border); letter-spacing: 1px; }

/* ── Scroll ── */
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Divider ── */
.divider { width: 1px; height: 60px; margin: 0 auto; background: linear-gradient(180deg, transparent, var(--border), transparent); }

/* ── method list ── */
.method-list { columns: 2; column-gap: 32px; }
.method-list li { break-inside: avoid; margin-bottom: 14px; padding-left: 16px; position: relative; }
.method-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 12px; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero .tagline, .page-hero h1 { font-size: 24px; }
  .hero .logo-wrap { padding: 20px 28px; }
  .hero .logo-wrap svg { width: 150px; }
  nav { padding: 0 20px; }
  nav .links { gap: 16px; }
  section, .content { padding: 60px 20px; }
  .method-list { columns: 1; }
  .img-banner { height: 200px; }
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  padding: 6px;
  z-index: 101;
  flex-shrink: 0;
  position: relative;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all .3s;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.hamburger span::before,
.hamburger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all .3s;
}
.hamburger span::before { top: -7px; }
.hamburger span::after { top: 7px; }
.hamburger.active span { background: transparent; }
.hamburger.active span::before { top: 0; transform: rotate(45deg); }
.hamburger.active span::after { top: 0; transform: rotate(-45deg); }

/* ── Mobile overlay ── */
.mobile-menu {
  display: none;
  position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
  background: rgba(31,27,23,.98);
  z-index: 99;
  padding: 40px 40px;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; flex-direction: column; align-items: center; }
.mobile-menu ul { list-style: none; width: 100%; max-width: 300px; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu li:first-child { border-top: 1px solid var(--border); }
.mobile-menu a {
  display: block;
  padding: 16px 0;
  color: var(--text2);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color .2s;
}
.mobile-menu a:hover,
.mobile-menu a.active { color: var(--accent); }

@media (max-width: 810px) {
  nav .links { display: none; }
  .hamburger { display: block; }
}

/* ── Spec tables ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.65;
}
.spec-table th {
  background: linear-gradient(135deg, var(--surface2), var(--bg));
  color: var(--accent);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid var(--accent);
  letter-spacing: .5px;
}
.spec-table td {
  padding: 10px 14px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.spec-table tr:last-child td {
  border-bottom: none;
}
.spec-table tr:nth-child(even) td {
  background: rgba(40,35,30,.4);
}
.spec-table tr:hover td {
  background: var(--surface2);
}
.spec-table td:first-child {
  font-weight: 500;
  color: var(--text);
}

/* ── Entry grid ── */
.entry-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.entry-grid .entry-card {
  flex: 1 1 calc(33.33% - 20px);
  min-width: 240px;
}
@media (max-width: 900px) {
  .entry-grid .entry-card { flex: 1 1 calc(50% - 20px); }
}
@media (max-width: 600px) {
  .entry-grid .entry-card { flex: 1 1 100%; }
}
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  transition: all .25s;
}
.entry-card:hover {
  background: var(--surface2);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.entry-card h4 {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}
.entry-card p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.65;
  flex: 1;
}
