﻿/* WIRE MASTER — Mesh Drawer one-page site
   Tokens follow DESIGN.md (colors, type scale, radius, motion). */
:root {
  /* color */
  --text-primary: #333333;
  --text-secondary: #ffffff;
  --text-tertiary: #77aaa3;      /* accent text on dark surfaces */
  --text-inverse: #587e9f;       /* non-text accents (icons, rules) */
  --surface-base: #000000;       /* dark sections */
  --surface-raised: #1cb3c4;     /* brand teal */
  --surface-strong: #f5f5f5;     /* light gray */
  --surface-soft: #e6e6e6;       /* light gray 2 */
  --border-strong: #333333;
  --border-soft: #e5ebeb;
  --text-accent: #0e8593;        /* teal darkened for small text on light (AA) */
  --text-muted: #5c5c5c;
  --text-muted-dark: #b9bfbf;    /* secondary text on dark surfaces */
  --surface-card-dark: #151515;

  /* type (DESIGN.md scale) */
  --font-stack: "YakuHanJP_Noto", "Noto Sans TC", "Noto Sans JP", "Microsoft JhengHei", "PingFang TC", sans-serif;
  --fs-xs: 10px; --fs-sm: 11px; --fs-md: 12px; --fs-lg: 13px;
  --fs-xl: 14px; --fs-2xl: 15px; --fs-3xl: 16px; --fs-4xl: 22px;
  /* display tier for hero / section headings only */
  --fs-h2: clamp(22px, 2.6vw, 30px);
  --fs-h1: clamp(28px, 4.4vw, 48px);
  --lh-base: 1.8;                /* 25.2px / 14px */

  /* spacing */
  --space-1: 3px; --space-2: 4px; --space-3: 5px; --space-4: 8px;
  --space-5: 10px; --space-7: 12px; --space-8: 13px;

  /* radius / motion */
  --radius-pill: 50px;
  --radius-xs: 40px;
  --radius-card: 16px;
  --dur-instant: 200ms; --dur-fast: 300ms; --dur-normal: 400ms;

  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: var(--lh-base);
  color: var(--text-primary);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

/* ---- focus (keyboard) ---- */
:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 3px; border-radius: 4px; }

/* ---- language switching ---- */
html[data-lang="en"] [lang="zh-Hant"],
html[data-lang="zh-Hant"] [lang="en"] { display: none !important; }

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

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  height: var(--header-h);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 100%; }
.logo { font-weight: 700; letter-spacing: 3px; font-size: var(--fs-3xl); color: var(--text-primary); white-space: nowrap; }
.logo-mark { color: var(--surface-raised); margin-right: var(--space-3); letter-spacing: 0; }
.main-nav { display: flex; gap: 22px; margin-left: auto; font-size: var(--fs-lg); color: var(--text-primary); }
.main-nav a { padding: var(--space-3) 0; border-bottom: 2px solid transparent; transition: color var(--dur-instant), border-color var(--dur-instant); }
.main-nav a:hover { color: var(--text-accent); border-color: var(--surface-raised); }
.lang-switch { display: flex; border: 1px solid #cfcfcf; border-radius: var(--radius-pill); overflow: hidden; flex-shrink: 0; }
.lang-btn {
  border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: var(--fs-md); font-weight: 700;
  padding: var(--space-3) 16px; cursor: pointer; letter-spacing: 1px; transition: background var(--dur-instant);
}
.lang-btn:hover { background: var(--surface-soft); }
.lang-btn.active { background: var(--surface-raised); color: var(--text-secondary); }
.nav-toggle { display: none; background: none; border: 0; padding: var(--space-4); cursor: pointer; margin-left: auto; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-primary); margin: 5px 0; }

/* ---- shared ---- */
.section { padding: 80px 0; }
.section-light { background: var(--surface-strong); }
.section-white { background: #fff; }
.section-tint { background: var(--surface-soft); }
.section-dark { background: var(--surface-soft); color: var(--text-primary); }

.eyebrow { font-size: var(--fs-md); font-weight: 700; letter-spacing: 3px; color: var(--text-accent); margin-bottom: var(--space-7); text-transform: uppercase; }

h2 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 700; letter-spacing: .5px; }
h3 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: 1px; line-height: 1.5; }
.lead { font-size: var(--fs-2xl); color: var(--text-muted); margin-top: 16px; max-width: 520px; }
.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-5);
  min-height: 48px; padding: var(--space-7) 28px; border-radius: var(--radius-pill);
  font-size: var(--fs-xl); font-weight: 700; letter-spacing: 2px; line-height: 1.3;
  border: 2px solid transparent; margin-top: 28px;
  transition: background var(--dur-instant), color var(--dur-instant), border-color var(--dur-instant);
}
.btn b { font-weight: 700; transition: transform var(--dur-instant); }
.btn:hover b { transform: translateX(4px); }
.btn-primary { background: var(--surface-raised); color: var(--text-secondary); }
.btn-primary:hover { background: var(--text-primary); color: #fff; }
.btn-outline { border-color: var(--text-accent); color: var(--text-accent); background: transparent; }
.btn-outline:hover { background: var(--surface-raised); border-color: var(--surface-raised); color: var(--text-secondary); }
.btn-light { background: #fff; color: var(--text-primary); }
.btn-light:hover { background: var(--text-primary); color: #fff; }

.icon-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border-soft); color: var(--text-accent);
}

.card { display: block; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-card); overflow: hidden; transition: transform var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast); }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); border-color: var(--surface-raised); }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }

/* ---- hero: bg image img/hero-bg.webp, text sits in the empty white area (right of products, above right-hand drawers) ---- */
.hero { position: relative; background: #fff url("../img/hero-bg.webp") center bottom / cover no-repeat; color: var(--text-primary); aspect-ratio: 1290 / 463; max-height: 1000px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 50% 1fr; height: 100%; }
.hero-text { grid-column: 2; padding: 2.2vw 2vw 0 1vw; }
.hero .eyebrow { margin-bottom: .7vw; }
.hero h1 { font-size: clamp(24px, 2.9vw, 42px); line-height: 1.15; font-weight: 700; letter-spacing: 1px; }
.hero h1 em { font-style: normal; color: var(--text-accent); }
.hero-sub { font-size: clamp(14px, 1.3vw, 22px); margin-top: .9vw; font-weight: 500; line-height: 1.5; }
.hero-desc { font-size: clamp(12px, .95vw, 14px); line-height: 1.65; color: var(--text-muted); margin-top: .8vw; border-top: 2px solid var(--surface-raised); padding-top: .8vw; }
/* ---- features ---- */
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); }
.feature-list li { padding: var(--space-4) 28px; text-align: center; border-left: 1px solid #d4d4d4; }
.feature-list li:first-child { border-left: 0; }
.feature-list h3 { margin: 18px 0 var(--space-4); }
.feature-list p { font-size: var(--fs-xl); color: var(--text-muted); line-height: 1.7; }

/* ---- products ---- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-card h3 { padding: 18px 18px var(--space-2); }
.product-card p { padding: 0 18px 20px; font-size: var(--fs-lg); color: var(--text-muted); line-height: 1.7; }

/* ---- applications ---- */
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.app-card { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius-card); overflow: hidden; display: flex; flex-direction: column; }
.app-card img { width: 100%; aspect-ratio: 800 / 650; object-fit: cover; }
.app-body { display: flex; gap: var(--space-7); padding: 20px; color: var(--text-primary); flex: 1; }
.app-body .icon { color: var(--text-accent); width: 30px; height: 30px; margin-top: var(--space-1); }
.app-body h3 { font-size: var(--fs-xl); margin-bottom: var(--space-3); }
.app-body p { font-size: var(--fs-lg); color: var(--text-muted); line-height: 1.7; }

/* ---- about ---- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.about-img { margin-top: 0; }
.about-img img { width: 100%; height: auto; border-radius: var(--radius-card); }
.about-text .btn { margin-top: 24px; }
.about-text > div p + p { margin-top: 1.2em; }
.tagline { color: var(--text-accent); font-weight: 700; font-size: var(--fs-2xl); margin: var(--space-7) 0 16px; }
.about-text > div p { color: var(--text-muted); font-size: var(--fs-2xl); }

/* ---- news ---- */
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head-row .btn { margin-top: 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card img { width: 100%; aspect-ratio: 40 / 26; object-fit: cover; }
.news-body { padding: 20px 22px 24px; }
.news-meta { font-size: var(--fs-md); color: var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-bottom: var(--space-5); }
.tag { background: var(--surface-raised); color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 1.5px; padding: var(--space-1) var(--space-5); border-radius: var(--radius-pill); }
.news-body h3 { font-size: var(--fs-3xl); letter-spacing: .3px; margin-bottom: var(--space-4); }
.news-card:hover h3 { color: var(--text-accent); }
.news-body p:last-child { font-size: var(--fs-lg); color: var(--text-muted); line-height: 1.7; }

/* ---- partner ---- */
.partner-top { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
.partner-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-card); }
.partner-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }
.partner-list li { padding: 28px 22px; border: 1px solid var(--border-soft); border-top: 3px solid var(--surface-raised); border-radius: var(--radius-card); background: var(--surface-strong); }
.partner-list .icon-circle { width: 56px; height: 56px; }
.partner-list h3 { margin: 16px 0 var(--space-4); }
.partner-list p { font-size: var(--fs-lg); color: var(--text-muted); line-height: 1.7; }

/* ---- CTA ---- */
.cta { background: var(--surface-raised); color: var(--text-secondary); padding: 56px 0; }
.cta-inner { display: flex; align-items: center; gap: 28px; }
.cta-icon { width: 56px; height: 56px; stroke-width: 1.2; }
.cta-text { flex: 1; }
.cta-text h2 { font-size: var(--fs-4xl); }
.cta-text p { margin-top: var(--space-4); font-size: var(--fs-2xl); max-width: 640px; }
.cta .btn { margin-top: 0; white-space: nowrap; }

/* ---- footer ---- */
.site-footer { background: var(--surface-strong); color: var(--text-muted); padding: 40px 0; font-size: var(--fs-lg); }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer-co { font-size: var(--fs-md); letter-spacing: 3px; margin-top: var(--space-2); }
.footer-tags { text-align: center; }
.footer-copy a { color: var(--text-accent); }
.footer-copy a:hover { text-decoration: underline; }

/* ---- RWD ---- */
@media (max-width: 1080px) {
  .main-nav { gap: 14px; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
  .nav-toggle { display: block; order: 3; margin-left: 0; }
  .lang-switch { order: 2; }
  .logo { margin-right: auto; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--border-soft);
    max-height: 0; overflow: hidden; transition: max-height var(--dur-fast) ease;
  }
  .main-nav.open { max-height: 480px; }
  .main-nav a { padding: 14px 24px; border-top: 1px solid var(--border-soft); font-size: var(--fs-3xl); }

  .section { padding: 56px 0; }
  .split, .about-grid, .partner-top { grid-template-columns: 1fr; gap: 32px; }
  .lead { max-width: none; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 16px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-list li { border-left: 0; border-top: 1px solid #d4d4d4; padding: 24px var(--space-4); }
  .feature-list li:first-child { border-top: 0; }
  .product-grid, .news-grid, .app-grid, .partner-list { grid-template-columns: 1fr; }
  .product-card { display: grid; grid-template-columns: 110px 1fr; align-items: center; }
  .product-card img { grid-row: 1 / 3; height: 100%; }
  .product-card h3 { padding: 14px 14px var(--space-1); }
  .product-card p { padding: 0 14px 14px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .section-head-row .btn { width: auto; }
  .hero-sub { font-size: var(--fs-3xl); }
  .logo { font-size: var(--fs-xl); letter-spacing: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---- single featured news ---- */
.news-feature { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
.news-feature:hover { transform: none; }
.news-feature-img img { width: 100%; height: 100%; aspect-ratio: 40 / 26; object-fit: cover; }
.news-feature .news-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.news-feature .news-body h3 { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.4; letter-spacing: .5px; margin-bottom: var(--space-5); }
.news-feature .news-body p:last-of-type { font-size: var(--fs-2xl); }
@media (max-width: 920px) {
  .news-feature { grid-template-columns: 1fr; }
  .news-feature .news-body { padding: 24px 22px 28px; }
}

/* ---- logo ---- */
.logo { display: inline-flex; align-items: center; gap: var(--space-5); }
.logo-img { height: 42px; width: auto; border-radius: 4px; }
.site-footer .logo-img { height: 48px; mix-blend-mode: multiply; }
.footer-co { letter-spacing: 1px; line-height: 1.6; }
@media (max-width: 640px) { .logo-img { height: 36px; } }
@media (max-width: 1100px) {
  .hero { aspect-ratio: auto; max-height: none; background-image: url("../img/hero-bg-mobile.jpg"); background-size: 100% auto; background-position: top center; padding: calc(100vw * 361 / 926 + 28px) 0 48px; }
  .hero-inner { display: block; height: auto; padding: 0 18px; }
  .hero-text { padding: 0; }
  .hero .eyebrow { margin-bottom: var(--space-7); }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: var(--fs-3xl); margin-top: 16px; }
  .hero-desc { font-size: var(--fs-xl); margin-top: var(--space-7); padding-top: var(--space-7); max-width: 640px; }
}

@media (max-width: 380px) {
  .site-header .logo-text { display: none; }
  .header-inner { gap: 12px; }
}

.app-card { transition: transform var(--dur-fast), box-shadow var(--dur-fast), border-color var(--dur-fast); }
.app-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); border-color: var(--surface-raised); }

.about-text h2 { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; }

/* ---- footer contact ---- */
.footer-inner { grid-template-columns: 1fr 1fr; align-items: start; gap: 48px; }
.site-footer .footer-brand { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.footer-brand .footer-tags { text-align: left; margin-top: var(--space-4); }
.footer-contact h3 { font-size: var(--fs-xl); letter-spacing: 2px; color: var(--text-primary); margin-bottom: var(--space-7); }
.contact-list li { padding: var(--space-2) 0; line-height: 1.7; overflow-wrap: anywhere; }
.contact-list a { color: var(--text-accent); }
.contact-list a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border-soft); font-size: var(--fs-md); }
@media (max-width: 920px) {
  .footer-inner { grid-template-columns: 1fr; text-align: left; gap: 28px; }
  .site-footer .footer-brand { align-items: flex-start; }
  .footer-bottom { text-align: left; }
}


