/* Reale Investigation — preview styles
   Colours follow the logo: #103152 / #FFFFFF / #F8F8F8 only.
   Remove .preview-banner before going live. */

:root {
  --navy: #103152;
  --bg: #ffffff;
  --fog: #f8f8f8;
  --line: rgba(16, 49, 82, 0.12);
  --line-strong: rgba(16, 49, 82, 0.22);
  --muted: rgba(16, 49, 82, 0.72);
  --header-h: 4.25rem;
  --wrap: 70rem;
  --read: 46rem;
  --radius: 0.4rem;
  --shadow: 0 1px 2px rgba(16, 49, 82, 0.06), 0 8px 24px rgba(16, 49, 82, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--navy);
  background: var(--bg);
  font-family: "PingFang TC", "PingFang SC", "Noto Sans TC", "Noto Sans SC",
    "Microsoft JhengHei", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body.lang-en { font-family: "Helvetica Neue", Helvetica, Arial, "PingFang TC", "Noto Sans TC", sans-serif; }

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--navy);
  color: #fff;
  padding: 0.4rem 0.8rem;
  z-index: 100;
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

/* —— Preview banner (remove this block and the markup before launch) —— */
.preview-banner {
  margin: 0;
  padding: 0.4rem 1rem;
  background: var(--navy);
  color: #fff;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex: 0 0 auto;
  color: var(--navy);
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 2.75rem;
  height: 2.75rem;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-name {
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 99px;
  overflow: hidden;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.lang-switch a,
.lang-switch span {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  text-decoration: none;
  color: var(--muted);
}
.lang-switch a:hover { color: var(--navy); background: var(--fog); text-decoration: none; }
.lang-switch [aria-current="page"] {
  background: var(--navy);
  color: #fff;
}

.header-cta { display: flex; align-items: center; gap: 0.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border-radius: 99px;
  border: 1px solid var(--navy);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.3;
  font-weight: 600;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-ghost {
  background: transparent;
  color: var(--navy);
}
.btn-ghost.is-placeholder { opacity: 0.85; }
.btn-light {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}
.btn-light-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}

.site-nav { display: flex; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav > ul > li > a,
.site-nav > ul > li > .top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--navy);
  border-radius: var(--radius);
}
.site-nav > ul > li > a:hover,
.site-nav > ul > li > .top-link:hover,
.site-nav > ul > li > a.is-current {
  background: var(--fog);
  text-decoration: none;
}

.has-sub { position: relative; }
.has-sub .top-link::after {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.1rem);
  margin-left: 0.15rem;
}
.sub-panel {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 17.5rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.6rem 0;
  z-index: 50;
}
.has-sub:hover .sub-panel,
.has-sub:focus-within .sub-panel,
.has-sub.is-open .sub-panel { display: block; }
.sub-panel a {
  display: block;
  padding: 0.32rem 1rem;
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--navy);
}
.sub-panel a:hover { background: var(--fog); text-decoration: none; }
.sub-panel .sub-head {
  display: block;
  padding: 0.45rem 1rem 0.15rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.sub-panel .sub-head a {
  display: inline;
  padding: 0;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: inherit;
  color: inherit;
}
.sub-panel .sub-rule {
  height: 1px;
  background: var(--line);
  margin: 0.45rem 1rem;
}

/* —— Hero / page head —— */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 3.5rem 0 3.75rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.3;
  font-weight: 650;
  max-width: 22em;
  letter-spacing: -0.01em;
}
.hero .lead {
  margin: 0 0 1.6rem;
  max-width: 42rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.9);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.hero .placeholder-note,
.cta-row .placeholder-text {
  color: rgba(255,255,255,0.85);
  font-size: 0.9375rem;
}

.page-head {
  background: var(--fog);
  border-bottom: 1px solid var(--line);
  padding: 2.25rem 0 2rem;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.35;
  font-weight: 650;
  max-width: 22em;
}

/* —— Body —— */
.page-body {
  padding: 2.4rem 0 4rem;
  max-width: var(--read);
  margin-inline: auto;
}
.page-body.wide { max-width: var(--wrap); }

.page-body h2 {
  margin: 2.4rem 0 0.8rem;
  font-size: 1.35rem;
  line-height: 1.4;
  font-weight: 650;
}
.page-body h2:first-child { margin-top: 0; }
.page-body h3 {
  margin: 1.6rem 0 0.55rem;
  font-size: 1.1rem;
  font-weight: 650;
}
.page-body p { margin: 0 0 1rem; }
.page-body ul, .page-body ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.page-body li { margin: 0.3rem 0; }
.page-body li::marker { color: var(--navy); }

/* Service-style lists: first link is the title */
.page-body ul.card-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.85rem;
  max-width: none;
}
.page-body ul.card-list li {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem 1.1rem 1.05rem;
  box-shadow: 0 1px 2px rgba(16, 49, 82, 0.04);
}
.page-body ul.card-list li > a:first-child {
  display: inline-block;
  font-weight: 650;
  text-decoration: none;
  margin-bottom: 0.15rem;
}
.page-body ul.card-list li > a:first-child:hover { text-decoration: underline; }

.faq-list { display: grid; gap: 0.55rem; margin: 0 0 1.4rem; }
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  padding: 0;
}
.faq-list details[open] { border-color: var(--line-strong); }
.faq-list summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 650;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  float: right;
  font-weight: 400;
  color: var(--muted);
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details > :not(summary) { padding: 0 1rem 0.95rem; margin-top: 0; }
.faq-list details p:last-child { margin-bottom: 0; }

.cta-band {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.4rem;
  background: var(--fog);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}
.cta-band h2 { margin-top: 0; }

/* —— Footer —— */
.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 2.6rem 0 2.4rem;
  font-size: 0.9rem;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 1.8rem 1.4rem;
}
.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  text-decoration: none;
  color: #fff;
  font-weight: 650;
  margin-bottom: 0.7rem;
}
.footer-brand:hover { text-decoration: none; }
.footer-brand img { width: 2.5rem; height: 2.5rem; background: #fff; border-radius: 50%; }
.site-footer h2 {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  color: rgba(255,255,255,0.7);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.28rem 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-contact li { color: rgba(255,255,255,0.9); }
.footer-base {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
}

/* —— Mobile bar —— */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 0.45rem 0.6rem calc(0.45rem + env(safe-area-inset-bottom));
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
}
.mobile-bar .btn { width: 100%; padding: 0.65rem 0.4rem; font-size: 0.8125rem; }

@media (max-width: 980px) {
  .brand-tag { display: none; }
  .header-cta .btn-ghost { display: none; }
  .site-nav > ul > li > a,
  .site-nav > ul > li > .top-link { padding: 0.5rem 0.5rem; font-size: 0.875rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 1rem 1rem;
    max-height: calc(100vh - var(--header-h) - 2rem);
    overflow: auto;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .has-sub .sub-panel {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0 0 0.4rem 0.6rem;
  }
  .has-sub.is-open .sub-panel,
  .has-sub:focus-within .sub-panel { display: block; }
  .header-tools { gap: 0.4rem; }
  .hero { padding: 2.2rem 0 2.4rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 6.8rem; }
  .mobile-bar { display: grid; }
  body { padding-bottom: 0; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 0.82rem; }
  .brand img { width: 2.35rem; height: 2.35rem; }
  .lang-switch a, .lang-switch span { padding: 0.22rem 0.4rem; }
  .header-cta .btn { padding: 0.4rem 0.7rem; }
}
