/* =========================================================
   SAKILU / 巨吉有限公司 — company site styles
   ========================================================= */

:root {
  --bg:            #070b16;
  --bg-alt:        #0b1120;
  --surface:       rgba(255, 255, 255, .035);
  --surface-solid: #101827;
  --border:        rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);

  --text:          #e9edf7;
  --text-muted:    #9aa6bf;
  --text-dim:      #6f7c96;

  --accent:        #38bdf8;
  --accent-2:      #6366f1;
  --accent-soft:   rgba(56, 189, 248, .12);

  --radius:        18px;
  --radius-sm:     12px;
  --maxw:          1160px;
  --header-h:      72px;

  --font-sans: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", "PingFang TC",
               "Microsoft JhengHei", sans-serif;
  --font-display: "Sora", "Noto Sans TC", system-ui, sans-serif;

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 200;
  background: var(--accent); color: #06131f;
  padding: 10px 18px; border-radius: 0 0 10px 10px; font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 11, 22, .82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display); font-size: 1.06rem;
  font-weight: 800; letter-spacing: .14em;
}
.brand-text em {
  font-style: normal; font-size: .72rem; color: var(--text-dim); letter-spacing: .06em;
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 9px 14px; border-radius: 999px;
  font-size: .9rem; color: var(--text-muted); font-weight: 500;
  transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }

.lang-toggle {
  margin-left: 8px; padding: 7px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; color: var(--text-muted);
  font: 700 .74rem/1 var(--font-display); letter-spacing: .1em;
  cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.lang-toggle:hover { color: var(--accent); border-color: var(--accent); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 11px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; margin-inline: auto;
  background: var(--text); border-radius: 2px;
  transition: transform .28s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 92px) 0 88px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
}
.orb-a {
  width: 620px; height: 620px; top: -220px; left: -140px;
  background: radial-gradient(circle, rgba(56,189,248,.55), transparent 68%);
}
.orb-b {
  width: 560px; height: 560px; top: 40px; right: -180px;
  background: radial-gradient(circle, rgba(99,102,241,.5), transparent 68%);
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 20%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 20%, #000 20%, transparent 78%);
}

.eyebrow {
  margin: 0 0 18px;
  font: 600 .78rem/1.6 var(--font-display);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.2rem, 6.2vw, 4.1rem);
  font-weight: 800;
  margin-bottom: 26px;
  max-width: 18ch;
}
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 70%, #a78bfa);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.lede {
  max-width: 62ch; margin: 0 0 36px;
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: var(--text-muted);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 68px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--font-sans); cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #06131f; font-weight: 700;
  box-shadow: 0 12px 34px -12px rgba(56, 189, 248, .7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -14px rgba(56, 189, 248, .85); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-block { width: 100%; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 14px; margin: 0;
}
.hero-stats > div {
  flex: 1 1 168px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.hero-stats dt {
  font-size: .78rem; color: var(--text-dim); letter-spacing: .06em; margin-bottom: 6px;
}
.hero-stats dd {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: 2rem; line-height: 1.1;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats dd small { font-size: 1.1rem; }
.hero-stats dd.dd-text { font-size: 1.3rem; }

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */
.section { padding: 104px 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-alt::before, .section-alt::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.section-alt::before { top: 0; }
.section-alt::after { bottom: 0; }

.section-head { max-width: 62ch; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 16px; }
.section-sub { margin: 0; color: var(--text-muted); font-size: 1rem; }

/* Cards */
.cards {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(292px, 1fr));
}
.card {
  position: relative;
  padding: 32px 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
  overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: rgba(255,255,255,.055); }
.card:hover::after { transform: scaleX(1); }

.card-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 20px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(56,189,248,.22);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.16rem; margin-bottom: 12px; }
.card p { margin: 0 0 20px; color: var(--text-muted); font-size: .94rem; }
.card .code {
  font: 600 .7rem/1 var(--font-display); letter-spacing: .1em;
  color: var(--text-dim);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px;
  display: inline-block;
}

/* Steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(186px, 1fr));
  counter-reset: step;
}
.step {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  transition: border-color .3s, transform .3s var(--ease);
}
.step:hover { border-color: var(--accent); transform: translateY(-4px); }
.step-no {
  display: block; margin-bottom: 14px;
  font: 800 1.5rem/1 var(--font-display);
  background: linear-gradient(160deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { font-size: 1.04rem; margin-bottom: 10px; }
.step p { margin: 0; font-size: .89rem; color: var(--text-muted); }

/* About */
.about-grid {
  display: grid; gap: 44px;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}
.about-copy h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 20px; }
.about-copy p { color: var(--text-muted); margin: 0 0 18px; }

.value-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.value-list li {
  padding-left: 22px; position: relative;
}
.value-list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.value-list strong { display: block; font-size: .98rem; margin-bottom: 2px; }
.value-list span { color: var(--text-muted); font-size: .9rem; }

.about-panel {
  padding: 34px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(56,189,248,.09), rgba(99,102,241,.05));
  box-shadow: var(--shadow);
  position: sticky; top: calc(var(--header-h) + 24px);
}
.about-panel h3 { font-size: 1.1rem; margin-bottom: 20px; }
.about-panel ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 13px; }
.about-panel li {
  position: relative; padding-left: 27px;
  font-size: .92rem; color: var(--text-muted);
}
.about-panel li::before {
  content: "→"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}

/* Profile */
.profile-wrap {
  display: grid; gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.profile-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-table tr + tr { border-top: 1px solid var(--border); }
.profile-table th, .profile-table td {
  padding: 15px 22px; text-align: left; font-size: .92rem; vertical-align: top;
}
.profile-table th {
  width: 40%; color: var(--text-dim); font-weight: 500; white-space: nowrap;
}
.profile-table td { color: var(--text); font-weight: 500; }

.pill {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: rgba(52, 211, 153, .13);
  border: 1px solid rgba(52, 211, 153, .3);
  color: #6ee7b7; font-size: .8rem; font-weight: 600;
}

.scope-box {
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.scope-box h3 { font-size: 1.06rem; margin-bottom: 20px; }
.scope-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 11px; }
.scope-list li { display: flex; gap: 13px; align-items: baseline; font-size: .9rem; }
.scope-list code {
  flex: none; min-width: 76px;
  font: 600 .74rem/1.9 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: .04em; color: var(--accent);
  background: var(--accent-soft); border-radius: 6px;
  padding: 2px 8px; text-align: center;
}
.scope-list span { color: var(--text-muted); }
.scope-note { margin: 0; font-size: .85rem; }
.scope-note a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.scope-note a:hover { border-bottom-color: var(--accent); }

/* Contact */
.contact-grid {
  display: grid; gap: 34px;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: start;
}
.contact-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-item:first-child { padding-top: 0; }
.contact-label {
  display: block; font-size: .76rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 7px;
  font-family: var(--font-display); font-weight: 600;
}
.contact-item a { color: var(--accent); font-weight: 600; word-break: break-all; }
.contact-item a:hover { text-decoration: underline; }
.contact-item p { margin: 0; font-size: .96rem; }

.contact-form {
  padding: 34px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid; gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: .86rem; color: var(--text-muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: 400 .95rem/1.6 var(--font-sans);
  transition: border-color .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 116px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: rgba(0, 0, 0, .42); outline: none;
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #f87171; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa6bf' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  padding-right: 40px;
}
.field select option { background: var(--surface-solid); color: var(--text); }
.form-note { margin: 0; font-size: .8rem; color: var(--text-dim); text-align: center; }

/* Footer */
.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}
.footer-inner { display: grid; gap: 18px; justify-items: center; text-align: center; }
.footer-brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; justify-content: center; }
.footer-brand strong { font-family: var(--font-display); letter-spacing: .16em; font-size: 1.02rem; }
.footer-brand span { color: var(--text-dim); font-size: .88rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; }
.footer-nav a { font-size: .88rem; color: var(--text-muted); transition: color .2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-meta, .copyright { margin: 0; font-size: .8rem; color: var(--text-dim); }

/* ---------------------------------------------------------
   Reveal animation
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 960px) {
  .about-grid, .profile-wrap, .contact-grid { grid-template-columns: 1fr; }
  .about-panel { position: static; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 16px 24px 26px;
    background: rgba(7, 11, 22, .97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-14px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .site-nav.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .site-nav a { padding: 13px 8px; border-radius: var(--radius-sm); font-size: .98rem; }
  .lang-toggle { margin: 10px 0 0; align-self: flex-start; }

  .hero { padding: calc(var(--header-h) + 62px) 0 76px; }
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 40px; }
  .hero-cta { margin-bottom: 48px; }
  .contact-form { padding: 28px 22px; }
}

@media (max-width: 520px) {
  .container { padding-inline: 18px; }
  .hero-stats > div { flex-basis: 100%; }
  .btn { width: 100%; }
  .profile-table th, .profile-table td { padding: 13px 16px; font-size: .87rem; }
  .profile-table th { width: 44%; white-space: normal; }
  .scope-list li { flex-direction: column; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Light-mode readers get the same dark brand surface intentionally;
   the palette is committed and painted explicitly above. */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .hero-bg, .contact-form, .nav-toggle { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
