/*
Theme Name: S1 Heritage
Theme URI: https://www.s1heritage.com/
Author: S1 Heritage
Description: S1 Heritage official family office and advisory website.
Version: 1.0.0
Text Domain: s1heritage
*/

:root {
  --ink: #161715;
  --ink-soft: #343832;
  --ivory: #f5f0e7;
  --paper: #fbf8f1;
  --stone: #d9d0c2;
  --jade: #34564a;
  --jade-dark: #183c34;
  --brass: #b78b52;
  --oxblood: #5e2d2b;
  --night: #101926;
  --line: rgba(22, 23, 21, 0.14);
  --white-line: rgba(255, 255, 255, 0.2);
  --shadow: 0 28px 80px rgba(16, 25, 38, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  min-height: 104px;
  padding: 14px clamp(20px, 4vw, 64px) 16px;
  color: #fff;
  transition:
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    min-height 200ms ease;
}

.site-header.is-scrolled,
.site-header.nav-active {
  min-height: 104px;
  color: #fff;
  background: rgba(5, 7, 7, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.header-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.header-contact a,
.header-contact span {
  white-space: nowrap;
}

.header-contact a:hover,
.header-contact a:focus-visible {
  color: #fff;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-qr-list {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
}

.header-qr {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  line-height: 1;
}

.header-qr img {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #fff;
  object-fit: cover;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: min(244px, 50vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.34));
  transition: width 200ms ease;
}

.site-header.is-scrolled .brand-logo,
.site-header.nav-active .brand-logo {
  width: min(214px, 48vw);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
  font-size: 14px;
  font-weight: 560;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  opacity: 0.86;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.nav-open .nav-toggle span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 94svh;
  overflow: hidden;
  color: #fff;
  background: var(--night);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 12, 13, 0.82) 0%, rgba(12, 15, 16, 0.6) 36%, rgba(13, 16, 17, 0.18) 74%),
    linear-gradient(180deg, rgba(7, 12, 13, 0.55) 0%, rgba(7, 12, 13, 0.02) 42%, rgba(7, 12, 13, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(920px, calc(100% - 40px));
  min-height: 82svh;
  flex-direction: column;
  justify-content: center;
  padding: 124px 0 170px clamp(20px, 7vw, 104px);
}

.eyebrow {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--jade);
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif CJK TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
}

h1 {
  max-width: 920px;
  font-size: clamp(54px, 7vw, 96px);
}

h2 {
  max-width: 760px;
  font-size: clamp(36px, 5vw, 72px);
}

h3 {
  margin: 0;
  font-family: Georgia, "Noto Serif CJK TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.18;
}

.hero-slogan-en {
  max-width: 640px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 620px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 1.8vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: var(--jade);
  box-shadow: 0 12px 30px rgba(24, 60, 52, 0.24);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--jade-dark);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-panel {
  position: absolute;
  z-index: 3;
  right: clamp(20px, 4vw, 64px);
  bottom: clamp(20px, 4vw, 52px);
  display: grid;
  width: min(620px, calc(100% - 40px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--white-line);
  background: rgba(12, 15, 16, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel div {
  min-height: 116px;
  padding: 22px;
  border-right: 1px solid var(--white-line);
}

.hero-panel div:last-child {
  border-right: 0;
}

.hero-panel span {
  display: block;
  margin-bottom: 20px;
  color: var(--brass);
  font-size: 12px;
  font-weight: 800;
}

.hero-panel strong {
  display: block;
  max-width: 14ch;
  font-family: Georgia, "Noto Serif CJK TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.22;
}

.section-band {
  padding: clamp(76px, 10vw, 132px) clamp(20px, 4vw, 64px);
}

.section-band.light {
  padding-top: clamp(34px, 5vw, 62px);
  padding-bottom: clamp(34px, 5vw, 62px);
  background: #ede5d8;
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.intro {
  background:
    linear-gradient(120deg, rgba(52, 86, 74, 0.08), transparent 42%),
    var(--paper);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: clamp(32px, 7vw, 92px);
  align-items: end;
}

.intro-grid p:last-child,
.governance-copy p,
.contact-grid p {
  margin: 0;
  color: rgba(22, 23, 21, 0.68);
  font-size: 19px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.metrics div {
  min-height: 156px;
  padding: 28px;
  background: #f8f3e9;
}

.metrics strong {
  display: block;
  margin-bottom: 14px;
  color: var(--oxblood);
  font-family: Georgia, "Noto Serif CJK TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 500;
  line-height: 1;
}

.metrics span {
  color: rgba(22, 23, 21, 0.66);
  font-weight: 620;
}

.platform {
  background: #f7f1e7;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(32px, 5vw, 60px);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.service-card {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background: var(--paper);
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.service-card:hover {
  color: #fff;
  background: var(--jade-dark);
  transform: translateY(-4px);
}

.service-index {
  color: var(--brass);
  font-size: 12px;
  font-weight: 800;
}

.service-card p {
  margin: 34px 0 0;
  color: rgba(22, 23, 21, 0.62);
  line-height: 1.62;
}

.service-card:hover p {
  color: rgba(255, 255, 255, 0.74);
}

.service-note {
  max-width: 880px;
  margin: 22px 0 0;
  color: rgba(22, 23, 21, 0.52);
  font-size: 13px;
  line-height: 1.7;
}

.governance {
  color: #fff;
  background: var(--night);
}

.governance-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 88px);
  align-items: center;
}

.image-frame {
  height: min(620px, 74vw);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  filter: saturate(0.88);
  transform: scale(1.08);
}

.governance-copy h2 {
  max-width: 640px;
}

.governance-copy p {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.72);
}

.check-list {
  display: grid;
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, 0.82);
}

.check-list li::before {
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
  content: "";
}

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

.process-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.process-row div {
  min-height: 220px;
  padding: 30px;
  background: #f8f3e9;
}

.process-row span {
  display: block;
  margin-bottom: 26px;
  color: var(--jade);
  font-family: Georgia, "Noto Serif CJK TC", "Songti TC", "PMingLiU", "Times New Roman", serif;
  font-size: 32px;
}

.process-row p {
  margin: 0;
  color: rgba(22, 23, 21, 0.64);
}

.contact {
  padding: clamp(76px, 10vw, 132px) clamp(20px, 4vw, 64px);
  color: #fff;
  background:
    linear-gradient(120deg, rgba(183, 139, 82, 0.2), transparent 38%),
    var(--jade-dark);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.68fr);
  gap: clamp(36px, 8vw, 92px);
  align-items: start;
}

.contact-grid p {
  max-width: 560px;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.72);
}

.contact-card {
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
}

.contact-kicker {
  color: var(--brass);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-card h3 {
  color: #fff;
}

.contact-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.intake-form {
  display: grid;
  gap: 14px;
}

.intake-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.intake-form input,
.intake-form select,
.intake-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  color: #fff;
  background: rgba(16, 25, 38, 0.36);
  outline: 0;
  padding: 13px 14px;
  resize: vertical;
}

.intake-form select {
  color-scheme: dark;
}

.intake-form input::placeholder,
.intake-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.intake-form input:focus,
.intake-form select:focus,
.intake-form textarea:focus {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(183, 139, 82, 0.18);
}

.consent-check {
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 500;
}

.consent-check input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--brass);
}

.calendar-next {
  display: grid;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 18px;
}

.calendar-next[hidden] {
  display: none;
}

.contact-card .button {
  width: 100%;
  margin-top: 8px;
}

.contact-email {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 4vw, 64px);
  color: rgba(22, 23, 21, 0.66);
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.site-footer a {
  color: var(--jade);
  font-weight: 700;
}

@media (max-width: 980px) {
  .site-header {
    min-height: 92px;
  }

  .nav-toggle {
    display: block;
  }

  .header-contact {
    justify-content: flex-start;
    padding-right: 52px;
  }

  .header-contact > span {
    display: none;
  }

  .header-qr-list {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: 96px;
    right: 16px;
    left: 16px;
    display: grid;
    gap: 0;
    padding: 14px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 16px 12px;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    min-height: 930px;
  }

  .hero-content {
    width: min(680px, calc(100% - 40px));
    min-height: 640px;
    padding-top: 112px;
    padding-bottom: 260px;
  }

  .hero-panel {
    left: 20px;
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--white-line);
  }

  .hero-panel div:last-child {
    border-bottom: 0;
  }

  .hero-panel strong {
    max-width: none;
  }

  .intro-grid,
  .governance-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-header {
    padding-top: 12px;
  }

  .header-contact {
    gap: 7px 12px;
    font-size: 11px;
  }

  .header-web {
    display: none;
  }

  .brand-logo {
    width: min(204px, 54vw);
  }

  .hero {
    min-height: 920px;
  }

  .hero-image {
    object-position: 65% 50%;
  }

  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(7, 12, 13, 0.88) 0%, rgba(7, 12, 13, 0.66) 62%, rgba(7, 12, 13, 0.22) 100%),
      linear-gradient(180deg, rgba(7, 12, 13, 0.6) 0%, rgba(7, 12, 13, 0.1) 42%, rgba(7, 12, 13, 0.82) 100%);
  }

  .hero-content {
    width: 100%;
    padding: 136px 20px 260px;
  }

  h1 {
    font-size: clamp(48px, 15vw, 72px);
  }

  .hero-slogan-en {
    font-size: 24px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .metrics,
  .service-grid,
  .process-row {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 260px;
  }

  .section-heading {
    display: block;
  }

  .image-frame {
    height: 420px;
  }

  .contact-card {
    padding: 22px;
  }

  .site-footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
