:root {
  --ink: #172033;
  --muted: #5f697a;
  --line: #e7e0d4;
  --paper: #fffdf8;
  --soft: #f7f2e9;
  --navy: #13294b;
  --gold: #b78a35;
  --gold-soft: #f2dfb4;
  --red: #a92722;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(23, 32, 51, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.75;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid rgba(183, 138, 53, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  line-height: 1.2;
}

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

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 15px;
  color: var(--muted);
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: end;
  padding: clamp(28px, 6vw, 80px);
  overflow: hidden;
  background: var(--navy);
}

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

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(19, 41, 75, 0.72), rgba(19, 41, 75, 0.32), rgba(19, 41, 75, 0.04));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-copy {
  position: relative;
  max-width: 600px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.split-copy h2,
.tax-copy h2,
.contact-card h2,
.commitment h2 {
  margin: 0;
  line-height: 1.18;
  font-weight: 900;
}

.hero-copy h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 18px 0 0;
  font-size: 17px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid rgba(183, 138, 53, 0.5);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
}

.button.primary {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--white);
}

section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 36px;
  text-align: center;
}

.section-heading h2,
.split-copy h2,
.tax-copy h2,
.contact-card h2,
.commitment h2 {
  font-size: clamp(30px, 5vw, 48px);
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.intro-band {
  background: var(--soft);
}

.quote-grid,
.problem-grid,
.article-grid,
.team-grid,
.tax-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.quote-grid article,
.problem-grid article,
.service-list article,
.tax-grid article,
.article-card,
.person-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.quote-grid article {
  padding: 24px;
}

.quote-grid strong {
  color: var(--navy);
  font-size: 18px;
}

.quote-grid p,
.problem-grid p,
.service-list p,
.tax-grid p,
.article-body p,
.person-card p {
  color: var(--muted);
}

.split-section,
.tax-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.split-copy p {
  color: var(--muted);
}

.highlight-line,
.mini {
  color: var(--navy) !important;
  font-weight: 800;
}

.split-image img,
.service-layout img,
.tax-section figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.problem-section {
  background: #fbfaf7;
}

.problem-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.problem-grid article {
  padding: 28px;
}

h3 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.25;
}

.solution-panel {
  max-width: 980px;
  margin: 18px auto 0;
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
}

.solution-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.solution-panel .highlight-line {
  color: var(--gold-soft) !important;
}

.service-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  gap: 26px;
  align-items: center;
  max-width: 1220px;
  margin: 0 auto;
}

.service-list {
  display: grid;
  gap: 14px;
}

.service-list article {
  padding: 22px;
}

.commitment {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: center;
  background: var(--navy);
  color: var(--white);
}

.commitment ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.commitment li {
  padding: 16px 18px;
  border: 1px solid rgba(242, 223, 180, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.process {
  background: var(--soft);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.timeline article {
  position: relative;
  padding: 28px 28px 26px 76px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.timeline span {
  position: absolute;
  left: 24px;
  top: 28px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-weight: 900;
}

.timeline p {
  color: var(--muted);
}

.tax-section {
  align-items: start;
}

.tax-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0;
}

.tax-grid article {
  padding: 22px;
}

.note {
  color: var(--muted);
  font-size: 14px;
}

.tax-section figure {
  margin: 0;
}

.tax-section figure img {
  max-width: 430px;
  margin: 0 auto;
}

.loan-section {
  background: var(--navy);
  color: var(--white);
}

.loan-section .section-heading p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
}

.loan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.loan-grid article {
  padding: 24px;
  border: 1px solid rgba(242, 223, 180, 0.25);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.loan-grid span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--gold-soft);
  font-weight: 900;
}

.loan-grid p {
  color: rgba(255, 255, 255, 0.76);
}

.loan-note {
  max-width: 920px;
  margin: 22px auto 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--white);
  font-weight: 800;
}

.mortgage-calculator {
  background: var(--soft);
}

.calc-form,
.calc-summary,
.calc-table-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.calc-form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.calc-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.calc-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.calc-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
}

.rate-grid {
  display: grid;
  gap: 10px;
}

.rate-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.rate-head {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.calc-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.calc-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.calc-error {
  display: none;
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 16px 18px;
  border: 2px solid #b3261e;
  border-radius: var(--radius);
  background: #fff1ee;
  color: #7d1a14;
  font-weight: 900;
}

.calc-error.is-visible {
  display: block;
}

.calc-table-wrap::before {
  content: "表格中的月繳本金與月繳利息，為各利率期間第一期的估算；實際金額仍以銀行核貸與每期帳單為準。";
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.calc-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.calc-summary article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.calc-summary span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.calc-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  font-size: 24px;
}

.calc-warning {
  display: none;
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 18px 20px;
  border: 2px solid #d99b22;
  border-radius: var(--radius);
  background: #fff6df;
  color: #5a3a00;
  font-size: 18px;
  font-weight: 900;
}

.calc-warning.is-visible {
  display: block;
}

.calc-table-wrap {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.calc-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.calc-table th,
.calc-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.calc-table th:first-child,
.calc-table td:first-child {
  text-align: left;
}

.calc-table th {
  background: #fbfaf7;
  color: var(--navy);
  font-size: 14px;
}

.calc-table tr:last-child td {
  border-bottom: 0;
}

.life {
  background: #fbfaf7;
}

.article-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card {
  overflow: hidden;
}

.article-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 0;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.article-toggle strong,
.article-toggle small {
  display: block;
}

.article-toggle strong {
  font-size: 22px;
}

.article-toggle small {
  color: var(--muted);
}

.article-toggle b {
  color: var(--gold);
}

.article-body {
  display: none;
  padding: 0 22px 24px;
}

.article-card.is-open .article-body {
  display: block;
}

.article-card.is-open .article-toggle b {
  color: var(--red);
}

.team-section {
  background: var(--soft);
}

.team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.person-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px;
  overflow: hidden;
}

.person-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center center;
  border-radius: var(--radius);
}

.person-card .ayong-photo {
  object-fit: contain;
  object-position: center center;
}

.person-card .wu-photo {
  object-fit: contain;
}

.person-card a {
  color: var(--red);
  font-weight: 900;
}

.contact {
  padding-bottom: 52px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.contact-card p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-actions {
  margin-top: 0;
}

.contact-actions .button {
  width: 100%;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 22px auto 0;
}

.social-links a {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
}

.google-form-section {
  background: var(--soft);
}

.google-form-frame {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.google-form-frame iframe {
  display: block;
  width: 100%;
  min-height: 1545px;
  border: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px clamp(18px, 5vw, 72px);
  background: #101827;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 900;
}

.site-footer span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.site-footer span::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.site-footer strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 18px;
}

.site-footer strong::before {
  content: "⌂";
  font-size: 34px;
  line-height: 1;
}

.floating-line {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  padding: 12px 16px;
  border-radius: 999px;
  background: #0f9f62;
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(15, 159, 98, 0.32);
}

@media (max-width: 900px) {
  .site-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 560px;
    padding-top: 96px;
  }

  .hero-media::after {
    background: linear-gradient(180deg, rgba(19, 41, 75, 0.16), rgba(19, 41, 75, 0.82));
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 17px;
  }

  .quote-grid,
  .timeline,
  .article-grid,
  .team-grid,
  .problem-grid,
  .tax-grid,
  .loan-grid,
  .calc-fields,
  .calc-summary,
  .service-layout,
  .split-section,
  .tax-section,
  .commitment,
  .contact-card,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .quote-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .person-card {
    grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 540px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .quote-grid,
  .person-card {
    grid-template-columns: 1fr;
  }

  .timeline article {
    padding: 72px 22px 22px;
  }

  .timeline span {
    left: 22px;
    top: 22px;
  }

  .person-card img {
    max-height: 360px;
  }

  .floating-line {
    left: 18px;
    right: 18px;
    text-align: center;
  }
}
