@font-face {
  font-family: 'Biski';
  src: url('/fonts/BiskiTrial-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Han Sans CN';
  src: url('/fonts/SourceHanSansCN-Light-subset.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+3000-303F, U+FF00-FFEF, U+2000-206F;
}

:root {
  --primary: #2d6a7f;
  --primary-dark: #1f4e5e;
  --primary-light: #e4eff3;
  --accent: #e8a54e;
  --accent-soft: #fdf2e0;
  --cream: #faf7f2;
  --ink: #1f2d33;
  --muted: #5a6a72;
  --line: #e6e1d8;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(31,45,51,0.06);
  --shadow-md: 0 8px 24px rgba(31,45,51,0.08);
  --shadow-lg: 0 20px 50px rgba(31,45,51,0.12);
  --max: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #faf7f2 0%, #f4ede0 45%, #fdf4e6 100%);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.lang-zh { font-family: 'Source Han Sans CN', 'Noto Sans TC', 'Inter', -apple-system, 'Microsoft JhengHei', 'PingFang TC', sans-serif; font-weight: 300; }
body.lang-zh h1, body.lang-zh h2, body.lang-zh h3, body.lang-zh h4 {
  font-family: 'Source Han Sans CN', 'Noto Serif TC', 'Lora', Georgia, serif;
  font-weight: 300;
}
.lang-switch { display: inline-flex; gap: 0.25rem; align-items: center; font-size: 0.85rem; color: var(--muted); }
.lang-switch a { color: var(--muted); padding: 0.25rem 0.5rem; border-radius: 6px; }
.lang-switch a.active { color: var(--primary); font-weight: 600; }
.lang-switch a:hover { color: var(--primary); background: var(--primary-light); }
.lang-switch .sep { opacity: 0.4; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { font-family: 'Lora', Georgia, serif; line-height: 1.2; color: var(--ink); font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; }
p { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,247,242,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.7rem; font-family: 'Biski', 'Lora', serif; font-weight: 400; font-size: 1.85rem; line-height: 1; color: var(--ink); letter-spacing: 0.01em; }
.logo span { transform: translateY(3px); display: inline-block; }
.logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-cta {
  background: var(--primary); color: #fff !important;
  padding: 0.55rem 1.1rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500;
}
.nav-cta:hover { background: var(--primary-dark); color: #fff !important; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

@media (max-width: 820px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--cream); padding: 1.25rem; gap: 1rem; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: block; }
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #d4943d; }

/* HERO */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex; align-items: center;
  padding: 5rem 0;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
  transform: scale(1);
  animation: heroKenBurns 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroKenBurns {
  0%   { transform: scale(1)     translate(0, 0); }
  100% { transform: scale(1.08)  translate(-1.5%, -1%); }
}
.hero-content {
  animation: heroFadeUp 1.2s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes heroFadeUp {
  0%   { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}
.hero-content h1 { animation: heroFadeUp 1.2s cubic-bezier(.2,.7,.2,1) 0.15s both; }
.hero-content p  { animation: heroFadeUp 1.2s cubic-bezier(.2,.7,.2,1) 0.35s both; }
.hero-content .hero-cta { animation: heroFadeUp 1.2s cubic-bezier(.2,.7,.2,1) 0.55s both; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero-content, .hero-content h1, .hero-content p, .hero-content .hero-cta { animation: none; }
}

/* HERO WAVES */
.hero-waves {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%; height: 120px;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  line-height: 0;
}
.hero-waves svg {
  position: absolute;
  left: 0; bottom: 0;
  width: 200%; height: 100%;
}
.hero-waves .wave-1 { animation: waveSlide 18s linear infinite; opacity: 0.55; }
.hero-waves .wave-2 { animation: waveSlide 26s linear infinite reverse; opacity: 0.75; }
.hero-waves .wave-3 { animation: waveSlide 34s linear infinite; opacity: 1; }
@keyframes waveSlide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-waves svg { animation: none; }
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(45,106,127,0.88) 0%, rgba(31,78,94,0.75) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; color: #fff; }
.hero-content h1 { color: #fff; max-width: 720px; margin-bottom: 1.25rem; }
.hero-content p { color: rgba(255,255,255,0.92); font-size: 1.2rem; max-width: 620px; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-cta .btn-primary { background: var(--accent); color: var(--ink); }
.hero-cta .btn-primary:hover { background: #d4943d; }
.hero-cta .btn-outline { color: #fff; border-color: #fff; }
.hero-cta .btn-outline:hover { background: #fff; color: var(--primary-dark); }

.eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255,255,255,0.25);
}

/* VALUES */
.values { background: #fff; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-top: 3rem; }
.value {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--cream);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon {
  width: 56px; height: 56px;
  margin: 0 auto 1rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.value h3 { margin-bottom: 0.5rem; }
.value p { font-size: 0.95rem; }

/* SECTION HEAD */
.section-head { text-align: center; max-width: 700px; margin: 0 auto 3rem; }
.section-head .eyebrow { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.section-head h2 { margin-bottom: 1rem; }
.section-head p { font-size: 1.1rem; }

/* SERVICES GRID */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.service-card {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.service-icon {
  width: 52px; height: 52px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { font-size: 0.97rem; }

/* SPLIT */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.split-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; outline: 1px solid rgba(31,45,51,0.08); }
.split-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split-text h2 { margin-bottom: 1.25rem; }
.split-text p { margin-bottom: 1rem; font-size: 1.05rem; }

/* TESTIMONIALS */
.testimonials { background: #fff; }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.testi-card {
  background: var(--cream);
  padding: 2rem;
  border-radius: var(--radius);
  position: relative;
}
.testi-card::before {
  content: '"';
  position: absolute;
  top: 0.5rem; left: 1.5rem;
  font-family: 'Lora', serif;
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
}
.testi-quote { font-style: italic; color: var(--ink); margin: 1.5rem 0 1rem; font-size: 1.02rem; line-height: 1.7; }
.testi-author { font-weight: 600; color: var(--primary); }
.testi-loc { font-size: 0.85rem; color: var(--muted); }

/* CTA STRIP */
.cta-strip {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 4rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  margin: 2rem auto;
  max-width: var(--max);
}
.cta-strip h2 { color: #fff; margin-bottom: 1rem; }
.cta-strip p { color: rgba(255,255,255,0.9); font-size: 1.1rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-strip .btn { background: var(--accent); color: var(--ink); }
.cta-strip .btn:hover { background: #d4943d; }

/* CONTACT FORM */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { background: #fff; padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.contact-info h3 { margin-bottom: 1.5rem; color: var(--primary); }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.contact-item-icon { color: var(--primary); font-size: 1.25rem; flex-shrink: 0; margin-top: 0.15rem; }
.contact-item strong { display: block; color: var(--ink); margin-bottom: 0.15rem; }
.contact-item a, .contact-item span { color: var(--muted); font-size: 0.97rem; }
.contact-form { background: #fff; padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.form-row { margin-bottom: 1.25rem; }
.form-row label { display: block; font-weight: 500; margin-bottom: 0.5rem; color: var(--ink); font-size: 0.95rem; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--cream);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--primary); background: #fff;
}
.form-row input.invalid, .form-row textarea.invalid, .form-row select.invalid {
  border-color: #d04a3e;
  background: #fff7f6;
  animation: shake 0.32s cubic-bezier(.36,.07,.19,.97);
}
.form-row.invalid label { color: #d04a3e; }
.form-hint {
  display: none;
  color: #d04a3e;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  font-weight: 500;
}
.form-row.invalid .form-hint { display: block; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

/* FORM SUCCESS */
.form-success {
  background: #fff;
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.form-success.in { opacity: 1; transform: translateY(0); }
.form-success-inner { max-width: 460px; margin: 0 auto; }
.form-success-check {
  width: 88px; height: 88px;
  margin: 0 auto 1.5rem;
}
.form-success-check svg {
  width: 100%; height: 100%;
}
.fs-circle {
  stroke: #3d8b5f;
  stroke-width: 2.5;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: fsDrawCircle 0.7s cubic-bezier(.65,.0,.45,1) 0.15s forwards;
}
.fs-check {
  stroke: #3d8b5f;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: fsDrawCheck 0.45s cubic-bezier(.65,.0,.45,1) 0.75s forwards;
}
@keyframes fsDrawCircle { to { stroke-dashoffset: 0; } }
@keyframes fsDrawCheck  { to { stroke-dashoffset: 0; } }
.form-success-heading {
  font-family: 'Lora', serif;
  font-size: 1.8rem;
  color: var(--ink);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fsFadeIn 0.5s ease 1.05s forwards;
}
body.lang-zh .form-success-heading { font-family: 'Noto Serif TC', 'Lora', serif; }
.form-success-sub {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fsFadeIn 0.5s ease 1.2s forwards;
}
.form-success-reset {
  opacity: 0;
  animation: fsFadeIn 0.5s ease 1.35s forwards;
}
@keyframes fsFadeIn { to { opacity: 1; } }

/* FORM ERROR */
.form-error-box {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: #fdecea;
  border-left: 4px solid #d04a3e;
  border-radius: 8px;
  color: #7a241b;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.form-error-box.in { opacity: 1; transform: translateY(0); }
.form-error-box strong { display: block; margin-bottom: 0.2rem; }
.form-error-box span { font-size: 0.92rem; }
.form-row textarea { resize: vertical; min-height: 120px; }
.form-submit { width: 100%; margin-top: 0.5rem; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; text-align: center; }

/* PAGE HEADER */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 6rem 0 4rem;
  text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: 1rem; }
.page-header p { color: rgba(255,255,255,0.9); font-size: 1.15rem; max-width: 640px; margin: 0 auto; }

/* FOOTER */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
  margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .logo { color: #fff; margin-bottom: 1rem; }
.footer-logo img {
  height: 56px;
  width: 56px;
  border-radius: 50%;
}
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.95rem; max-width: 320px; }
footer h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; font-family: 'Inter', sans-serif; font-weight: 600; }
footer ul { list-style: none; }
footer li { margin-bottom: 0.6rem; }
footer a { color: rgba(255,255,255,0.65); font-size: 0.93rem; }
footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
}

/* BAND (alt bg) */
.band-cream { background: linear-gradient(160deg, #faf7f2 0%, #f4ede0 50%, #fdf4e6 100%); }
.band-white { background: #fff; }
.band-soft { background: var(--primary-light); }

/* REVEAL ON SCROLL */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
