/* ============================================================
   Kobey Dev Services — Emergent-inspired, bilingual, fast.
   Dark editorial canvas, gold accent, serif/sans pairing.
   ============================================================ */

:root {
  --bg:          #050505;
  --bg-2:        #0a0a0a;
  --surface:     #111111;
  --surface-2:   #1a1a1a;
  --surface-3:   #222222;

  --ink:         #f5f2ea;
  --muted:       #a8a39a;
  --faint:       #6b665e;

  --accent:      #c9a96e;
  --accent-2:    #e8c78a;
  --accent-dark: #8f7345;

  --line:        rgba(245, 242, 234, 0.08);
  --line-2:      rgba(245, 242, 234, 0.14);

  --r:           14px;
  --r-lg:        18px;
  --r-pill:      999px;

  --shadow:      0 24px 60px -24px rgba(0,0,0,0.85);
  --glow:        0 0 80px -20px rgba(201, 169, 110, 0.22);

  --font-display: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --font-body:    "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container:   1180px;
  --pad:         clamp(1.1rem, 4.5vw, 2.25rem);
}

* { margin: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

:lang(zh) body { line-height: 1.8; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0.02em; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) h4 { font-weight: 600; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 0 0 12px 12px;
  font-weight: 600; z-index: 200; transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-body); font-weight: 500; font-size: 0.97rem;
  padding: 0.9rem 1.6rem; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background: var(--accent); color: #121212;
  box-shadow: 0 10px 30px -10px rgba(201, 169, 110, 0.45);
}
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 14px 36px -12px rgba(201, 169, 110, 0.6); }

.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(201, 169, 110, 0.08); }

.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 5, 5, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(5, 5, 5, 0.92); }

.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 1rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-display); font-weight: 600;
}
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%;
  font-size: 1.1rem; color: var(--accent);
}
.brand-name { font-size: 1.25rem; }

.nav-menu { display: flex; align-items: center; gap: 2rem; }
.nav-menu a {
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.02em; transition: color .15s ease;
}
.nav-menu a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-pill);
  padding: 0.35rem 0.7rem; color: var(--muted); font-size: 0.82rem; cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--ink); }
.lang-option { transition: color .2s ease; }
.lang-option.active { color: var(--accent); font-weight: 600; }
.lang-divider { opacity: 0.4; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 90vh;
  padding: clamp(5rem, 14vh, 10rem) 0 clamp(4rem, 10vh, 7rem);
  overflow: clip;
}
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 80vh; pointer-events: none; z-index: 0;
  background:
    radial-gradient(700px 420px at 18% 10%, rgba(201, 169, 110, 0.14), transparent 65%),
    radial-gradient(500px 360px at 85% 5%, rgba(232, 199, 138, 0.08), transparent 60%);
  filter: blur(10px);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }

.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.74rem;
  color: var(--accent); margin-bottom: 1.4rem;
}
:lang(zh) .eyebrow { letter-spacing: 0.1em; }

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.02; margin-bottom: 1.6rem;
}
.hero-title em { font-style: italic; color: var(--accent-2); }
.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--muted);
  max-width: 620px; margin-bottom: 2.4rem;
}
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.hero-note {
  color: var(--faint); font-size: 0.95rem;
}

/* ---------- section utilities ---------- */
.section { padding: clamp(4rem, 10vh, 7rem) 0; position: relative; }
.section-approach { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-work { background: var(--bg); }
.section-services { background: var(--bg-2); border-top: 1px solid var(--line); }
.section-process { background: var(--bg); }
.section-pricing { background: var(--bg-2); border-top: 1px solid var(--line); }
.section-contact { background: var(--bg); border-top: 1px solid var(--line); }

.section-label {
  font-family: var(--font-body); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem;
  color: var(--faint); margin-bottom: 1.2rem;
}
:lang(zh) .section-label { letter-spacing: 0.1em; }

.section-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  max-width: 850px; margin-bottom: 1.2rem;
}
.section-title span { display: block; }
.section-subtitle {
  color: var(--muted); font-size: 1.1rem; max-width: 620px;
}
.section-body {
  color: var(--muted); font-size: 1.1rem; max-width: 620px; margin-top: 2rem;
}

/* ---------- approach ---------- */
.section-approach .section-title { max-width: 920px; }

/* ---------- work / showcase ---------- */
.showcase { display: flex; flex-direction: column; gap: clamp(2.5rem, 5vh, 4rem); margin-top: 3rem; }
.show-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  transition: border-color .3s ease, transform .3s ease;
}
.show-card:nth-child(even) { grid-template-columns: 1fr 1.1fr; }
.show-card:nth-child(even) .show-media { order: 2; }
.show-card:hover { border-color: var(--line-2); transform: translateY(-3px); }

.show-media { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.show-media img { width: 100%; height: auto; }
.show-tag {
  font-family: var(--font-body); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem;
  color: var(--accent); margin-bottom: .7rem;
}
:lang(zh) .show-tag { letter-spacing: 0.08em; }
.show-body h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .8rem; }
.show-body p { color: var(--muted); margin-bottom: 1.4rem; }
.show-links { display: flex; gap: .7rem; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: .35em;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  padding: .5rem 1rem; font-size: 0.88rem; font-weight: 500; color: var(--ink);
  transition: border-color .2s ease, background .2s ease;
}
.pill:hover { border-color: var(--accent); background: rgba(201, 169, 110, 0.08); }
.pill-live { border-color: rgba(201, 169, 110, 0.5); color: var(--accent); }

.work-more { margin-top: 2.5rem; color: var(--muted); }
.work-more a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.work-more a:hover { border-bottom-color: var(--accent); }

/* ---------- services ---------- */
.service-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin-top: 3rem; background: var(--line); border: 1px solid var(--line);
}
.service-card {
  background: var(--surface); padding: clamp(1.5rem, 3vw, 2.2rem);
  transition: background .2s ease;
}
.service-card:hover { background: var(--surface-2); }
.service-num {
  display: block; font-family: var(--font-body); font-size: 0.8rem;
  color: var(--faint); margin-bottom: 1.2rem;
}
.service-card h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-bottom: .7rem; }
.service-card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- process ---------- */
.process-grid { display: grid; grid-template-columns: 0.9fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.process-intro { position: sticky; top: 100px; align-self: start; }
.process-steps { list-style: none; padding: 0; display: grid; gap: 2rem; counter-reset: step; }
.process-steps li { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.process-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.step-num {
  font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
  color: var(--faint); width: 32px; text-align: center;
}
.process-steps h3 { font-size: 1.5rem; margin-bottom: .4rem; }
.process-steps p { color: var(--muted); font-size: 0.98rem; }

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: 3rem;
}
.pricing-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.4rem, 2.5vw, 2rem); display: flex; flex-direction: column;
  transition: border-color .2s ease;
}
.pricing-card:hover { border-color: var(--line-2); }
.pricing-card.popular { border-color: var(--accent-dark); position: relative; }
.popular-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #121212; font-size: 0.7rem; font-weight: 600;
  padding: 0.25rem 0.7rem; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: 0.05em;
}
.pricing-card h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.pricing-card .price {
  font-family: var(--font-display); font-size: 2rem; color: var(--accent); margin-bottom: .8rem;
}
.pricing-card > p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem; }
.pricing-card ul { list-style: none; padding: 0; margin-bottom: 1.5rem; flex: 1; }
.pricing-card li { position: relative; padding-left: 1.3rem; color: var(--muted); font-size: 0.9rem; margin-bottom: .55rem; }
.pricing-card li::before {
  content: "—"; position: absolute; left: 0; top: 0; color: var(--accent);
}

.care-plans { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.care-plans h3 { font-size: 1.6rem; margin-bottom: .5rem; }
.care-plans > p { color: var(--muted); max-width: 620px; margin-bottom: 1.5rem; }
.care-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.care-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; }
.care-card h4 { font-size: 1.15rem; margin-bottom: .3rem; }
.care-card .price { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); margin-bottom: .6rem; }
.care-card .price span { color: var(--faint); font-size: 0.9rem; }
.care-card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); }
.contact-list { list-style: none; padding: 0; margin-top: 2rem; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .7rem; color: var(--muted); }
.contact-list a { color: var(--ink); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.contact-list a:hover { border-bottom-color: var(--accent); }
.contact-list em { color: var(--faint); font-style: normal; font-size: .9rem; }

.contact-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2rem); display: grid; gap: 1.2rem;
}
.field { display: grid; gap: .45rem; }
.field label { font-weight: 500; font-size: .9rem; color: var(--ink); }
.field .opt { color: var(--faint); font-weight: 400; }
.contact-form input, .contact-form textarea {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; padding: .85rem 1rem; resize: vertical; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12); }
.field.invalid input, .field.invalid textarea { border-color: #ff6b6b; }
.error { color: #ff8585; font-size: .82rem; min-height: 1em; }
.form-note { margin-top: .3rem; padding: .8rem 1rem; border-radius: 10px; background: rgba(201, 169, 110, 0.1); border: 1px solid var(--line); font-size: .95rem; }

.need-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.need-chip {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  padding: .45rem .9rem; color: var(--muted); font-size: 0.85rem; cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.need-chip:hover { border-color: var(--accent); color: var(--ink); }
.need-chip.active { background: rgba(201, 169, 110, 0.12); border-color: var(--accent); color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 3rem 0; }
.footer-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem; align-items: center;
}
.footer-tag { color: var(--faint); font-size: 0.9rem; margin-top: .3rem; }
.footer-grid nav { display: flex; gap: 1.5rem; }
.footer-grid nav a { color: var(--muted); font-size: 0.9rem; transition: color .2s ease; }
.footer-grid nav a:hover { color: var(--ink); }
.footer-meta { text-align: right; color: var(--faint); font-size: 0.85rem; }
.copyright { margin-top: .3rem; }

/* ---------- reveal motion ---------- */
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
html.js .reveal { opacity: 0; transform: translateY(24px); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(5, 5, 5, 0.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
    padding: .5rem var(--pad) 1.2rem; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-menu a { padding: .9rem 0; border-bottom: 1px solid var(--line); }

  .process-grid { grid-template-columns: 1fr; }
  .process-intro { position: static; }

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

  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .footer-meta { text-align: center; }
  .footer-grid nav { justify-content: center; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-title { font-size: clamp(2.6rem, 11vw, 4rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .service-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .care-grid { grid-template-columns: 1fr; }

  .show-card, .show-card:nth-child(even) { grid-template-columns: 1fr; }
  .show-card:nth-child(even) .show-media { order: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
