/* Sagacious Foundation Limited — static identity system */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Sans+TC:wght@400;500&family=Noto+Serif+TC:wght@500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  --navy: #0a1628;
  --navy-deep: #07101c;
  --gold: #c9a227;
  --gold-soft: #d4b45a;
  --paper: #f8f5f0;
  --paper-raised: #fffdf8;
  --ink: #1a1a1a;
  --muted: #6b6760;
  --rule: #d8d0c2;
  --font-serif: "Playfair Display", "Noto Serif TC", Georgia, serif;
  --font-sans: "Inter", "Noto Sans TC", system-ui, sans-serif;
  --shadow-quiet: 0 18px 50px -24px rgb(10 22 40 / 0.35);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100dvh;
}

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

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

button,
[role="button"] {
  cursor: pointer;
  font: inherit;
}

h1, h2, h3 {
  text-wrap: balance;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

p {
  text-wrap: pretty;
  margin: 0;
}

/* Layout */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.shell > main {
  flex: 1;
}

.container {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2rem;
  }
}

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

.site-header.invert {
  background: var(--navy);
  border-color: rgb(248 245 240 / 0.1);
  color: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.wordmark svg {
  width: 1.75rem;
  height: 2.25rem;
  color: var(--gold);
}

.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wordmark-text strong {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
}

.wordmark-text span {
  margin-top: 0.25rem;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header.invert .wordmark-text span {
  color: var(--gold);
}

.nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 150ms ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--navy);
}

.site-header.invert .nav a {
  color: rgb(248 245 240 / 0.7);
}

.site-header.invert .nav a:hover,
.site-header.invert .nav a[aria-current="page"] {
  color: var(--gold);
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: inherit;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid var(--rule);
  padding: 1rem 1.25rem 1.25rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
  .mobile-nav,
  .mobile-nav.open {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
}

.btn-navy:hover {
  background: var(--navy-deep);
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.btn-gold:hover {
  background: var(--gold-soft);
}

.btn-outline {
  background: transparent;
  border-color: rgb(10 22 40 / 0.2);
  color: var(--navy);
}

.btn-outline:hover {
  border-color: rgb(10 22 40 / 0.5);
}

.btn-invert {
  background: transparent;
  border-color: rgb(248 245 240 / 0.25);
  color: var(--paper);
}

.btn-invert:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--navy);
}

.btn-sm {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 78dvh;
  display: flex;
  align-items: flex-end;
  background: var(--navy);
  color: var(--paper);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 20%, rgb(201 162 39 / 0.18), transparent 45%),
    linear-gradient(160deg, #0d1c33 0%, #0a1628 45%, #07101c 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(248 245 240 / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgb(248 245 240 / 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
}

.hero-content {
  position: relative;
  width: min(1120px, 100%);
  margin-inline: auto;
  padding: 7rem 1.25rem 4rem;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 8rem 2rem 6rem;
  }
}

.kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero h1 {
  margin-top: 1.25rem;
  max-width: 18ch;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
}

.hero-lead {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.65;
  color: rgb(248 245 240 / 0.75);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* Sections */
.section {
  padding-block: 4.5rem;
}

@media (min-width: 768px) {
  .section {
    padding-block: 6.5rem;
  }
}

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

.pillars {
  display: grid;
  gap: 3rem;
}

@media (min-width: 768px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.pillar {
  border-top: 1px solid rgb(201 162 39 / 0.7);
  padding-top: 1.5rem;
}

.pillar .kicker {
  letter-spacing: 0.28em;
}

.pillar h2 {
  margin-top: 0.75rem;
  font-size: 1.5rem;
  color: var(--navy);
}

.pillar p {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.panel {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(145deg, rgb(201 162 39 / 0.12), transparent 50%),
    linear-gradient(180deg, #12233a, #0a1628);
  display: grid;
  place-items: center;
  color: var(--gold);
}

.panel svg {
  width: 4.5rem;
  height: auto;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.prose {
  max-width: 42rem;
}

.prose p + p {
  margin-top: 1.25rem;
}

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

.hairline {
  height: 1px;
  margin-block: 2.5rem;
  background: linear-gradient(90deg, transparent, var(--gold) 12%, var(--gold) 88%, transparent);
}

/* Approach grid */
.approach-grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
}

@media (min-width: 768px) {
  .approach-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.approach-card {
  background: var(--paper);
  padding: 2rem;
}

@media (min-width: 768px) {
  .approach-card {
    padding: 2.5rem;
  }
}

.approach-card .num {
  font-family: var(--font-serif);
  color: var(--gold);
}

.approach-card h2 {
  margin-top: 1rem;
  font-size: 1.5rem;
  color: var(--navy);
}

.approach-card p {
  margin-top: 0.75rem;
  max-width: 28rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

/* About meta */
.meta-grid {
  display: grid;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .meta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.meta-grid dt {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-grid dd {
  margin: 0.5rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy);
}

.swatches {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.swatch {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--rule);
}

.swatch-navy { background: var(--navy); }
.swatch-gold { background: var(--gold); }
.swatch-paper { background: var(--paper); }
.swatch-ink { background: var(--ink); }

/* Forms */
.form-panel {
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .form-panel {
    padding: 2rem;
  }
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  color: var(--ink);
  padding: 0.7rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input {
  min-height: 2.75rem;
}

.field input:focus,
.field textarea:focus {
  border-color: rgb(10 22 40 / 0.4);
  box-shadow: 0 0 0 3px rgb(201 162 39 / 0.3);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--navy);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1.4fr 1fr;
  }
}

.footer-brand svg {
  width: 2rem;
  height: 2.5rem;
  color: var(--gold);
}

.footer-brand .name {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.footer-brand .sub {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-copy {
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgb(248 245 240 / 0.7);
  max-width: 22rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(248 245 240 / 0.7);
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bar {
  border-top: 1px solid rgb(248 245 240 / 0.1);
  padding-block: 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgb(248 245 240 / 0.45);
}

/* Name cards */
.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.theme-switch {
  display: flex;
  gap: 0.5rem;
}

.theme-switch button {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.theme-switch button[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card-label {
  margin-bottom: 0.75rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.namecard {
  position: relative;
  width: min(90mm, 100%);
  aspect-ratio: 90 / 54;
  overflow: hidden;
  box-shadow: var(--shadow-quiet);
}

.namecard-front {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6mm;
}

.namecard-front.theme-navy,
.namecard-front.theme-ink {
  background: var(--navy);
  color: var(--paper);
}

.namecard-front.theme-ink {
  background: var(--ink);
}

.namecard-front.theme-ivory {
  background: var(--paper-raised);
  color: var(--navy);
}

.namecard-front .owl {
  width: auto;
  height: 13mm;
  color: var(--gold);
}

.namecard-front.theme-ivory .owl {
  color: var(--navy);
}

.namecard-title {
  font-family: var(--font-serif);
  font-size: 6.4mm;
  line-height: 1;
  letter-spacing: 0.14em;
}

.namecard-rule {
  width: 22mm;
  height: 1px;
  margin: 2mm 0;
  background: var(--gold);
}

.namecard-sub {
  font-size: 2mm;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}

.namecard-front.theme-ivory .namecard-sub {
  color: var(--muted);
}

.namecard-back {
  background: var(--paper-raised);
  color: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5.5mm 5.5mm 5.5mm 7mm;
}

.namecard-back::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.6mm;
  height: 100%;
  background: var(--gold);
}

.card-person {
  display: flex;
  justify-content: space-between;
  gap: 4mm;
  align-items: flex-start;
}

.card-person h3 {
  font-size: 4.4mm;
  letter-spacing: -0.01em;
}

.card-person .cn-name {
  margin-top: 0.6mm;
  font-family: var(--font-serif);
  font-size: 2.6mm;
  color: rgb(26 26 26 / 0.75);
}

.card-person .title {
  margin-top: 1.4mm;
  font-size: 1.7mm;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-person .owl {
  width: auto;
  height: 9mm;
  color: var(--navy);
  flex-shrink: 0;
}

.card-org {
  font-size: 1.55mm;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-org-cn {
  margin-top: 0.8mm;
  font-family: var(--font-serif);
  font-size: 2.2mm;
  color: rgb(26 26 26 / 0.8);
}

.card-org-rule {
  width: 16mm;
  height: 1px;
  margin: 2mm 0 2.4mm;
  background: rgb(201 162 39 / 0.8);
}

.card-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1mm;
}

.card-contacts li {
  display: flex;
  align-items: center;
  gap: 1.8mm;
  font-size: 2.05mm;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-contacts svg {
  width: 2.4mm;
  height: 2.4mm;
  color: var(--gold);
  flex-shrink: 0;
}

.studio-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .studio-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Page headers */
.page-hero {
  border-bottom: 1px solid var(--rule);
  padding-block: 3rem 3.5rem;
}

.page-hero.navy {
  background: var(--navy);
  color: var(--paper);
  border-bottom: 0;
}

.page-hero h1 {
  margin-top: 0.75rem;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  color: inherit;
}

.page-hero.navy h1 {
  color: var(--paper);
}

.page-hero p.lead {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

/* Utility */
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-16 { margin-top: 4rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 16mm;
  }

  body * {
    visibility: hidden;
  }

  #print-cards,
  #print-cards * {
    visibility: visible;
  }

  #print-cards {
    position: absolute;
    inset: 0;
    display: block !important;
    background: white;
    padding: 12mm;
  }

  .namecard {
    width: 90mm;
    height: 54mm;
    aspect-ratio: auto;
    box-shadow: none;
    break-inside: avoid;
    margin-bottom: 12mm;
  }
}

#print-cards {
  display: none;
}
