/* StandByBiz — shared stylesheet
   Brand: brand/standbybiz.yaml (Teal #0e4f4f + Amber #e07b39) */

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

:root {
  --teal: #0e4f4f;
  --teal2: #1a6b6a;
  --cream: #f7f9f8;
  --amber: #e07b39;
  --amber-light: #f0975c;
  --amber-dark: #b05a1f;
  --amber-border: rgba(224,123,57,0.25);
  --charcoal: #2c2c2c;
  --muted: #6b7280;
  --white: #ffffff;
  --bull-green: #27ae60;
  --bear-red: #c0392b;
  --warn-amber: #f39c12;
  --border: #e5e9e8;
  --row-alt: #f2f6f5;
  --font-heading: 'Noto Serif TC', serif;
  --font-body: 'Noto Sans TC', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal2); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--teal);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: 16px;
}
.logo {
  font-family: var(--font-heading); font-weight: 900; font-size: 1.15rem;
  color: var(--white); text-decoration: none; white-space: nowrap;
  order: 1;
}
.logo span { color: var(--amber-light); }
.nav-toggle-input { display: none; }
.main-nav { display: flex; gap: 4px; order: 2; }
.main-nav a {
  color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.88rem;
  padding: 6px 10px; border-radius: 6px; white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.12); color: var(--white); }
.header-actions { display: flex; align-items: center; gap: 10px; order: 3; }
.nav-cta {
  background: var(--amber); color: var(--white) !important; font-weight: 700;
  padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 0.88rem; white-space: nowrap;
}
.nav-cta:hover { background: var(--amber-light) !important; }
.lang-switch {
  color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.82rem; font-weight: 700;
  padding: 6px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.3); white-space: nowrap;
}
.lang-switch:hover { color: var(--white); border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.08); }
.nav-toggle-btn { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal2) 100%);
  color: var(--white); padding: 72px 0 64px; text-align: left;
}
.hero .eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.12em;
  color: var(--amber-light); border: 1px solid var(--amber-border);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-heading); font-weight: 900;
  font-size: clamp(1.7rem, 4.5vw, 2.7rem); line-height: 1.35; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--amber-light); }
.hero .lede { font-size: 1.05rem; color: rgba(255,255,255,0.85); max-width: 640px; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Two-column hero layout with illustration */
.hero-flex, .page-hero-flex { display: flex; align-items: center; gap: 36px; }
.hero-flex .hero-text, .page-hero-flex .hero-text { flex: 1 1 auto; min-width: 0; }
.hero-flex .hero-visual, .page-hero-flex .hero-visual {
  flex: 0 0 auto; width: 260px; background: rgba(255,255,255,0.06); border-radius: 14px; padding: 10px;
}
.hero-flex .hero-visual img, .page-hero-flex .hero-visual img { width: 100%; height: auto; display: block; border-radius: 8px; }
.page-hero-icon {
  display: inline-flex; width: 52px; height: 52px; border-radius: 12px; overflow: hidden;
  margin-bottom: 16px; box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.page-hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.card .icon img { width: 40px; height: 40px; border-radius: 9px; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 13px 26px; border-radius: 8px; font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease; border: none; cursor: pointer;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--white); }
.btn-primary:hover { background: var(--amber-light); }
.btn-whatsapp { background: #25d366; color: var(--white); }
.btn-whatsapp:hover { background: #2fe373; }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: var(--white); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--white); }
.section-title {
  font-family: var(--font-heading); font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--teal);
  margin-bottom: 12px; line-height: 1.4;
}
.section-sub { color: var(--muted); max-width: 680px; margin-bottom: 36px; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Stat strip ---------- */
.stat-strip { background: var(--teal); color: var(--white); padding: 40px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.stat .num {
  font-family: var(--font-heading); font-weight: 900; font-size: 1.9rem;
  color: var(--amber-light); line-height: 1.3;
}
.stat .label { font-size: 0.9rem; color: rgba(255,255,255,0.8); margin-top: 4px; }
.stat .src { font-size: 0.72rem; color: rgba(255,255,255,0.45); margin-top: 6px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 28px 24px; display: flex; flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 8px 24px rgba(14,79,79,0.10); transform: translateY(-2px); }
.card .icon { font-size: 1.8rem; margin-bottom: 12px; }
.card h3 {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem;
  color: var(--teal); margin-bottom: 8px;
}
.card .tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 4px;
  padding: 2px 8px; margin-bottom: 10px; width: fit-content;
}
.tag-must { background: rgba(192,57,43,0.1); color: var(--bear-red); }
.tag-common { background: rgba(243,156,18,0.12); color: #b0740c; }
.tag-value { background: rgba(39,174,96,0.1); color: #1d8a4c; }
.card p { font-size: 0.92rem; color: var(--muted); flex: 1; }
.card .card-link {
  margin-top: 16px; font-weight: 700; font-size: 0.92rem;
  color: var(--amber-dark); text-decoration: none;
}
.card .card-link:hover { text-decoration: underline; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; }
.step {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 26px 22px;
}
.step .n {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--teal); color: var(--amber-light);
  font-family: var(--font-heading); font-weight: 900; font-size: 1.1rem; margin-bottom: 14px;
}
.step h3 { font-size: 1.02rem; color: var(--teal); margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Checklists ---------- */
.check-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.check-box { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 26px; }
.check-box h3 { font-size: 1.05rem; color: var(--teal); margin-bottom: 14px; font-family: var(--font-heading); }
.check-box ul { list-style: none; }
.check-box li { padding-left: 30px; position: relative; margin-bottom: 10px; font-size: 0.94rem; }
.check-box li::before { position: absolute; left: 0; font-weight: 700; }
.check-yes li::before { content: "✓"; color: var(--bull-green); }
.check-no li::before { content: "✗"; color: var(--bear-red); }

/* ---------- Info table ---------- */
.info-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 0.94rem; }
.info-table th { background: var(--teal); color: var(--white); text-align: left; padding: 12px 16px; font-weight: 500; }
.info-table td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: top; }
.info-table tr:nth-child(even) td { background: var(--row-alt); }
.table-wrap { overflow-x: auto; }

/* ---------- Callout ---------- */
.callout {
  border-left: 4px solid var(--amber); background: var(--white);
  border-radius: 0 8px 8px 0; padding: 20px 24px; margin: 28px 0;
}
.callout.danger { border-left-color: var(--bear-red); }
.callout h4 { color: var(--teal); margin-bottom: 6px; font-size: 1rem; }
.callout p { font-size: 0.92rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 12px; padding: 0 22px;
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--teal); padding: 18px 0;
  list-style: none; position: relative; padding-right: 32px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--amber); font-size: 1.3rem; font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-body { padding: 0 0 18px; color: var(--muted); font-size: 0.94rem; }

/* ---------- Form ---------- */
.enquiry-form {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 36px; max-width: 720px; margin: 0 auto;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 6px; color: var(--charcoal); }
.form-group label .req { color: var(--bear-red); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-family: var(--font-body); font-size: 0.95rem; background: var(--cream); color: var(--charcoal);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: 2px solid var(--teal2); border-color: transparent;
}
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.checkbox-grid label {
  display: flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 400;
  background: var(--cream); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; cursor: pointer;
}
.checkbox-grid input { width: auto; accent-color: var(--amber); }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 14px; }

/* ---------- Interactive tools (calculator / checkup quiz) ---------- */
.calc-box {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 32px; max-width: 640px; margin: 0 auto;
}
.calc-box .btn { margin-top: 6px; }
.calc-result { max-width: 640px; margin: 24px auto 0; }
.calc-error { color: var(--bear-red); font-size: 0.9rem; margin-top: 10px; }
.calc-range {
  background: var(--teal); color: var(--white); border-radius: 10px;
  padding: 24px; text-align: center; margin-bottom: 16px;
}
.calc-range-label { font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-bottom: 6px; }
.calc-range-num { font-family: var(--font-heading); font-weight: 900; font-size: 1.7rem; color: var(--amber-light); }
.calc-note { font-size: 0.88rem; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }

.checkup-results { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.checkup-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px;
}
.checkup-row a { font-weight: 700; color: var(--teal2); }

/* ---------- Tool promo (homepage) ---------- */
.tool-promo {
  background: linear-gradient(135deg, var(--teal), var(--teal2));
  border-radius: 14px; padding: 40px 32px; text-align: center; color: var(--white);
}
.tool-promo .section-title { color: var(--white); }
.tool-promo .section-sub { color: rgba(255,255,255,0.82); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(160deg, var(--teal) 0%, var(--teal2) 100%); color: var(--white); padding: 56px 0 48px; }
.page-hero .crumb { font-size: 0.82rem; margin-bottom: 14px; }
.page-hero .crumb a { color: rgba(255,255,255,0.7); text-decoration: none; }
.page-hero .crumb a:hover { color: var(--white); }
.page-hero h1 { font-family: var(--font-heading); font-weight: 900; font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.35; margin-bottom: 12px; }
.page-hero .lede { color: rgba(255,255,255,0.85); max-width: 640px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--teal); color: var(--white); text-align: center; padding: 56px 0; }
.cta-band h2 { font-family: var(--font-heading); font-weight: 900; font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,0.8); margin-bottom: 26px; }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- Article (guides) ---------- */
.article-body { max-width: 760px; margin: 0 auto; }
.article-body h2 { font-family: var(--font-heading); color: var(--teal); font-size: 1.4rem; margin: 40px 0 14px; }
.article-body h3 { color: var(--teal); font-size: 1.1rem; margin: 28px 0 10px; }
.article-body p, .article-body li { font-size: 1rem; margin-bottom: 14px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 18px; }
.article-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal); color: rgba(255,255,255,0.75); padding: 48px 0 36px; font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 32px; }
.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 12px; }
.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; }
.site-footer a:hover { color: var(--amber-light); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.disclaimer {
  border-top: 1px solid rgba(255,255,255,0.15); padding-top: 22px;
  font-size: 0.75rem; color: rgba(255,255,255,0.5); line-height: 1.7;
}

/* ---------- Floating WhatsApp button (mobile) ---------- */
.floating-whatsapp { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 44px; }
  section { padding: 48px 0; }
  .enquiry-form { padding: 26px 20px; }
  .hero-flex .hero-visual, .page-hero-flex .hero-visual { display: none; }

  /* Mobile nav: CTA + hamburger always visible, link list collapses to a dropdown */
  .site-header .container { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .main-nav {
    order: 4; flex-basis: 100%; flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
  }
  .nav-toggle-input:checked ~ .main-nav { max-height: 480px; opacity: 1; margin-top: 14px; }
  .main-nav a {
    padding: 13px 6px; border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.98rem; white-space: normal;
  }
  .main-nav a:hover, .main-nav a.active { background: transparent; color: var(--amber-light); }
  .nav-toggle-btn {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 32px; height: 32px; cursor: pointer; flex-shrink: 0;
  }
  .nav-toggle-btn span {
    display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle-input:checked ~ .header-actions .nav-toggle-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-input:checked ~ .header-actions .nav-toggle-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .header-actions .nav-toggle-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Floating WhatsApp CTA — always reachable while scrolling long pages */
  .floating-whatsapp {
    display: flex; align-items: center; justify-content: center;
    position: fixed; right: 16px; bottom: 16px; z-index: 200;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  .floating-whatsapp svg { width: 28px; height: 28px; }

  /* Larger tap targets on touch */
  .btn { padding: 14px 24px; }
  .checkbox-grid label { padding: 12px 12px; }
  .faq summary { padding: 16px 0; }
}
