/* ==========================================================
   群豐管理顧問 Rich Group Consulting
   Primary: #1E67B0  Accent: #F6D228
   ========================================================== */
:root {
  --primary: #1E67B0;
  --primary-deep: #14497F;
  --primary-ink: #0E3B66;
  --primary-soft: #EAF2FB;
  --accent: #F6D228;
  --accent-soft: #FDF6DD;
  --ink: #1B2A3A;
  --ink-light: #54677A;
  --line: #E3EAF2;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(14, 59, 102, .12);
  --font-body: 'Noto Sans TC', sans-serif;
  --font-en: 'Montserrat', 'Noto Sans TC', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  line-height: 1.75;
  overflow-x: hidden;
}

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

.container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- 通用 ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .02em;
}
.section-desc { margin-top: 12px; color: var(--ink-light); }

.section-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(30, 103, 176, .18);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-head.light .section-tag {
  color: var(--accent);
  background: rgba(246, 210, 40, .12);
  border-color: rgba(246, 210, 40, .35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .05em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary-ink);
  box-shadow: 0 10px 26px rgba(246, 210, 40, .38);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(246, 210, 40, .5); }
.btn-ghost {
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-3px); }
.btn-block { width: 100%; }

/* 進場動畫 */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 導覽列 ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.navbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px rgba(14, 59, 102, .08); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--primary-ink);
  display: grid; place-items: center;
  flex: none;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.06rem; letter-spacing: .06em; color: var(--primary-ink); }
.brand-text small { font-family: var(--font-en); font-size: .6rem; letter-spacing: .18em; color: var(--ink-light); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  transition: color .25s;
}
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .3s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--primary); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: background .25s, transform .25s;
}
.nav-cta:hover { background: var(--primary-deep); transform: translateY(-2px); }

.nav-admin {
  margin-left: 18px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--primary);
  border: 1.5px solid rgba(30, 103, 176, .35);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background .25s, color .25s, transform .25s;
}
.nav-admin:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--primary-ink);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 130px 0 90px;
  color: #fff;
  background:
    radial-gradient(1200px 600px at 85% -10%, #2E86D8 0%, transparent 55%),
    linear-gradient(135deg, var(--primary-ink) 0%, var(--primary-deep) 45%, var(--primary) 100%);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 60% 30%, #000 30%, transparent 75%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.glow-a { width: 420px; height: 420px; background: rgba(246, 210, 40, .22); top: -120px; right: 8%; animation: float 9s ease-in-out infinite; }
.glow-b { width: 360px; height: 360px; background: rgba(120, 190, 255, .28); bottom: -140px; left: -80px; animation: float 11s ease-in-out infinite reverse; }

@keyframes float { 50% { transform: translateY(-30px); } }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero-eyebrow {
  font-family: var(--font-en);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .28em;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: .02em;
}
.hero-title em {
  font-style: normal;
  position: relative;
  color: var(--accent);
}

.hero-sub {
  margin: 22px 0 34px;
  max-width: 560px;
  font-size: 1.06rem;
  font-weight: 300;
  color: rgba(255, 255, 255, .85);
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.stat { display: flex; flex-direction: column; }
.stat strong {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}
.stat span { font-size: .85rem; color: rgba(255, 255, 255, .72); letter-spacing: .08em; }

/* 燈泡卡 */
.hero-visual { display: grid; place-items: center; }
.bulb-card {
  position: relative;
  width: min(340px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 32px;
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
  animation: bob 6s ease-in-out infinite;
}
.bulb-card img {
  width: 78%;
  filter: drop-shadow(0 0 38px rgba(246, 210, 40, .5));
}
@keyframes bob { 50% { transform: translateY(-16px) rotate(-1deg); } }

.orbit {
  position: absolute;
  inset: -26px;
  border: 1px dashed rgba(246, 210, 40, .4);
  border-radius: 50%;
  animation: spin 26s linear infinite;
}
.orbit-2 {
  inset: -52px;
  border-color: rgba(255, 255, 255, .18);
  animation-duration: 40s;
  animation-direction: reverse;
}
.orbit::after {
  content: '';
  position: absolute;
  top: -7px; left: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(246, 210, 40, .9);
}
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute;
  left: 50%; bottom: 28px;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint { 60% { transform: translateY(16px); opacity: 0; } 100% { transform: translateY(16px); opacity: 0; } }

/* ---------- 關於 ---------- */
.about { background: linear-gradient(180deg, #fff 0%, var(--primary-soft) 100%); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.about-media { position: relative; }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-badge {
  position: absolute;
  right: -14px; bottom: 26px;
  background: var(--accent);
  color: var(--primary-ink);
  padding: 16px 22px;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(246, 210, 40, .4);
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}
.about-badge strong { font-family: var(--font-en); font-size: 1.05rem; }
.about-badge span { font-size: .8rem; opacity: .8; }

.about-copy .lead {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 16px;
}
.about-copy .lead mark {
  background: linear-gradient(transparent 55%, var(--accent) 55%);
  color: inherit;
  padding: 0 2px;
}
.about-copy > p:not(.lead) { color: var(--ink-light); }

.about-points { list-style: none; margin-top: 30px; display: grid; gap: 18px; }
.about-points li {
  display: flex;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.about-points li:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.about-points i {
  font-family: var(--font-en);
  font-style: normal;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 10px;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  flex: none;
}
.about-points strong { display: block; color: var(--primary-ink); }
.about-points span { font-size: .9rem; color: var(--ink-light); }

/* ---------- 服務 ---------- */
.services { background: #fff; }

.service-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); }
.service-card.featured {
  border-color: rgba(246, 210, 40, .7);
  box-shadow: 0 16px 44px rgba(246, 210, 40, .16);
}

.service-img { position: relative; overflow: hidden; aspect-ratio: 4/3; }
.service-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.service-card:hover .service-img img { transform: scale(1.07); }
.service-no {
  position: absolute;
  left: 16px; bottom: 16px;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary-ink);
  background: var(--accent);
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.service-body { padding: 26px 24px 30px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.service-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--primary-ink); }
.service-body > p { font-size: .94rem; color: var(--ink-light); }
.service-body ul { list-style: none; margin-top: auto; display: grid; gap: 8px; padding-top: 10px; }
.service-body li {
  position: relative;
  font-size: .9rem;
  color: var(--ink);
  padding-left: 20px;
}
.service-body li::before {
  content: '';
  position: absolute;
  left: 0; top: .52em;
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(246, 210, 40, .25);
}

/* ---------- 理念 ---------- */
.philosophy {
  background:
    radial-gradient(800px 400px at 15% 0%, rgba(246, 210, 40, .14), transparent 60%),
    linear-gradient(160deg, var(--primary-ink), var(--primary-deep));
  color: #fff;
}
.section-head.light h2 { color: #fff; }

.quote-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.quote-card {
  position: relative;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  padding: 44px 34px 36px;
  transition: transform .35s ease, background .35s ease;
  overflow: hidden;
}
.quote-card:hover { transform: translateY(-6px); background: rgba(255, 255, 255, .09); }

.quote-mark {
  position: absolute;
  top: 6px; left: 22px;
  font-family: var(--font-en);
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: .9;
  line-height: 1;
  pointer-events: none;
}

.quote-en {
  font-family: var(--font-en);
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 14px;
}
.quote-en-sm { font-size: .92rem; opacity: .6; margin: 0; }
.quote-zh { color: rgba(255, 255, 255, .8); letter-spacing: .04em; }
.quote-zh-lg {
  font-size: 1.32rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.7;
  margin-bottom: 14px;
}

.philosophy-foot {
  margin-top: 40px;
  text-align: center;
  color: rgba(255, 255, 255, .7);
  letter-spacing: .06em;
}

/* ---------- 聯絡 ---------- */
.contact { background: var(--primary-soft); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}

.contact-copy h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 12px;
}
.contact-copy > p { color: var(--ink-light); }

.contact-points { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.contact-points li {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 8px 22px rgba(14, 59, 102, .06);
}
.contact-points strong { display: block; color: var(--primary); font-size: .98rem; }
.contact-points span { font-size: .88rem; color: var(--ink-light); }

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 40px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-form label {
  display: grid;
  gap: 7px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary-ink);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #FAFCFE;
  transition: border-color .25s, box-shadow .25s;
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 103, 176, .12);
}
.contact-form .error { border-color: #D9534F; box-shadow: 0 0 0 4px rgba(217, 83, 79, .1); }

.form-note { font-size: .88rem; text-align: center; min-height: 1.2em; }
.form-note.ok { color: #2E8B57; font-weight: 700; }
.form-note.ng { color: #D9534F; font-weight: 700; }

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-ink);
  color: rgba(255, 255, 255, .75);
  padding: 52px 0 34px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.footer-brand { display: flex; align-items: center; gap: 14px; text-align: left; }
.footer-brand .brand-logo { width: 54px; height: 54px; }
.footer-brand strong { color: #fff; font-size: 1.1rem; letter-spacing: .06em; }
.footer-brand p { font-size: .85rem; color: var(--accent); }

.footer-address {
  font-style: normal;
  font-size: .92rem;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .7);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-address::before {
  content: '';
  width: 16px;
  height: 16px;
  flex: none;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: .9rem; transition: color .25s; }
.footer-links a:hover { color: var(--accent); }

.copyright {
  font-family: var(--font-en);
  font-size: .78rem;
  letter-spacing: .05em;
  opacity: .55;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  width: 100%;
}

/* ---------- 回頂部 ---------- */
.back-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 90;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(30, 103, 176, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s, transform .3s, visibility .3s, background .25s;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--primary-deep); }

/* ---------- RWD ---------- */
@media (max-width: 1100px) {
  .service-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-visual { order: -1; }
  .bulb-card { width: min(240px, 60vw); }
  .orbit { inset: -18px; }
  .orbit-2 { inset: -36px; }

  .about-grid, .contact-inner { grid-template-columns: 1fr; }
  .service-cards { grid-template-columns: 1fr 1fr; }
  .quote-row { grid-template-columns: 1fr; }
  .about-badge { right: 12px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-admin { margin-left: auto; margin-right: 10px; }
  .nav-links {
    position: fixed;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(14, 59, 102, .12);
    padding: 8px 24px 16px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, transform .3s, visibility .3s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-cta { text-align: center; margin-top: 10px; }

  .service-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .stat strong { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
