/* ==========================================================================
   A-KAS 官方網站 — 版型與元件樣式
   以純 CSS 重寫設計系統的 components/*.jsx，規則對照 readme.md。
   ========================================================================== */

/* hidden 屬性必須勝過元件自身的 display 宣告（如 .field{display:block}） */
[hidden] { display: none !important; }

/* ---------- 版面骨架 ---------- */
.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
  background: var(--surface-page);
}
.section--subtle { background: var(--surface-subtle); }
.section--dark   { background: var(--surface-inverse); color: var(--text-on-dark); }
.section--tight  { padding: var(--section-y-tight) 0; }

/* 長文區塊收窄 */
.measure { max-width: var(--container-narrow); }

/* ---------- Eyebrow（mono 全大寫 + 24×2 短線） ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--akas-sky-500);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
}
.section--dark .eyebrow,
.eyebrow--dark { color: var(--akas-sky-300); }

/* ---------- SectionHeading ---------- */
.section-heading { max-width: 640px; }
.section-heading h2 {
  margin-top: 16px;
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-heading);
  line-height: 1.25;
}
.section-heading .lead {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
}
.section--dark .section-heading h2 { color: var(--text-on-dark); }
.section--dark .section-heading .lead { color: var(--text-on-dark-muted); }

/* 標題列：左標題、右次要動作 */
.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  transition: var(--motion-hover);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { width: 18px; height: 18px; }

.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn--lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }

.btn--primary {
  background: var(--akas-blue-400);
  border-color: var(--akas-blue-400);
  color: #fff;
}
.btn--primary:hover {
  background: var(--akas-blue-500);
  border-color: var(--akas-blue-500);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn--secondary {
  background: var(--akas-sky-300);
  border-color: var(--akas-sky-300);
  color: var(--akas-ink-900);
}
.btn--secondary:hover {
  background: var(--akas-sky-400);
  border-color: var(--akas-sky-400);
  color: var(--akas-ink-900);
  box-shadow: 0 10px 24px rgba(149, 204, 221, 0.4);
}

.btn--outline {
  background: transparent;
  border-color: var(--akas-ink-300);
  color: var(--akas-ink-900);
}
.btn--outline:hover {
  background: var(--akas-ink-50);
  border-color: var(--akas-ink-900);
  color: var(--akas-ink-900);
}

.btn--inverse {
  background: #fff;
  border-color: #fff;
  color: var(--akas-ink-900);
}
.btn--inverse:hover {
  background: var(--akas-sky-100);
  border-color: var(--akas-sky-100);
  color: var(--akas-ink-900);
}

/* ---------- Card ---------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--akas-ink-100);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--motion-hover);
}
.card--interactive { cursor: pointer; }
.card--interactive:hover {
  border-color: var(--akas-sky-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card--flat { background: var(--akas-ink-50); border-color: transparent; box-shadow: none; }
.card--brand { background: var(--akas-sky-50); border-color: var(--akas-sky-200); box-shadow: none; }

/* ---------- StatBlock ---------- */
.stat__value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-display);
  line-height: 1.05;
  color: var(--akas-ink-900);
}
.stat__value .suffix { font-size: 24px; margin-left: 2px; color: var(--akas-sky-500); }
.stat__label {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat--dark .stat__value,
.stat--dark .stat__value .suffix { color: var(--akas-sky-300); }
.stat--dark .stat__label { color: var(--text-on-dark-muted); }

/* ---------- Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--akas-ink-600);
  background: #fff;
  border: 1px solid var(--akas-ink-200);
  border-radius: var(--radius-sm);
}

/* ---------- 45° 切角母題（每視窗最多一次） ---------- */
.chamfer {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}

/* ---------- 影像 ---------- */
img { max-width: 100%; }

/* Hero 影像：固定 420px 高，與原佔位框一致；切角母題套在此處 */
.hero__image {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
}

/* 區塊情境照：固定 300px 高，與原佔位框一致 */
.section-image {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-card);
}

/* ---------- 影像佔位 ---------- */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--akas-ink-800);
  border-radius: var(--radius-card);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
  padding: 24px;
}
.placeholder--light {
  background: var(--akas-sky-100);
  color: var(--akas-sky-600);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .wrap {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 22px; width: auto; display: block; }

.site-nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
}
.site-nav a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--akas-ink-500);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: var(--motion-hover);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--akas-ink-900);
  border-bottom-color: var(--akas-sky-300);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--akas-ink-200);
  border-radius: var(--radius-control);
  color: var(--akas-ink-900);
  cursor: pointer;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: var(--akas-ink-900);
  color: #fff;
  padding: 104px 0 96px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  margin-top: 24px;
  font-size: var(--fs-display-1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: #fff;
}
.hero__lead {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-on-dark-muted);
  max-width: 520px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

/* 可信度帶 */
.credential-band {
  background: var(--akas-ink-800);
  padding: 44px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.credential-band .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ==========================================================================
   內容區塊
   ========================================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
/* 聯絡區：左資訊、右表單。用 class 而非 inline style，媒體查詢才蓋得掉 */
.grid-2--contact { grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }

.service-card__icon { color: var(--akas-sky-500); display: block; }
.service-card__icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 20px; margin-top: 18px; }
.service-card__list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-card__list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
}
.service-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 1px;
  background: var(--akas-sky-300);
}

/* 流程：上緣天藍細線，不用卡片 */
.process-step {
  border-top: 2px solid var(--akas-sky-300);
  padding-top: 20px;
}
.process-step__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--akas-sky-500);
}
.process-step h3 { font-size: 18px; margin-top: 12px; }
.process-step p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* 理念引言 */
.pullquote {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.7;
  font-weight: var(--fw-semibold);
  color: #fff;
}
.pullquote__source {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--akas-sky-300);
}

/* CTA 色帶 */
.cta-band { background: var(--akas-sky-300); padding: 72px 0; }
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta-band h2 { font-size: 34px; color: var(--akas-ink-900); }
.cta-band p { margin-top: 12px; font-size: 17px; color: var(--akas-ink-700); }

/* ==========================================================================
   內頁頁首
   ========================================================================== */
.page-hero {
  background: var(--akas-ink-900);
  color: #fff;
  padding: 88px 0 72px;
}
.page-hero h1 {
  margin-top: 20px;
  font-size: var(--fs-display-2);
  line-height: 1.12;
  letter-spacing: var(--ls-display);
  color: #fff;
}
.page-hero p {
  margin-top: 24px;
  max-width: var(--container-narrow);
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-on-dark-muted);
}

/* 文件清單 */
.doc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.doc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--akas-ink-100);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: var(--motion-hover);
}
.doc-item:hover {
  border-color: var(--akas-sky-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.doc-item svg { width: 20px; height: 20px; color: var(--akas-sky-500); flex-shrink: 0; }
.doc-item > span { display: block; min-width: 0; }
.doc-item__name {
  display: block;
  font-size: 15px;
  font-weight: var(--fw-medium);
  color: var(--akas-ink-900);
  line-height: 1.6;
}
.doc-item__meta {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 900px) {
  .doc-list { grid-template-columns: 1fr; }
  .page-hero { padding: 64px 0 56px; }
}

/* ==========================================================================
   表單
   ========================================================================== */
.field { display: block; }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  font-family: var(--font-display);
  color: var(--akas-ink-700);
}
.field__label .req { color: var(--akas-danger); margin-left: 4px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-strong);
  background: #fff;
  border: 1px solid var(--akas-ink-200);
  border-radius: var(--radius-control);
  outline: none;
  transition: var(--motion-hover);
}
.field textarea {
  height: auto;
  padding: 12px 14px;
  line-height: 1.6;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--akas-blue-400);
  box-shadow: var(--ring-focus);
}
.field__hint { display: block; margin-top: 6px; font-size: 13px; color: var(--text-muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid--full { grid-column: 1 / -1; }

/* 身分切換（Radio 橫排） */
.role-switch { display: flex; gap: 24px; }
.role-switch label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text-body);
  cursor: pointer;
}
.role-switch input[type="radio"] { accent-color: var(--akas-blue-400); width: 18px; height: 18px; }

.divider { height: 1px; background: var(--border-subtle); margin: 24px 0; }

/* 聯絡資訊列 */
.contact-list { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.contact-list__item { display: flex; gap: 14px; align-items: flex-start; }
.contact-list__item svg { width: 20px; height: 20px; color: var(--akas-sky-500); flex-shrink: 0; margin-top: 4px; }
.contact-list__item span { font-size: 15.5px; color: var(--text-body); }

/* 求職安全宣告 */
.safety-notice {
  margin-top: 32px;
  padding: 20px 22px;
  background: var(--akas-sky-50);
  border: 1px solid var(--akas-sky-200);
  border-radius: var(--radius-card);
}
.safety-notice h3 {
  font-size: 15px;
  font-family: var(--font-display);
  color: var(--akas-ink-900);
}
.safety-notice p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--akas-ink-600);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--akas-ink-900);
  color: #fff;
  padding: 72px 0 32px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
}
.site-footer__logo img { height: 24px; width: auto; display: block; }
.site-footer__blurb {
  margin-top: 20px;
  color: var(--text-on-dark-muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 300px;
}
.footer-col__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--akas-sky-300);
  margin-bottom: 16px;
}
.footer-col__links { display: flex; flex-direction: column; gap: 10px; }
.footer-col__links a {
  color: var(--text-on-dark-muted);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  transition: var(--motion-hover);
}
.footer-col__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-col__links a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  vertical-align: baseline;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.6;
}

.site-footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
}
.site-footer__social { display: flex; gap: 16px; }
.site-footer__social a { color: rgba(255, 255, 255, 0.55); display: inline-flex; }
.site-footer__social a:hover { color: #fff; }
.site-footer__social svg { width: 18px; height: 18px; }

/* ==========================================================================
   進場動畫（淡入 + 上移 12px）
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   響應式
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .hero__grid { gap: 40px; }
}

@media (max-width: 900px) {
  :root { --section-y: var(--space-8); --section-y-tight: var(--space-8); }

  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    padding: 8px var(--gutter) 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 16px;
  }
  .site-nav a:hover,
  .site-nav a[aria-current="page"] { border-bottom-color: var(--border-subtle); }
  .nav-toggle { display: inline-flex; }
  .site-header .wrap { position: relative; }
  .site-header__cta { display: none; }

  .hero { padding: 72px 0 64px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  /* 窄螢幕降低影像高度，避免佔掉整個首屏 */
  .hero__image { height: 280px; }
  .section-image { height: 240px; }

  .credential-band .wrap { grid-template-columns: 1fr; gap: 28px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .grid-2--contact { grid-template-columns: 1fr; gap: 40px; }

  .heading-row { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .cta-band h2 { font-size: 28px; }

  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .pullquote { font-size: 24px; }
  .stat__value { font-size: 40px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}
