/* public/css/site.css - 設計 tokens、全站共用版型 (utility bar / header / footer) */

/* ---------- 字型:Inter(SIL OFL 1.1,授權檔見 public/fonts/Inter-LICENSE.txt) ---------- */
/* NOTE: 只收 latin 與 latin-ext(涵蓋英文、西班牙文與歐洲各國人名);中文使用系統字型 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/public/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/public/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-ink: #12171a;
  --color-ink-soft: #3d464b;
  --color-muted: #566067;
  --color-muted-light: #8a9296;
  --color-line: #d9dddb;
  --color-line-dark: #2b353a;
  --color-surface: #f5f6f4;
  --color-white: #fff;
  --color-accent: #a93534;
  --color-accent-dark: #7e2524;
  --color-on-dark: #e6e9e8;
  --color-on-dark-soft: #c9d0d2;
  --color-on-dark-muted: #b9c1c4;
  --color-on-dark-faint: #9aa4a8;

  --font-sans: "Inter", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC",
    "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;

  --container-max: 1264px;
  --container-pad: 32px;
  --radius: 2px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  color: var(--color-accent-dark);
}

:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--color-ink);
  color: var(--color-white);
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.btn {
  display: inline-block;
  padding: 13px 22px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.btn:hover {
  background: var(--color-accent-dark);
  color: var(--color-white);
}

/* ---------- 頁面轉場 (View Transitions) ---------- */
@view-transition {
  navigation: auto;
}

.site-header {
  view-transition-name: site-header;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.18s;
}

/* ---------- Utility bar ---------- */
.utility-bar {
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-size: 13px;
}

.utility-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.language-list a {
  color: var(--color-on-dark-muted);
  text-decoration: none;
}

.language-list a:hover,
.language-list a[aria-current="true"] {
  color: var(--color-white);
}

.language-list a[aria-current="true"] {
  font-weight: 600;
}

.utility-bar a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--color-white);
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-ink);
}

.brand img {
  display: block;
  width: 46px;
  height: 52px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-legal {
  font-size: 12px;
  color: var(--color-muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 15px;
  font-weight: 500;
}

.site-nav a {
  padding: 8px 0;
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--color-accent);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  padding: 10px 14px;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink);
  cursor: pointer;
}

@media (max-width: 1199px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav,
  .site-header .btn {
    display: none;
    width: 100%;
  }

  .site-header.is-open .site-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .site-header.is-open .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-line);
  }

  .site-header.is-open .btn {
    display: block;
    margin-bottom: 16px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  :root {
    --container-pad: 20px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-on-dark-soft);
}

.site-footer .footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  padding-top: 56px;
  padding-bottom: 40px;
}

.footer-brand {
  flex: 1 1 280px;
  min-width: 0;
}

.footer-brand-name {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-white);
}

.footer-address {
  margin: 0;
  font-size: 14px;
  font-style: normal;
  line-height: 1.7;
}

.footer-column {
  flex: 1 1 160px;
  font-size: 14px;
}

.footer-column h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column a {
  display: inline-block;
  padding: 4px 0;
  color: var(--color-on-dark-soft);
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--color-line-dark);
}

.footer-bottom .container {
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--color-on-dark-faint);
}

/* ---------- Cookie 告知橫幅 ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  background: var(--color-white);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -4px 16px rgba(18, 23, 26, 0.12);
}

.cookie-banner .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.cookie-banner p {
  flex: 1 1 320px;
  margin: 0;
  font-size: 15px;
}

.cookie-banner button {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none;
  }
}
