:root {
  --eclipse-black: #0a0a0c;
  --eclipse-void: #121218;
  --eclipse-surface: #1a1a22;
  --lunar-silver: #c4c0cc;
  --lunar-mist: #8e8a98;
  --muted-violet: #6b5a7a;
  --violet-glow: #8a7399;
  --crimson-petal: #9a3d4a;
  --crimson-soft: #c45a68;
  --halo: rgba(196, 192, 204, 0.12);
  --halo-strong: rgba(138, 115, 153, 0.28);
  --text: #e8e4ee;
  --text-muted: #9a95a5;
  --font-serif: "Cormorant Garamond", "Noto Serif TC", "Songti TC", serif;
  --font-body: "Noto Serif TC", "Cormorant Garamond", "Songti TC", serif;
  --max: 72rem;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--halo-strong), transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 20%, rgba(154, 61, 74, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(107, 90, 122, 0.15), transparent 55%),
    var(--eclipse-black);
  background-attachment: fixed;
}

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

a {
  color: var(--lunar-silver);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.25s var(--ease);
}

a:hover {
  color: var(--crimson-soft);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  color: var(--text-muted);
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 12, 0.82);
  border-bottom: 1px solid rgba(196, 192, 204, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  color: var(--lunar-silver);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 62% 38%, transparent 42%, var(--eclipse-black) 43%),
    radial-gradient(circle at 50% 50%, var(--crimson-petal) 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, transparent 55%, var(--muted-violet) 56%, transparent 58%),
    var(--lunar-silver);
  box-shadow: 0 0 20px var(--halo-strong);
  animation: bloom-pulse 6s var(--ease) infinite;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--muted-violet);
  color: var(--lunar-silver);
  padding: 0.4rem 0.7rem;
  font-family: inherit;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--eclipse-void);
    border-bottom: 1px solid rgba(196, 192, 204, 0.1);
    padding: 1rem 1.25rem 1.25rem;
  }

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

  .site-nav ul {
    flex-direction: column;
    gap: 0.85rem;
  }
}

/* Buttons — bloom outward */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  background: var(--eclipse-surface);
  border: 1px solid var(--muted-violet);
  cursor: pointer;
  isolation: isolate;
  overflow: visible;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.btn::before,
.btn::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease), inset 0.4s var(--ease), border-color 0.4s var(--ease);
}

.btn::before {
  inset: -10px;
}

.btn:hover {
  border-color: var(--crimson-soft);
  color: #fff;
  background: rgba(154, 61, 74, 0.25);
}

.btn:hover::after {
  opacity: 1;
  border-color: rgba(196, 192, 204, 0.35);
  inset: -8px;
}

.btn:hover::before {
  opacity: 1;
  border-color: rgba(138, 115, 153, 0.4);
  inset: -14px;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(107, 90, 122, 0.45), rgba(154, 61, 74, 0.35));
  border-color: var(--violet-glow);
}

.btn-ghost {
  background: transparent;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* Hero — asymmetric, brand-forward */
.hero-eclipse {
  position: relative;
  min-height: min(88vh, 52rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 4rem 0 3.5rem;
}

.hero-eclipse::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--eclipse-black) 8%, transparent 45%),
    linear-gradient(90deg, rgba(10, 10, 12, 0.92) 0%, rgba(10, 10, 12, 0.55) 48%, rgba(10, 10, 12, 0.25) 100%),
    url("https://images.unsplash.com/photo-1534796636912-3b95bffd5114?auto=format&fit=crop&w=1800&q=80")
      center / cover no-repeat;
  z-index: -1;
  animation: halo-breathe 12s var(--ease) infinite alternate;
}

.hero-copy {
  max-width: 34rem;
  padding-bottom: 1rem;
}

.hero-brand {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  color: var(--text);
  text-shadow: 0 0 40px var(--halo-strong);
  animation: rise-in 1s var(--ease) both;
}

.hero-line {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: var(--lunar-silver);
  margin: 0 0 0.85rem;
  animation: rise-in 1s 0.15s var(--ease) both;
}

.hero-support {
  margin: 0;
  max-width: 28rem;
  animation: rise-in 1s 0.28s var(--ease) both;
}

.hero-eclipse .btn-row {
  animation: rise-in 1s 0.4s var(--ease) both;
}

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

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
}

.section-head p {
  margin: 0;
}

.halo-surface {
  position: relative;
  background: var(--eclipse-surface);
  border: 1px solid rgba(196, 192, 204, 0.1);
  padding: 1.5rem;
  box-shadow: 0 0 0 1px transparent, 0 0 40px var(--halo);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

.halo-surface:hover {
  border-color: rgba(138, 115, 153, 0.45);
  box-shadow: 0 0 50px var(--halo-strong);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.service-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.service-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 1rem;
  filter: saturate(0.7) brightness(0.85);
}

.service-tile h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.service-tile p {
  margin: 0;
  flex: 1;
  font-size: 0.98rem;
}

.service-meta {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--violet-glow);
}

/* Evidence / quotes */
.evidence-strip {
  display: grid;
  gap: 1.25rem;
}

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

.quote {
  margin: 0;
  padding: 1.75rem;
  background: linear-gradient(160deg, rgba(26, 26, 34, 0.95), rgba(18, 18, 24, 0.9));
  border-left: 2px solid var(--crimson-petal);
}

.quote p {
  margin: 0 0 1rem;
  color: var(--lunar-silver);
  font-style: italic;
}

.quote cite {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Page hero compact */
.page-hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid rgba(196, 192, 204, 0.08);
}

.page-hero h1 {
  margin: 0 0 0.75rem;
}

.page-hero p {
  margin: 0;
  max-width: 38rem;
}

/* Blog */
.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-item {
  display: grid;
  gap: 1.25rem;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 700px) {
  .blog-item {
    grid-template-columns: 14rem 1fr;
    align-items: center;
  }
}

.blog-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.65) brightness(0.8);
}

.blog-item time {
  font-size: 0.85rem;
  color: var(--muted-violet);
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin: 0 0 1.25rem;
}

.cover-bleed {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  margin: 0 0 2rem;
  filter: saturate(0.7) brightness(0.75);
}

/* Forms */
.form {
  max-width: 32rem;
  display: grid;
  gap: 1.1rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--lunar-silver);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: var(--eclipse-void);
  border: 1px solid rgba(196, 192, 204, 0.2);
  border-radius: var(--radius);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--violet-glow);
  box-shadow: 0 0 0 3px var(--halo);
}

.field-error {
  color: var(--crimson-soft);
  font-size: 0.85rem;
  min-height: 1.1em;
}

.form-status {
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  display: none;
}

.form-status.is-success {
  display: block;
  border-color: var(--muted-violet);
  background: rgba(107, 90, 122, 0.2);
  color: var(--lunar-silver);
}

.form-status.is-error {
  display: block;
  border-color: var(--crimson-petal);
  background: rgba(154, 61, 74, 0.15);
  color: var(--crimson-soft);
}

/* Process / methodology */
.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 4.5rem;
  background: var(--eclipse-surface);
  border: 1px solid rgba(196, 192, 204, 0.08);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.1rem;
  top: 1.35rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--crimson-petal);
}

.step h3 {
  margin: 0 0 0.5rem;
}

.step p {
  margin: 0;
}

/* Legal */
.legal {
  max-width: 44rem;
  padding-bottom: 4rem;
}

.legal h2 {
  margin-top: 2.5rem;
}

.legal ul {
  color: var(--text-muted);
  padding-left: 1.25rem;
}

.contact-block {
  display: grid;
  gap: 0.35rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--eclipse-surface);
  border: 1px solid rgba(196, 192, 204, 0.1);
}

.contact-block strong {
  color: var(--text);
  font-weight: 500;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid rgba(196, 192, 204, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

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

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--lunar-silver);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(196, 192, 204, 0.08);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  max-width: 28rem;
  margin-inline: auto;
  padding: 1.25rem 1.35rem;
  background: var(--eclipse-void);
  border: 1px solid rgba(138, 115, 153, 0.45);
  box-shadow: 0 0 40px var(--halo-strong);
  display: none;
}

.cookie-banner.is-visible {
  display: block;
  animation: rise-in 0.5s var(--ease) both;
}

.cookie-banner p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cookie-actions .btn {
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
}

/* 404 */
.not-found {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.not-found .eclipse-ring {
  width: 7rem;
  height: 7rem;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--muted-violet);
  box-shadow:
    inset 0 0 30px var(--halo),
    0 0 40px var(--halo-strong);
  background:
    radial-gradient(circle at 65% 40%, var(--eclipse-black) 38%, transparent 39%),
    radial-gradient(circle at 50% 50%, var(--crimson-petal) 8%, transparent 9%),
    var(--lunar-mist);
  animation: bloom-pulse 5s var(--ease) infinite;
}

/* Animations */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bloom-pulse {
  0%,
  100% {
    box-shadow: 0 0 16px var(--halo);
  }
  50% {
    box-shadow: 0 0 28px var(--halo-strong);
  }
}

@keyframes halo-breathe {
  from {
    filter: brightness(0.9) saturate(0.85);
  }
  to {
    filter: brightness(1.05) saturate(1);
  }
}

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