/* ============================================================
   聯繫我們 standalone page
   ============================================================ */

@property --sweep-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: -90deg;
}

@keyframes silverBorderSweep {
  from { --sweep-angle: -90deg; }
  to   { --sweep-angle: 270deg; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18%      { transform: translateX(-6px); }
  36%      { transform: translateX(6px); }
  54%      { transform: translateX(-4px); }
  72%      { transform: translateX(4px); }
}
.field-shake {
  animation: shake 0.42s ease;
  border-color: rgba(220, 60, 60, 0.55) !important;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #f2f2f4;
  color: #000;
}

body {
  min-height: 100vh;
  background: #f2f2f4;
}

/* ── Navbar ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 50;
  transition: background 0.2s ease;
}

#nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.nav-logo-link:hover { transform: scale(1.08); }

#nav-logo img {
  width: 32px;
  height: auto;
  filter: brightness(0);
  display: block;
}

.nav-logo-sep {
  font-size: 13px;
  color: rgba(0,0,0,0.25);
  font-weight: 300;
}

.nav-logo-product {
  font-size: 14px;
  font-weight: 500;
  color: rgba(0,0,0,0.72);
  letter-spacing: 0.01em;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  height: 100%;
  align-items: stretch;
}

.nav-links a {
  text-decoration: none;
  color: #000;
  font-size: 14px;
  letter-spacing: 0.03em;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}
.nav-links > a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links a:hover { opacity: 1; }

.nav-lang {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.lang-pill {
  height: 28px;
  padding: 0 14px;
  border-radius: 100px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #ffffff;
  color: rgba(0,0,0,0.65);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.04);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.lang-pill:hover {
  background: #f5f5f7;
  border-color: rgba(0,0,0,0.22);
  color: #000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.06);
}

/* ── Contact page ── */
.contact-page {
  min-height: 100vh;
  padding: 140px 24px 120px;
  background: #f2f2f4;
}

.contact-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.contact-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.32);
  margin-bottom: 28px;
}

.contact-headline {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: #000;
  margin-bottom: 20px;
}

.contact-subtext {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(0,0,0,0.48);
  margin-bottom: 52px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.contact-item-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.28);
}

.contact-item-value {
  font-size: 15px;
  color: rgba(0,0,0,0.72);
  text-decoration: none;
  transition: color 0.18s ease;
}

a.contact-item-value:hover { color: #000; }

/* Form card — glass */
.contact-form {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  padding: 44px 44px 48px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 8px rgba(0,0,0,0.04),
    0 8px 24px rgba(0,0,0,0.06),
    0 24px 56px rgba(0,0,0,0.08);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group:last-of-type {
  margin-bottom: 28px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(0,0,0,0.45);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
  resize: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(0,0,0,0.25);
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(0,0,0,0.28);
  background: #fff;
}

/* Custom select */
.custom-select { position: relative; }

.custom-select-trigger {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.18s ease, background 0.18s ease;
  user-select: none;
}

.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger {
  border-color: rgba(0,0,0,0.28);
}

.custom-select-text { flex: 1; }
.custom-select-text.placeholder { color: rgba(0,0,0,0.25); }

.custom-select-chevron {
  flex-shrink: 0;
  color: rgba(0,0,0,0.3);
  transition: transform 0.22s ease;
}

.custom-select.open .custom-select-chevron { transform: rotate(180deg); }

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(242,242,244,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.05);
  z-index: 30;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-select.open .custom-select-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-option {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(0,0,0,0.65);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-select-option:hover {
  background: rgba(255,255,255,0.7);
  color: #000;
}

.custom-select-option.selected { color: #000; font-weight: 500; }
.custom-select-option[data-value=""] { color: rgba(0,0,0,0.28); }

/* ── Product selector (trial topic only) ── */
#form-group-product {
  display: none;
}

#form-group-product.is-visible {
  display: flex;
  animation: fadeSlideDown 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-chip {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: rgba(0,0,0,0.6);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.product-chip:hover {
  border-color: rgba(0,0,0,0.28);
  color: #000;
}

.product-chip.is-selected {
  background: #000;
  color: #fff;
  border-color: #000;
}

.product-chip--disabled {
  opacity: 0.32;
  cursor: default;
  pointer-events: none;
}

.product-chip-tag {
  font-size: 11px;
  opacity: 0.7;
}

.product-chips.field-shake {
  animation: shake 0.42s ease;
}

.form-textarea {
  height: 130px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: #000;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  letter-spacing: 0.02em;
  position: relative;
  transition: background 0.22s ease, transform 0.22s ease;
}

.btn-submit:hover {
  background: #2a2a2a;
  transform: scale(1.04);
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 100px;
  padding: 3px;
  background: conic-gradient(
    from var(--sweep-angle),
    transparent 0deg,
    transparent 225deg,
    rgba(195, 222, 248, 0.18) 232deg,
    rgba(215, 235, 255, 0.58) 248deg,
    rgba(232, 244, 255, 0.92) 262deg,
    rgba(248, 253, 255, 1.0)  270deg,
    rgba(232, 244, 255, 0.92) 278deg,
    rgba(215, 235, 255, 0.58) 292deg,
    rgba(195, 222, 248, 0.18) 308deg,
    transparent 315deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  --sweep-angle: -90deg;
}

.btn-submit:hover::before {
  opacity: 1;
  animation: silverBorderSweep 3.6s linear infinite;
}

.form-success {
  margin-top: 28px;
  text-align: center;
  font-size: 14px;
  color: rgba(0,0,0,0.55);
  letter-spacing: 0.02em;
}

/* ── Navbar: dropdown (desktop) ─────────────────────────── */
.nav-dropdown { position: relative; display: flex; align-items: center; height: 100%; }

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: #000;
  opacity: 0.65;
  padding: 0;
  transition: opacity 0.2s;
}
.nav-dropdown-trigger:hover { opacity: 1; }

.nav-dd-chevron {
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-dd-chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 6px;
  min-width: 160px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 18px;
}

.nav-dd-item {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(0,0,0,0.72);
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
a.nav-dd-item:hover { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.9); }
.nav-dd-item--dim { color: rgba(0,0,0,0.28); cursor: default; }
.nav-dd-item--dim:hover { background: none; }

/* Active: navbar-bottom indicator bar */
.nav-links a.is-active,
.nav-dropdown-trigger.is-active {
  opacity: 1 !important;
  text-decoration: none !important;
}
.nav-links > a.is-active::after,
.nav-dropdown.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0,0,0,0.85);
  border-radius: 1px;
}
/* Active: sub-item gets dark-blue dot */
a.nav-dd-item.is-active { color: rgba(0,0,0,0.85); }
a.nav-dd-item.is-active::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a54d8;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ── Mobile nav: accordion ───────────────────────────────── */
.mobile-nav-group { display: flex; flex-direction: column; }

.mobile-nav-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: #000;
  opacity: 0.75;
  text-align: left;
  position: relative;
  transition: opacity 0.15s;
}
.mobile-nav-group-btn:hover { opacity: 1; }

.mobile-nav-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  opacity: 0.4;
}
.mobile-nav-group.is-open .mobile-nav-chevron { transform: rotate(180deg); }

.mobile-nav-sub {
  height: 0;
  overflow: hidden;
  transition: height 0.28s cubic-bezier(0.4,0,0.2,1);
}

.mobile-nav-sub-link {
  display: block;
  padding: 9px 24px 9px 44px;
  font-size: 14px;
  color: rgba(0,0,0,0.7);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}
a.mobile-nav-sub-link:hover { opacity: 1; }
.mobile-nav-sub-link--dim { color: rgba(0,0,0,0.3); cursor: default; }

/* Mobile active */
.mobile-nav-link.is-active,
.mobile-nav-group.is-active > .mobile-nav-group-btn {
  opacity: 1;
  font-weight: 600;
}
.mobile-nav-link.is-active::before,
.mobile-nav-group.is-active > .mobile-nav-group-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5px;
  height: 16px;
  background: rgba(0,0,0,0.85);
  border-radius: 0 2px 2px 0;
}
a.mobile-nav-sub-link.is-active { opacity: 1; font-weight: 600; color: rgba(0,0,0,0.85); }
a.mobile-nav-sub-link.is-active::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1a54d8;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* ── Footer ── */
.footer {
  background: #0a0a0a;
  padding: 64px 40px 52px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0 60px;
  align-items: start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.footer-logo img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.footer-logo-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.01em;
}
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  line-height: 1.5;
  margin: 0;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin: 0;
}
.footer-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.48);
  text-decoration: none;
  transition: color 0.18s ease;
}
.footer-col-links a:hover { color: rgba(255,255,255,0.9); }
.footer-link-dim {
  font-size: 13px;
  color: rgba(255,255,255,0.22);
}

/* ── Mobile hamburger menu ── */
.nav-menu-btn { display: none; margin-left: 8px; }

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
  z-index: 49;
  flex-direction: column;
  padding: 8px 0 12px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.mobile-nav.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav-link {
  display: block;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  letter-spacing: 0.01em;
  opacity: 0.75;
  position: relative;
  transition: opacity 0.15s ease;
}
.mobile-nav-link:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-page {
    padding: 110px 20px 80px;
  }

  .contact-form {
    padding: 32px 24px 36px;
    background: rgba(255, 255, 255, 0.75);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer { padding: 48px 24px 44px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-links    { display: none !important; }
  .nav-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .mobile-nav   { display: flex; }
  #navbar       { padding: 0 20px; }
}

/* ── Footer: col toggle button ── */
.footer-col-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: default;
  pointer-events: none;
  text-align: left;
}

.footer-col-chevron {
  display: none;
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

/* ── Footer bottom (copyright) ── */
.footer-bottom {
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 20px 40px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom .footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .lang-pill {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 8px rgba(0,0,0,0.06);
  }

  /* Footer accordion on mobile */
  .footer-inner { grid-template-columns: 1fr !important; gap: 0 !important; }
  .footer-brand { padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); grid-column: auto !important; }
  .footer-col { border-top: 1px solid rgba(255,255,255,0.08); gap: 0; }
  .footer-col-toggle { cursor: pointer; pointer-events: auto; padding: 14px 0; }
  .footer-col-chevron { display: block; }
  .footer-col.is-open .footer-col-chevron { transform: rotate(180deg); }
  .footer-col-links { height: 0; overflow: hidden; transition: height 0.28s cubic-bezier(0.4,0,0.2,1); margin: 0; }
  .footer-col.is-open .footer-col-links { padding-bottom: 16px; }
  .footer-bottom { padding: 16px 0 0; margin-top: 16px; }
}

/* ── Remove all hover effects on touch devices ── */
@media (hover: none) {
  .nav-logo-link:hover              { transform: none; }
  .nav-links a:hover                { opacity: 1; }
  .lang-pill:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.9);
    color: rgba(0,0,0,0.65);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 8px rgba(0,0,0,0.06);
  }
  a.contact-item-value:hover        { color: rgba(0,0,0,0.72); }
  .custom-select-trigger:hover      { border-color: rgba(0,0,0,0.08); }
  .custom-select-option:hover       { background: transparent; color: rgba(0,0,0,0.65); }
  .btn-submit:hover                 { background: #000; transform: none; }
  .btn-submit:hover::before         { opacity: 0; animation: none; }
  .footer-col-links a:hover         { color: rgba(255,255,255,0.48); }
  .mobile-nav-link:hover            { opacity: 1 !important; }
}
