/* ==========================================================================
   賴俊谷 Hamdi Lai — AI轉型 × 經營管理 × 永續碳管理顧問
   Design system
   ========================================================================== */

:root{
  --bg: #0a0b0c;
  --bg-alt: #101113;
  --bg-card: #16181b;
  --bg-card-hover: #1c1f23;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f4f3ef;
  --text-dim: #b7b6b0;
  --text-mute: #86847d;
  --accent: #35e6a0;
  --accent-soft: rgba(53,230,160,0.14);
  --accent-2: #5b8cff;
  --accent-2-soft: rgba(91,140,255,0.14);
  --grad: linear-gradient(95deg, var(--accent) 0%, var(--accent-2) 100%);
  --line-brand: #06c755;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  --maxw: 1180px;
  --nav-h: 64px;
  --ease: cubic-bezier(.16,.84,.44,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC","PingFang TC","Microsoft JhengHei",-apple-system,BlinkMacSystemFont,sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll{ overflow: hidden; }

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family: inherit; }

::selection{ background: var(--accent); color:#04140d; }

.container{
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px){ .container{ padding: 0 32px; } }
@media (min-width: 1200px){ .container{ padding: 0 40px; } }

.eyebrow{
  display:flex; align-items:center; gap:10px;
  font-family:"Space Grotesk","Noto Sans TC",sans-serif;
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}
.eyebrow::before{
  content:""; width:22px; height:2px; background: var(--grad); border-radius:2px; flex-shrink:0;
}

h1,h2,h3,h4{
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  line-height: 1.18;
}
h2{ font-size: clamp(26px, 4.4vw, 44px); }
h3{ font-size: clamp(19px, 2.4vw, 24px); }
p{ margin: 0 0 1em; color: var(--text-dim); }
.section-head{ max-width: 640px; margin-bottom: 44px; }
.section-head p{ font-size: 16px; }

.text-grad{
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

section{ padding: 84px 0; position: relative; }
@media (max-width:640px){ section{ padding: 60px 0; } }
.section-tight{ padding: 56px 0; }

.divider{ height:1px; background: var(--border); border:0; margin:0; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease);
  white-space: nowrap;
}
.btn:active{ transform: scale(.97); }
.btn-primary{ background: var(--text); color:#0a0b0c; }
.btn-primary:hover{ background: var(--accent); }
.btn-ghost{ border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }
.btn-line{ background: var(--line-brand); color:#fff; }
.btn-line:hover{ opacity:.88; }
.btn-block{ width:100%; }
.btn-sm{ padding: 10px 18px; font-size: 13.5px; }

/* ---------- Nav ---------- */
.nav{
  position: fixed; top:0; left:0; right:0; z-index: 100;
  height: var(--nav-h);
  display:flex; align-items:center;
  background: rgba(10,11,12,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-scrolled{ border-bottom-color: var(--border); background: rgba(10,11,12,0.92); }
.nav .container{ display:flex; align-items:center; justify-content:space-between; gap: 20px; }
.brand{ display:inline-flex; align-items:center; gap:8px; font-family:"Space Grotesk",sans-serif; font-weight:700; font-size:18px; letter-spacing:-.01em; line-height:1; }
.brand small{ font-family:"Noto Sans TC",sans-serif; font-weight:500; font-size:12.5px; color: var(--text-mute); }
.brand-logo{
  display:block;
  height: calc(var(--nav-h) - 24px); /* 40px in 64px nav */
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
@media (max-width: 899px){
  .brand-logo{ height: calc(var(--nav-h) - 28px); max-width: 132px; }
}
.nav-links{ display:none; align-items:center; gap: 34px; font-size: 14.5px; font-weight:500; color: var(--text-dim); }
.nav-links a{ position:relative; padding: 4px 0; transition: color .2s; }
.nav-links a:hover, .nav-links a.active{ color: var(--text); }
.nav-links a.active::after{ content:""; position:absolute; left:0; right:0; bottom:-4px; height:2px; background: var(--grad); border-radius:2px; }
.nav-cta{ display:none; }
.nav-actions{ display:flex; align-items:center; gap:12px; }
@media (min-width: 900px){
  .nav-links{ display:flex; }
  .nav-cta{ display:inline-flex; }
}

.nav-toggle{
  display:flex; flex-direction:column; justify-content:center; gap:5px;
  width: 40px; height:40px; border-radius: 10px; border:1px solid var(--border-strong);
  background: transparent; cursor:pointer;
}
.nav-toggle span{ width:16px; height:2px; background: var(--text); margin:0 auto; border-radius:2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.nav-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity:0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 900px){ .nav-toggle{ display:none; } }

.mobile-menu{
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
  background: rgba(8,9,10,0.98);
  backdrop-filter: blur(10px);
  padding: 28px 20px 40px;
  display:flex; flex-direction:column; gap: 4px;
  transform: translateY(-8px); opacity:0; pointer-events:none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  overflow-y:auto;
}
.mobile-menu.is-open{ transform: translateY(0); opacity:1; pointer-events:auto; }
.mobile-menu a{ font-size: 22px; font-weight:700; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.mobile-menu .btn{ margin-top: 20px; }
.mobile-contact{ margin-top: 28px; display:flex; gap:12px; }
@media (min-width:900px){ .mobile-menu{ display:none; } }

/* ---------- Hero (home) ---------- */
.hero{
  padding-top: calc(var(--nav-h) + 22px);
  padding-bottom: 40px;
  min-height: 100svh;
  display:flex; flex-direction:column; justify-content:center;
}
@media (min-width:900px){ .hero{ min-height: auto; padding-top: calc(var(--nav-h) + 64px); padding-bottom: 72px; } }

.hero-grid{
  display:flex; flex-direction:column; align-items:center; text-align:center; gap: 20px;
}
@media (min-width:900px){
  .hero-grid{
    display:grid;
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas: "id photo" "contact photo" "copy photo";
    align-items:center;
    text-align:left; column-gap: 56px; row-gap: 18px;
  }
  .hero-id{ grid-area: id; }
  .contact-row{ grid-area: contact; }
  .hero-copy-main{ grid-area: copy; }
  .hero-photo-wrap{ grid-area: photo; }
}

/* Compact identity block: photo + name, shown first on mobile so the
   photo/phone/LINE/email/Facebook block is visible in the first viewport */
.hero-top{ display:flex; flex-direction:column; align-items:center; gap:14px; }
@media (min-width:900px){ .hero-top{ display:contents; } }

.hero-photo-wrap{ position:relative; width: 104px; }
@media (min-width:480px){ .hero-photo-wrap{ width: 132px; } }
@media (min-width:900px){ .hero-photo-wrap{ width: 100%; max-width: 420px; } }
.hero-photo{
  position:relative; border-radius: 999px; overflow:hidden;
  aspect-ratio: 1/1;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
}
@media (min-width:900px){ .hero-photo{ border-radius: 28px; } }
.hero-photo img{ width:100%; height:100%; object-fit:cover; }
.hero-ring{
  position:absolute; inset:-6px; border-radius:999px;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent));
  z-index:-1; opacity:.55; filter: blur(2px);
}
@media (min-width:900px){ .hero-ring{ display:none; } }

.hero-eyebrow{ justify-content:center; }
@media (min-width:900px){ .hero-eyebrow{ justify-content:flex-start; } }

.hero-name{
  font-family:"Space Grotesk","Noto Sans TC",sans-serif;
  font-weight:700; font-size: 19px; margin:0;
}
.hero-name span{ color: var(--text-mute); font-weight:500; font-size:.85em; }

.hero-copy-main h1{
  font-size: clamp(28px, 6.6vw, 58px);
  margin-bottom: .28em;
}
.hero-copy-main h1 em{ font-style:normal; }
.name-en{
  display:block; font-family:"Space Grotesk",sans-serif; font-weight:500;
  font-size: clamp(13px,2vw,16px); letter-spacing:.06em; color: var(--text-mute); margin-top: 6px;
}
.hero-sub{
  font-size: clamp(15px, 2vw, 18px);
  max-width: 46ch;
  margin: 0 auto 20px;
}
@media (min-width:900px){ .hero-sub{ margin: 0 0 26px; } }

.contact-row{
  display:flex; justify-content:center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap;
}
@media (min-width:900px){ .contact-row{ justify-content:flex-start; margin-bottom:0; } }
.contact-btn{
  display:flex; align-items:center; justify-content:center;
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.contact-btn svg{ width:20px; height:20px; }
.contact-btn:hover{ transform: translateY(-3px); border-color: var(--accent); background: var(--accent-soft); }
.contact-btn.line:hover{ border-color: var(--line-brand); background: rgba(6,199,85,.14); }

.hero-cta{ display:flex; gap: 12px; justify-content:center; flex-wrap:wrap; }
@media (min-width:900px){ .hero-cta{ justify-content:flex-start; } }

.hero-meta{
  margin-top: 26px; display:flex; gap: 18px; justify-content:center; flex-wrap:wrap;
  font-size: 13px; color: var(--text-mute);
}
@media (min-width:900px){ .hero-meta{ justify-content:flex-start; } }
.hero-meta span{ display:inline-flex; align-items:center; gap:7px; }
.dot{ width:5px; height:5px; border-radius:999px; background: var(--accent); flex-shrink:0; }

/* ---------- Trust strip ---------- */
.trust{ padding: 30px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.trust-label{ font-size:12.5px; color: var(--text-mute); letter-spacing:.1em; text-transform:uppercase; margin-bottom:16px; text-align:center; }
@media (min-width:900px){ .trust-label{ text-align:left; } }
.trust-marquee{ display:flex; flex-wrap:wrap; gap: 12px 28px; justify-content:center; }
@media (min-width:900px){ .trust-marquee{ justify-content:flex-start; } }
.trust-marquee span{ font-family:"Space Grotesk",sans-serif; font-weight:600; font-size: 15px; color: var(--text-dim); opacity:.85; white-space:nowrap; }

/* ---------- Statement ---------- */
.statement{ text-align:center; }
.statement .big{
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 900;
  line-height: 1.35;
  max-width: 20ch;
  margin: 0 auto;
  letter-spacing:-.01em;
}
.statement .big span{ color: var(--text-mute); }

/* ---------- Cards / Grids ---------- */
.grid{ display:grid; gap: 20px; }
.grid-3{ grid-template-columns: repeat(1,1fr); }
@media (min-width:640px){ .grid-3{ grid-template-columns: repeat(2,1fr); } }
@media (min-width:1000px){ .grid-3{ grid-template-columns: repeat(3,1fr); } }
.grid-2{ grid-template-columns: repeat(1,1fr); }
@media (min-width:768px){ .grid-2{ grid-template-columns: repeat(2,1fr); } }

.card{
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.card:hover{ border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-3px); }
.card-icon{
  width: 46px; height:46px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.card-icon svg{ width:22px; height:22px; }
.card h3{ margin-bottom: .45em; }
.card p{ font-size: 14.5px; margin-bottom: 0; }
.card .tag-row{ margin-top:14px; }

.tag{
  display:inline-flex; align-items:center; font-size:12px; font-weight:600;
  padding: 5px 11px; border-radius:999px; background: var(--bg-alt);
  border:1px solid var(--border); color: var(--text-mute); margin: 0 6px 6px 0;
}

/* ---------- Credentials strip ---------- */
.cred-grid{ display:flex; flex-wrap:wrap; gap:10px; }
.cred-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 9px 16px; border-radius: 999px; background: var(--bg-card); border:1px solid var(--border);
  font-size: 13.5px; color: var(--text-dim); font-weight:500;
}
.cred-pill .dot{ background: var(--accent-2); }

/* ---------- Case teaser / cards ---------- */
.case-card{ overflow:hidden; padding:0; display:flex; flex-direction:column; }
.case-media{ aspect-ratio: 4/3; overflow:hidden; background: var(--bg-alt); }
.case-media img{ width:100%; height:100%; object-fit:cover; transition: transform .5s var(--ease); }
.case-card:hover .case-media img{ transform: scale(1.05); }
.case-body{ padding: 24px; flex:1; display:flex; flex-direction:column; }
.case-body .tag{ align-self:flex-start; margin-bottom: 12px; background: var(--accent-2-soft); border-color:transparent; color: var(--accent-2); }

/* ---------- Quote ---------- */
.quote-block{
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  font-size: clamp(17px,2.4vw,22px);
  font-weight: 500;
  color: var(--text);
  line-height:1.7;
  margin: 0;
}
.quote-block cite{ display:block; margin-top:16px; font-style:normal; font-size:14px; color: var(--text-mute); font-weight:400; }

/* ---------- Timeline (about) ---------- */
.timeline{ position:relative; padding-left: 26px; border-left: 1px solid var(--border); }
.timeline-item{ position:relative; padding-bottom: 30px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-item::before{
  content:""; position:absolute; left:-31px; top:4px; width:10px; height:10px; border-radius:999px;
  background: var(--bg); border:2px solid var(--accent);
}
.timeline-year{ font-family:"Space Grotesk",sans-serif; font-size:13px; color: var(--accent); font-weight:700; letter-spacing:.04em; margin-bottom:4px; }
.timeline-item h4{ font-size:16.5px; font-weight:700; margin: 0 0 3px; }
.timeline-item p{ font-size:14.5px; margin:0; }

/* ---------- FAQ ---------- */
.faq-item{ border-bottom:1px solid var(--border); }
.faq-item:first-child{ border-top:1px solid var(--border); }
.faq-q{
  width:100%; text-align:left; background:none; border:0; color: var(--text);
  padding: 20px 4px; display:flex; justify-content:space-between; align-items:center; gap:16px;
  font-size: 16px; font-weight:700; cursor:pointer;
}
.faq-q .plus{ flex-shrink:0; width:22px; height:22px; position:relative; }
.faq-q .plus::before,.faq-q .plus::after{ content:""; position:absolute; background: var(--accent); border-radius:2px; }
.faq-q .plus::before{ left:0; top:50%; width:100%; height:2px; transform:translateY(-50%); }
.faq-q .plus::after{ top:0; left:50%; width:2px; height:100%; transform:translateX(-50%); transition: transform .25s var(--ease); }
.faq-item.is-open .faq-q .plus::after{ transform:translateX(-50%) rotate(90deg); opacity:0; }
.faq-a{ max-height:0; overflow:hidden; transition: max-height .35s var(--ease); }
.faq-a p{ padding: 0 4px 20px; font-size:14.5px; }

/* ---------- Contact page ---------- */
.contact-grid{ display:grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px){ .contact-grid{ grid-template-columns: 1fr 1.15fr; gap: 48px; } }
.info-card{ background: var(--bg-card); border:1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; }
.info-list{ display:flex; flex-direction:column; gap: 18px; margin-top: 18px; }
.info-row{ display:flex; gap: 14px; align-items:flex-start; }
.info-row .ic{ width:40px; height:40px; border-radius:11px; background: var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.info-row .ic svg{ width:18px; height:18px; }
.info-row h4{ font-size:14.5px; margin:0 0 3px; font-weight:700; }
.info-row p{ font-size: 14.5px; margin:0; }
.info-row a{ color: var(--text); }
.info-row a:hover{ color: var(--accent); }

.field{ margin-bottom: 18px; }
.field label{ display:block; font-size:13.5px; font-weight:600; margin-bottom:7px; color: var(--text-dim); }
.field input, .field textarea{
  width:100%; background: var(--bg-alt); border:1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 13px 15px; color: var(--text); font-family:inherit; font-size:14.5px;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus{ outline:none; border-color: var(--accent); }
.field textarea{ min-height: 130px; resize: vertical; }
.form-note{ font-size:12.5px; color: var(--text-mute); margin-top:12px; }

.map-frame{ border-radius: var(--radius-md); overflow:hidden; border:1px solid var(--border); margin-top:24px; filter: grayscale(1) invert(0.92) contrast(0.9); }
.map-frame iframe{ width:100%; height:280px; border:0; display:block; }

/* ---------- CTA band ---------- */
.cta-band{
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border:1px solid var(--border);
  padding: 48px 28px;
  text-align:center;
  position:relative; overflow:hidden;
}
.cta-band::before{
  content:""; position:absolute; width:340px; height:340px; border-radius:999px;
  background: var(--grad); opacity:.16; filter: blur(60px); top:-120px; right:-80px;
}
.cta-band h2{ margin-bottom:.4em; }
.cta-band p{ max-width: 52ch; margin: 0 auto 26px; }
.cta-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; position:relative; }

/* ---------- Footer ---------- */
.footer{ padding: 56px 0 28px; border-top:1px solid var(--border); }
.footer-top{ display:flex; flex-direction:column; gap: 36px; margin-bottom: 40px; }
@media (min-width:768px){ .footer-top{ flex-direction:row; justify-content:space-between; } }
.footer-brand p{ max-width: 34ch; font-size:14px; margin-top:10px; }
.footer-cols{ display:flex; gap: 56px; flex-wrap:wrap; }
.footer-col h5{ font-size:12.5px; text-transform:uppercase; letter-spacing:.08em; color: var(--text-mute); margin-bottom:14px; }
.footer-col a, .footer-col span{ display:block; font-size:14px; color: var(--text-dim); margin-bottom:10px; }
.footer-col a:hover{ color: var(--accent); }
.footer-social{ display:flex; gap:10px; margin-top:6px; }
.footer-bottom{ display:flex; flex-direction:column; gap:10px; padding-top:24px; border-top:1px solid var(--border); font-size:12.5px; color: var(--text-mute); }
@media (min-width:768px){ .footer-bottom{ flex-direction:row; justify-content:space-between; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero{ padding-top: calc(var(--nav-h) + 52px); padding-bottom: 20px; }
.page-hero h1{ font-size: clamp(30px,5.6vw,50px); }
.breadcrumbs{ font-size:13px; color: var(--text-mute); margin-bottom:18px; }
.breadcrumbs a:hover{ color: var(--accent); }

/* ---------- Filters (cases page) ---------- */
.filter-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 36px; }
.filter-btn{
  padding: 9px 18px; border-radius:999px; border:1px solid var(--border-strong); background:transparent;
  color: var(--text-dim); font-size:13.5px; font-weight:600; cursor:pointer; transition: all .2s;
}
.filter-btn.is-active, .filter-btn:hover{ background: var(--text); color:#0a0b0c; border-color:var(--text); }

/* ---------- utils ---------- */
.mt-0{ margin-top:0; }
.center{ text-align:center; margin-left:auto; margin-right:auto; }
.reveal{ opacity:0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible{ opacity:1; transform:none; }
.skip-link{ position:absolute; left:-999px; top:0; background:var(--text); color:#0a0b0c; padding:10px 16px; border-radius:8px; z-index:999; }
.skip-link:focus{ left:16px; top:16px; }
