/* ==========================================================================
   HNC International — Dark v2
   Static stylesheet. Design tokens first, then layout by section.
   ========================================================================== */

:root {
  --bg:            #060606;
  --panel:         #0A0A0A;
  --line:          #1C1A18;
  --line-2:        #221F1C;
  --line-3:        #2A2724;
  --ink:           #F2EFE9;
  --ink-soft:      #C6BFB4;
  --ink-mute:      #9C948A;
  --ink-dim:       #8E877C;
  /* 原設計是 #5D5750，但它唯一的兩個用途（.card-meta / .footer-copy）都是 11px，
     算小字，WCAG AA 要求 4.5:1 —— 那個值只有 2.8，兩處都不合格。這裡等比拉亮
     RGB、保留原本的暖灰色相：對 --bg 4.79、對 --panel 4.68，兩個底都過。
     上限是 --ink-dim（相對亮度 0.245）：faint 是 0.198，階層沒有翻轉。 */
  --ink-faint:     #827A70;
  --accent:        #F0A93B;
  --accent-hi:     #FFD08A;

  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(18px, 4vw, 60px);
  --section-y: clamp(34px, 6vw, 90px);
  --maxw: 1440px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
button { font: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

.accent { color: var(--accent); }

/* Shared: small uppercase mono label ------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Shared: solid amber call-to-action ------------------------------------- */
.btn-primary {
  margin-top: 24px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px 18px;
  transition: background 0.18s ease;
}
.btn-primary:hover { background: var(--ink); color: var(--bg); }

/* Shared: image zoom trigger --------------------------------------------- */
.zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(242, 239, 233, 0.3);
  background: rgba(6, 6, 6, 0.55);
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.zoom:hover { border-color: var(--accent); color: var(--accent); }

/* Shared: media fills its box ------------------------------------------- */
.hero-media picture { display: block; width: 100%; height: 100%; }

.hero-media img,
.cap-media img,
.gala-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: relative;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: baseline; gap: 12px; }

/* The wordmark is two tiers at every width: "HNC" is the mark and carries the
   size, "International" sits beside it as a smaller qualifier. Only the numbers
   change across breakpoints. */
.brand-name {
  font-size: clamp(28px, 2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-hnc,
.brand-intl { display: inline-block; }

.brand-hnc { margin-right: 2px; }

.brand-intl {
  font-size: clamp(11px, 0.85vw, 12px);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.brand-city {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

@media (max-width: 899px) {
  .brand { gap: 9px; }
  .brand-name { font-size: 30px; letter-spacing: -0.035em; }
  .brand-intl { font-size: 12px; }
  .brand-city { font-size: 9px; letter-spacing: 0.18em; }
}

@media (max-width: 359px) {
  .brand-name { font-size: 26px; }
  .brand-intl { font-size: 11px; }
  .brand-city { display: none; }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: clamp(16px, 2vw, 32px);
}

.nav-link {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 10px 0;
}
.nav-link:hover { color: var(--accent); }

.nav-phone {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-3);
  padding: 12px 18px;
  color: var(--ink);
  white-space: nowrap;
}
.nav-phone:hover { border-color: var(--accent); color: var(--accent); }

.menu-toggle {
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
}
.menu-toggle span:last-child { width: 12px; background: var(--accent); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  padding: 6px var(--gutter) 18px;
  flex-direction: column;
}
.site-header.is-open .nav-mobile { display: flex; }

.nav-mobile-link {
  display: block;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  padding: 16px 0;
}
.nav-mobile-link:hover { color: var(--accent); }

.nav-mobile-phone {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 16px 0 0;
}

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .site-header.is-open .nav-mobile { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: clamp(520px, 80vh, 860px);
  display: flex;
  align-items: flex-end;
  background: var(--bg);
}

.hero-media { position: absolute; inset: 0; }

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(6, 6, 6, 0.82) 0%,
    rgba(6, 6, 6, 0.25) 38%,
    rgba(6, 6, 6, 0.95) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 14vh, 180px) var(--gutter) clamp(28px, 5vh, 64px);
  pointer-events: none;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  background: rgba(6, 6, 6, 0.82);
  padding: 9px 16px 9px 12px;
}
.eyebrow-rule { width: 40px; height: 2px; background: var(--accent); flex: none; }
.eyebrow-badge .eyebrow { letter-spacing: 0.28em; font-size: 11px; text-wrap: pretty; }

.hero-title {
  font-size: clamp(40px, 7.6vw, 116px);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  max-width: 16em;
  text-transform: uppercase;
  text-wrap: pretty;
}

.hero-lede {
  font-size: clamp(15px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 38em;
  text-wrap: pretty;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section--bordered { border-bottom: 1px solid var(--line); }
.section--panel { background: var(--panel); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: clamp(22px, 3vw, 44px);
}

.section-title {
  font-size: clamp(26px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
  text-wrap: pretty;
}
.section-title--spaced { margin: 16px 0 clamp(22px, 3vw, 44px); }

.section-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* Capability cards ------------------------------------------------------- */

.cap-rows { display: flex; flex-direction: column; gap: clamp(14px, 2vw, 26px); }
.cap-row  { display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 26px); }

/* One card per row below the desktop breakpoint; the min-width: 900px rule below
   turns each .cap-row into equal columns (three in the first row, two in the
   second). Sizing off a min() basis instead left a dead band just above 900px
   where three cards did not fit and the third dropped to its own row. */
.cap-card {
  flex: 1 1 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

@media (min-width: 900px) {
  .cap-card { flex-basis: 0; }
}

.cap-media { position: relative; height: clamp(200px, 22vw, 280px); }
.cap-media--tall { height: clamp(220px, 26vw, 340px); }

.cap-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 6, 6, 0.15) 40%, rgba(10, 10, 10, 0.95) 100%);
  pointer-events: none;
}

.cap-num {
  position: absolute;
  left: 20px;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  pointer-events: none;
}

.cap-body { padding: 22px clamp(18px, 2vw, 26px) 26px; }
.cap-body h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.cap-body p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-mute);
  margin: 0;
  text-wrap: pretty;
}

/* End-to-end solutions -------------------------------------------------- */

.solutions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.solutions-title {
  font-size: clamp(26px, 3.8vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 16px 0 18px;
  text-transform: uppercase;
  text-wrap: pretty;
}

.solutions-lede {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.6;
  color: var(--ink-mute);
  margin: 0 0 22px;
  max-width: 38em;
  text-wrap: pretty;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border: 1px solid var(--line-2);
  padding: 9px 13px;
}

.gala-media { position: relative; height: clamp(200px, 26vw, 340px); }

.solutions-right { display: flex; flex-direction: column; }

.row-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  border-top: 1px solid var(--line-2);
  padding: 18px 0;
}
.row-item--last { border-bottom: 1px solid var(--line-2); }

.row-key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 4px;
}

.row-item h3 { font-size: 17px; font-weight: 700; margin: 0 0 5px; }
.row-item p  { font-size: 14px; line-height: 1.6; color: var(--ink-mute); margin: 0; }

/* Advantages ------------------------------------------------------------ */

.adv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  counter-reset: adv;
}

@media (min-width: 900px) {
  .adv-grid { grid-template-columns: repeat(3, 1fr); }
}

.adv-card { background: var(--panel); padding: clamp(22px, 3vw, 36px); }

/* 巨大的幽靈編號。--line-2 對 --panel 的對比是 1.2 —— 原設計就是要它幾乎融進背景，
   所以無法靠調色通過 WCAG。編號本身是純裝飾（真正的內容在 <h3> 裡），因此改由 CSS
   counter 生成而不是寫在 DOM 裡：語意上正確，順帶也讓對比檢查不再套用（那條規則只
   檢查有文字節點的元素）。decimal-leading-zero 就是原本手寫的 01 / 02 / 03。 */
.adv-num {
  font-family: var(--mono);
  font-size: clamp(44px, 6vw, 80px);
  line-height: 0.9;
  color: var(--line-2);
  margin-bottom: 16px;
}
.adv-num::before {
  counter-increment: adv;
  content: counter(adv, decimal-leading-zero);
}

.adv-card h3 {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.adv-card p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-mute);
  margin: 0;
  text-wrap: pretty;
}

/* ==========================================================================
   404
   ========================================================================== */

/* 讓整頁在視窗高度不足時仍把 footer 壓在底部，內容區居中 */
.err {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 260px);
}

.err-inner { width: 100%; }

.err-title {
  font-size: clamp(44px, 9vw, 132px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 14px 0 20px;
}

.err-lede {
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-mute);
  max-width: 34em;
  margin: 0;
  text-wrap: pretty;
}

.err-btn { max-width: 320px; }

.err-footer { margin-top: 0; }

/* brand 在 404 頁是回首頁的連結，但視覺上要跟首頁的非連結版一模一樣 */
.brand--link {
  text-decoration: none;
  color: inherit;
}
.brand--link:hover .brand-hnc { color: var(--accent); }

/* ==========================================================================
   Footer / contact
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.site-footer .container {
  padding: clamp(38px, 7vw, 110px) var(--gutter) clamp(26px, 4vw, 56px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(26px, 4vw, 72px);
  align-items: start;
}

.contact-title {
  font-size: clamp(32px, 5.6vw, 80px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 16px 0 20px;
  text-transform: uppercase;
  text-wrap: pretty;
}

.contact-lede {
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-mute);
  margin: 0 0 28px;
  max-width: 34em;
  text-wrap: pretty;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--line-2);
  padding-top: 24px;
}

.contact-phone {
  font-size: clamp(26px, 3.6vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  white-space: nowrap;
}

.contact-mail {
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  white-space: nowrap;
}

.contact-hours {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-dim);
  margin: 18px 0 0;
}

.contact-card {
  border: 1px solid var(--line-2);
  padding: clamp(22px, 3vw, 40px);
  background: var(--bg);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.card-head h3 {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0;
}
.card-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.card-lede {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-mute);
  margin: 0 0 22px;
  max-width: 32em;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  border-top: 1px solid var(--line-2);
  padding: 16px 0;
}
.checklist-last { border-bottom: 1px solid var(--line-2); }
.check-num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.check-txt { font-size: 15.5px; line-height: 1.45; color: var(--ink); }

.footer-bottom {
  margin-top: clamp(34px, 5vw, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  align-items: baseline;
  justify-content: space-between;
}

.footer-brand {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.footer-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin: 0;
  max-width: 34em;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ==========================================================================
   Back to top + lightbox
   ========================================================================== */

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 45;
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
}
.to-top:hover { background: var(--ink); }
.to-top.is-visible { display: flex; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 4, 4, 0.96);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 4vw, 60px);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }

.lightbox-figure { width: 100%; display: flex; justify-content: center; }
.lightbox-figure img {
  max-width: 1200px;
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}

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