/* ============================================================
   CGAJC — 創革智造顧問｜style.css
   Mobile-first responsive design. Breakpoints: 768px (tablet), 1024px (desktop)
   ============================================================ */

:root{
  --ink: #1c2b3a;
  --ink-soft: #2d4356;
  --paper: #faf8f5;
  --paper-alt: #f1ece3;
  --accent: #d98e3c;
  --accent-dark: #b9701f;
  --line: #e4ded4;
  --muted: #5b6b7a;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(28,43,58,0.08);
  --max-width: 1180px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei",
          "Segoe UI", Roboto, "Noto Sans TC", sans-serif;
}

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

html{ scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body{
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a{ color: inherit; text-decoration: none; }

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

.container{
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 999;
}
.skip-link:focus{ left: 12px; top: 12px; }

.icon{
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* ---------------- Buttons ---------------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  min-height: 48px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn-primary{
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(217,142,60,0.35);
}
.btn-primary:hover, .btn-primary:focus-visible{
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-lg{ padding: 16px 34px; font-size: 1.05rem; }

/* ---------------- Header / Nav ---------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(250,248,245,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand{
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
}
.brand-mark{
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.brand-full{
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

/* hamburger */
.nav-toggle{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 200;
}
.nav-toggle span{
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform .25s ease, opacity .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); }

.primary-nav{
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 12px 20px 32px;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
}
.primary-nav.is-open{ transform: translateX(0); }

.nav-link{
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 1.05rem;
}
.nav-cta{
  margin-top: 16px;
  background: var(--accent);
  color: var(--ink);
  text-align: center;
  border-radius: 999px;
  padding: 14px;
  border-bottom: none;
}

/* ---------------- Hero ---------------- */
.hero{ padding: 56px 0 48px; }
.hero-inner{ max-width: 780px; }

.eyebrow{
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero-title{
  font-size: clamp(1rem, 5.8vw, 2.6rem);
  line-height: 1.35;
  margin: 0 0 20px;
  font-weight: 800;
  white-space: nowrap;
}
.hero-title .cross{ color: var(--accent); }

.hero-sub{
  font-size: clamp(1rem, 2.3vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 28px;
}

.pain-list{ display: grid; gap: 14px; margin-bottom: 32px; }
.pain-list li{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  color: var(--ink-soft);
}
.pain-list .icon{ color: var(--accent-dark); margin-top: 2px; }

.hero-cta-note{
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------------- Context / stat ---------------- */
.context{
  background: var(--ink);
  color: var(--paper);
  padding: 44px 0;
}
.context-inner{ display: grid; gap: 28px; }
.stat-block{ max-width: 640px; }
.stat-number{
  font-size: clamp(2.6rem, 10vw, 3.6rem);
  font-weight: 800;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}
.stat-number span{ font-size: 0.5em; }
.stat-caption{ margin: 10px 0 6px; font-size: 1.05rem; }
.stat-source{ font-size: 0.82rem; color: #b7c2cc; }
.stat-source a{ color: #e5c793; text-decoration: underline; }
.context-text{
  max-width: 640px;
  font-size: 1.05rem;
  color: #d9e0e6;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
}

/* ---------------- Section headings ---------------- */
.section-title{
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  margin: 0 0 10px;
  text-align: center;
}
.section-title--left{ text-align: left; }
.section-sub{
  text-align: center;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto 36px;
  font-size: 1rem;
}

.method, .cases, .why, .founder{ padding: 64px 0; }
.cases{ background: var(--paper-alt); }

/* ---------------- Method grid ---------------- */
.method-grid{
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.method-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}
.method-letter{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.method-card h3{ margin: 0 0 8px; font-size: 1.15rem; }
.method-card p{ margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------------- Case grid ---------------- */
.case-grid{
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.case-card{
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}
.case-tag{
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(217,142,60,0.12);
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 12px;
}
.case-card h3{ font-size: 1.1rem; margin: 0 0 12px; line-height: 1.5; }
.case-problem{ color: var(--muted); font-size: 0.92rem; margin: 0 0 10px; }
.case-problem::before{ content: "現況　"; font-weight: 700; color: var(--ink-soft); }
.case-solution{ color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 10px; }
.case-solution::before{ content: "做法　"; font-weight: 700; color: var(--ink); }
.case-fact{ font-size: 0.92rem; font-weight: 700; color: var(--ink); margin: 0; }
.case-fact::before{ content: "事實　"; font-weight: 700; color: var(--accent-dark); }

/* ---------------- Why us ---------------- */
.pull-quote{
  max-width: 760px;
  margin: 0 auto 40px;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  border-left: 4px solid var(--accent);
  padding: 4px 0 4px 20px;
  text-align: left;
}

.compare-grid{
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.compare-col{
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.compare-heading{ margin: 0 0 16px; font-size: 1.1rem; }
.compare-heading--other{ color: var(--muted); }
.compare-heading--us{ color: var(--accent-dark); }
.compare-list{ display: grid; gap: 12px; }
.compare-list li{
  padding-left: 24px;
  position: relative;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.compare-list li::before{
  content: "×";
  position: absolute; left: 0; top: 0;
  color: #b8442d;
  font-weight: 800;
}
.compare-list--us li::before{
  content: "✓";
  color: var(--accent-dark);
}

/* ---------------- Founder ---------------- */
.founder-inner{
  max-width: 720px;
  margin: 0 auto;
}
.founder-name{ font-size: 1.3rem; font-weight: 800; margin: 4px 0 2px; }
.founder-role{ color: var(--accent-dark); font-weight: 700; margin: 0 0 18px; }
.founder-list{ display: grid; gap: 12px; }
.founder-list li{
  padding-left: 22px;
  position: relative;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.founder-list li::before{
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------------- Contact ---------------- */
.contact{
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 72px;
}
.contact-inner{ text-align: center; max-width: 620px; margin: 0 auto; }
.contact .section-title{ color: var(--white); }
.contact .section-sub{ color: #c9d2da; }
.contact-email{ margin-top: 18px; font-size: 0.95rem; color: #c9d2da; }
.contact-email a{ color: var(--accent); text-decoration: underline; }

/* ---------------- Footer ---------------- */
.site-footer{
  background: #14202b;
  color: #9fb0bd;
  padding: 28px 0;
}
.footer-inner{
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  font-size: 0.85rem;
}
.footer-brand-name{ color: var(--white); font-weight: 700; margin: 0; }
.footer-brand-en{ margin: 2px 0 0; }
.footer-copyright{ margin: 0; }

/* ============================================================
   Tablet — 768px+
   ============================================================ */
@media (min-width: 768px){
  .container{ padding: 0 32px; }

  .nav-toggle{ display: none; }

  .primary-nav{
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 0;
    background: transparent;
    transform: none;
    overflow: visible;
  }
  .nav-link{ padding: 0; border-bottom: none; font-size: 0.95rem; }
  .nav-cta{ margin-top: 0; padding: 10px 20px; }

  .hero{ padding: 88px 0 72px; }

  .method-grid{ grid-template-columns: repeat(2, 1fr); }
  .case-grid{ grid-template-columns: repeat(2, 1fr); }
  .compare-grid{ grid-template-columns: repeat(2, 1fr); }

  .context-inner{ grid-template-columns: 1fr 1fr; align-items: center; }
  .context-text{ border-top: none; border-left: 1px solid rgba(255,255,255,0.15); padding-top: 0; padding-left: 32px; }

  .footer-inner{ flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ============================================================
   Desktop — 1024px+
   ============================================================ */
@media (min-width: 1024px){
  .method-grid{ grid-template-columns: repeat(5, 1fr); }
  .case-grid{ grid-template-columns: repeat(4, 1fr); }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; }
}
