/* =====================================================
   Custom Properties
   ===================================================== */
:root {
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --text: #1a1a1a;
  --accent: #1e3a5f;
  --accent-hover: #162d4a;
  --muted: #666666;
  --border: #e5e5e5;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 5px;
  --max-w: 820px;
}

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

body, h1, h2, h3, h4, p, ul, figure {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

ul {
  list-style: none;
  padding: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =====================================================
   Typography
   ===================================================== */
h1 {
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

/* =====================================================
   Layout
   ===================================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-intro {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  margin-top: 0.25rem;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 1rem 0;
}

.wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark:hover {
  text-decoration: none;
  opacity: 0.8;
}

/* =====================================================
   Hero
   ===================================================== */
.hero {
  padding: 6rem 0 5rem;
  background: var(--bg);
}

.hero h1 {
  max-width: 640px;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

/* =====================================================
   Button
   ===================================================== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

/* =====================================================
   About
   ===================================================== */
.about {
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 3rem;
  align-items: start;
}

.about-text h2 {
  margin-bottom: 1.25rem;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-text p + .credentials {
  margin-top: 0.75rem;
}

.credentials {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.75rem;
}

.credentials li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.cred-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.about-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.about-photo figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* =====================================================
   Services
   ===================================================== */
.services {
  background: var(--bg);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.service-icon {
  display: block;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

/* =====================================================
   How it works
   ===================================================== */
.how-it-works {
  background: var(--bg-alt);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.step-number {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* =====================================================
   FAQ
   ===================================================== */
.faq {
  background: var(--bg);
}

.faq h2 {
  margin-bottom: 1.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item summary {
  padding: 1.1rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text);
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '';
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.2s ease;
}

.faq-item[open] > summary::after {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 0 1.1rem;
}

/* =====================================================
   Contact
   ===================================================== */
.contact {
  background: var(--bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-wechat h3 {
  margin-bottom: 1rem;
}

.contact-wechat img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.wechat-id {
  font-size: 0.9rem;
  color: var(--muted);
}

.placeholder-text {
  font-style: italic;
}

.email-link {
  font-weight: 600;
}

.contact-form-col > p {
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.required {
  color: #c0392b;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

textarea {
  resize: vertical;
}

.form-group--checkbox {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
}

.field-error {
  display: block;
  color: #c0392b;
  font-size: 0.82rem;
  margin-top: 0.25rem;
  min-height: 1.1em;
}

input.invalid,
textarea.invalid {
  border-color: #c0392b;
}

.form-success {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: #edf7ed;
  border: 1px solid #b7dfb8;
  border-radius: var(--radius);
  color: #2d6a2e;
  font-weight: 500;
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-footer p,
.site-footer nav {
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer nav a {
  color: var(--muted);
}

.site-footer nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* =====================================================
   Legal pages
   ===================================================== */
.legal-main {
  padding: 4rem 0 5rem;
}

.legal-main h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.placeholder-block {
  padding: 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: #fffbf0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.placeholder-block strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* =====================================================
   Responsive — 640px breakpoint
   ===================================================== */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.45rem; }

  section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 3rem; }

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

  .about-photo {
    order: -1;
    max-width: 260px;
  }

  .about-photo figcaption {
    text-align: left;
  }

  .service-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

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

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =====================================================
   Focus / Accessibility
   ===================================================== */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

input:focus-visible,
textarea:focus-visible {
  outline: none;
}
