/* ============================================================
   永宜數位 YID — Style 1: Clean & Calm
   Light, type-led, generous whitespace, one red accent.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface-page); color: var(--text-body); font-family: var(--font-body); overflow-x: hidden; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1180px; }

/* ---------- Reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .06s; }
.rv-d2 { transition-delay: .12s; }
.rv-d3 { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- Eyebrow ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-primary); }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand-primary); border-radius: 2px; }

/* ---------- Headings ---------- */
.h-display { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; color: var(--text-strong);
  font-size: clamp(2.1rem, 5.2vw, 3.5rem); line-height: 1.1; }
.h-section { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; color: var(--text-strong);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.15; }
.h-card { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; color: var(--text-strong); font-size: 1.2rem; }
.lead { font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.7; color: var(--text-body); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(247,249,251,.8); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s, background .25s; }
.nav.scrolled { background: rgba(255,255,255,.86); border-bottom-color: var(--border-subtle); }
.nav-inner { height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.brand b { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--text-strong); letter-spacing: -.01em; }
.nav-links { display: flex; gap: 28px; margin-left: 4px; }
.nav-link { background: none; border: none; cursor: pointer; padding: 4px 0; font-family: var(--font-display);
  font-weight: 600; font-size: 15px; color: var(--text-body); position: relative; transition: color .15s; }
.nav-link:hover { color: var(--text-strong); }
.nav-link.active { color: var(--brand-secondary); }
.nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--brand-primary); border-radius: 2px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.lang { display: inline-flex; background: var(--surface-sunken); border-radius: var(--radius-pill); padding: 3px; }
.lang button { border: none; background: none; cursor: pointer; font-family: var(--font-display); font-weight: 700;
  font-size: 12.5px; padding: 5px 11px; border-radius: var(--radius-pill); color: var(--text-muted); transition: all .15s; }
.lang button.on { background: var(--surface-card); color: var(--brand-secondary); box-shadow: var(--shadow-xs); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; border-radius: var(--radius-md);
  border: 1.5px solid transparent; transition: background .15s, transform .12s, box-shadow .15s, border-color .15s; text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-md { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-primary { background: var(--brand-primary); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-primary-hover); }
.btn-outline { background: var(--surface-card); color: var(--brand-secondary); border-color: var(--border-default); }
.btn-outline:hover { border-color: var(--brand-secondary); }
.btn-ghost { background: transparent; color: var(--brand-secondary); }
.btn-ghost:hover { background: var(--surface-sunken); }

/* Hamburger */
.burger { display: none; background: none; border: none; cursor: pointer; color: var(--text-strong); padding: 6px; }
.mobile-menu { display: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-top: 16px; }
.section-head .h-section { margin-top: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
  padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 96px); }
.hero h1 { margin: 18px 0 0; }
.hero-sub { margin: 16px 0 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em;
  color: var(--brand-secondary); font-size: clamp(1.05rem, 1.9vw, 1.45rem); line-height: 1.3; }
.hero .lead { margin-top: 22px; max-width: 480px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(2px); }

.stats { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 44px; }
.stat .n { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem,2.4vw,1.9rem);
  color: var(--brand-secondary); letter-spacing: -.02em; }
.stat .l { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

/* ---------- Cards ---------- */
.card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl);
  padding: 28px; transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s; }
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.icon-chip { width: 50px; height: 50px; border-radius: var(--radius-lg); display: grid; place-items: center;
  background: var(--surface-navy-soft); color: var(--brand-secondary); margin-bottom: 18px; }
.icon-chip.red { background: var(--surface-brand-soft); color: var(--brand-primary); }
.card p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--text-body); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ---------- Quote band ---------- */
.quote-band { background: var(--surface-card); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.quote-band blockquote { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  color: var(--text-strong); font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.3; text-align: center; max-width: 820px; margin: 0 auto; }
.quote-mark { font-size: 64px; line-height: 0; color: var(--red-200); font-family: var(--font-display); }

/* ---------- Values list ---------- */
.value-row { display: flex; gap: 20px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--border-subtle); }
.value-row:last-child { border-bottom: 1px solid var(--border-subtle); }
.value-row .num { font-family: var(--font-mono); font-size: 13px; color: var(--brand-primary); font-weight: 700; padding-top: 3px; min-width: 32px; }
.value-row h3 { margin: 0 0 4px; }
.value-row p { margin: 0; font-size: 14.5px; color: var(--text-body); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.step { position: relative; padding-right: 18px; }
.step .bar { position: absolute; top: 21px; left: 44px; right: -4px; height: 2px; background: var(--border-default); }
.step:last-child .bar { display: none; }
.step .dot { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-primary);
  color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; box-shadow: var(--shadow-brand); }
.step h4 { margin: 18px 0 6px; font-family: var(--font-display); font-size: 16px; color: var(--text-strong); }
.step p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); padding-right: 10px; }

/* ---------- Domains / chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip-lg { display: inline-flex; align-items: center; gap: 10px; background: var(--surface-card);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); padding: 11px 18px;
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--text-strong); }
.chip-lg .d { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-primary); }

/* ---------- Jobs ---------- */
.job { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl); overflow: hidden; transition: box-shadow .25s var(--ease-out), border-color .25s; }
.job:hover { box-shadow: var(--shadow-md); border-color: var(--border-default); }
.job.open { box-shadow: var(--shadow-lg); border-color: transparent; }
.job-head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; cursor: pointer; }
.job-head .ji { width: 46px; height: 46px; border-radius: var(--radius-lg); background: var(--surface-brand-soft);
  color: var(--brand-primary); display: grid; place-items: center; flex: 0 0 auto; }
.job-head h3 { margin: 0; }
.job-head-text { flex: 1 1 auto; min-width: 0; }
.job-head .type { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
/* Prominent expand affordance */
.job-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; padding: 9px 9px 9px 16px;
  border-radius: var(--radius-pill); background: var(--surface-brand-soft); color: var(--brand-primary);
  font-family: var(--font-display); font-weight: 700; font-size: 13.5px; letter-spacing: -.01em;
  transition: background .2s var(--ease-out), color .2s, box-shadow .2s, transform .2s; }
.job-toggle-label { white-space: nowrap; }
.job-toggle .chev { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-primary); color: #fff;
  display: grid; place-items: center; flex: 0 0 auto; transition: transform .3s var(--ease-out); }
.job-head:hover .job-toggle { background: var(--brand-primary); color: #fff; box-shadow: var(--shadow-brand); transform: translateY(-1px); }
.job-head:hover .job-toggle .chev { background: rgba(255,255,255,.22); }
.job.open .job-toggle { background: var(--brand-primary); color: #fff; }
.job.open .job-toggle .chev { background: rgba(255,255,255,.22); transform: rotate(180deg); }
.job-body { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease-out); }
.job.open .job-body { max-height: 1200px; }
.job-body-inner { overflow: hidden; }
.job-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 4px 28px 28px; }
.job-col h4 { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--brand-secondary); margin: 0 0 12px; }
.job-col li { display: flex; gap: 9px; font-size: 14px; line-height: 1.5; color: var(--text-body); margin-bottom: 9px; }
.job-col li svg { flex: 0 0 auto; margin-top: 3px; color: var(--brand-primary); }

/* ---------- Split panels ---------- */
.panel { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-2xl); padding: clamp(28px, 4vw, 44px); }
.panel h3 { margin: 0 0 14px; }
.list-check li { display: flex; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--text-body); margin-bottom: 12px; }
.list-check li svg { flex: 0 0 auto; margin-top: 3px; color: var(--brand-primary); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--navy-700); border-radius: var(--radius-2xl);
  padding: clamp(40px, 6vw, 64px); }
.cta-band .glow { position: absolute; top: -120px; right: -80px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,59,54,.30), transparent 62%); pointer-events: none; }
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: var(--navy-200); position: relative; margin-top: 14px; max-width: 540px; }

/* ---------- Contact ---------- */
.contact-card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-2xl);
  padding: clamp(32px, 5vw, 56px); text-align: center; }
.mail-pill { display: inline-flex; align-items: center; gap: 12px; background: var(--surface-page);
  border: 1px solid var(--border-default); border-radius: var(--radius-pill); padding: 14px 24px;
  font-family: var(--font-mono); font-size: clamp(14px, 2vw, 17px); color: var(--brand-secondary); text-decoration: none; transition: all .2s; margin-top: 8px; }
.mail-pill:hover { border-color: var(--brand-primary); color: var(--brand-primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Footer ---------- */
.footer { margin-top: auto; background: var(--surface-card); border-top: 1px solid var(--border-subtle); padding: 56px 0 28px; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand .row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { width: 36px; height: 36px; }
.footer-brand b { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--text-strong); }
.footer-brand p { font-size: 13.5px; line-height: 1.7; color: var(--text-muted); margin: 0; }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav button { background: none; border: none; cursor: pointer; font-family: var(--font-display); font-weight: 600;
  font-size: 14px; color: var(--text-body); transition: color .15s; }
.footer-nav button:hover { color: var(--brand-primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px;
  padding-top: 22px; border-top: 1px solid var(--border-subtle); font-size: 12.5px; color: var(--text-subtle); }
.footer-bottom .mono { font-family: var(--font-mono); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .step .bar { display: none; }
  .job-cols { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
  .nav-links, .nav-right .lang, .nav-right .btn { display: none; }
  .burger { display: inline-flex; }
  .nav-right { gap: 8px; }
  .mobile-menu.show { display: block; position: fixed; inset: 72px 0 0; z-index: 99; background: var(--surface-page);
    padding: 24px; display: flex; flex-direction: column; gap: 6px; animation: mmIn .25s var(--ease-out); }
  @keyframes mmIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .mobile-menu button.m-link { text-align: left; background: none; border: none; padding: 14px 8px; font-family: var(--font-display);
    font-weight: 700; font-size: 19px; color: var(--text-strong); border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
  .mobile-menu .m-foot { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .value-row { gap: 14px; }
  .section-head .lead { font-size: 1rem; }
  .job-head { padding: 18px 16px; gap: 12px; }
  .job-toggle { padding: 8px; }
  .job-toggle-label { display: none; }
  .job-cols { padding: 4px 18px 22px; }
}
