/* Fengfa One-page Site (No build tools required) */

/* =========================
   Base variables (只改這裡就能調整比例)
   ========================= */
:root{
  --bg:#0b0f14;
  --panel:rgba(255,255,255,.06);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.68);
  --line:rgba(255,255,255,.12);
  --accent:#9ae6ff;
  --accent2:#b4ffdf;
  --shadow: 0 16px 50px rgba(0,0,0,.35);
  --radius:18px;
  --container:1120px;

  /* Topbar / Brand sizing (完美比例) */
  --topbar-h: 76px;      /* Topbar 視覺高度（桌機） */
  --brand-mark: 80px;    /* Logo 外框大小 */
  --brand-radius: 18px;  /* Logo 外框圓角 */
  --brand-name: 26px;    /* 公司名稱字體大小 */
  --nav-font: 26px;      /* 選單字體大小 */

  /* LINE icon size */
  --line-size: 72px;
  --line-radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Noto Sans TC", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:var(--bg);
  color:var(--text);
  line-height:1.7;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.92}
code{background:rgba(255,255,255,.08); padding:.1rem .35rem; border-radius:8px; border:1px solid rgba(255,255,255,.12)}
.container{width:min(var(--container), calc(100% - 40px)); margin:0 auto;}

/* =========================
   Topbar（玻璃 + fixed 浮在背景上）
   ========================= */
.topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99999;

  background: rgba(0,0,0,0.30);
  backdrop-filter: blur(5px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow:none;
}

.topbar .topbar__inner,
.topbar .container{
  background: transparent !important;
}

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 0;
  gap: 16px;
}

/* =========================
   Brand（Logo + 公司名）
   ========================= */
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width:0;
}

.brand__mark{
  width: var(--brand-mark);
  height: var(--brand-mark);
  display:flex;
  align-items:center;
  justify-content:center;

  border-radius: var(--brand-radius);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
}

/* 放你的 SVG/PNG logo 用 */
.brand__logo{
  width: 110%;
  height: 110%;
  display:block;
  object-fit: contain;
}

.brand__name{
  font-weight: 800;
  font-size: var(--brand-name);
  letter-spacing: 0.02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* =========================
   Nav
   ========================= */
.nav{display:flex; gap:18px; align-items:center}

.nav__link{
  color: var(--muted);
  font-weight: 700;
  font-size: var(--nav-font);
  padding: 10px 12px;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease, transform .12s ease;
}

.nav__link:hover{
  background:rgba(255,255,255,.08);
  color:var(--text);
  transform: translateY(-1px);
}

.nav__link.is-active{background:rgba(255,255,255,.10); color:var(--text)}

.nav-toggle{
  display:none;
  width:46px; height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  cursor:pointer;
}
.nav-toggle span{display:block; width:18px; height:2px; background:rgba(255,255,255,.85); margin:4px auto; border-radius:2px;}

/* 手機：Topbar 高度略小、選單改彈出 */
@media (max-width: 840px){
  :root{
    --topbar-h: 64px;
    --brand-mark: 48px;
    --brand-name: 16px;
    --nav-font: 15px;
  }

  .nav-toggle{display:block}
  .nav{
    position: fixed;
    top: var(--topbar-h);
    right: 20px;
    display:none;
    flex-direction:column;
    gap:8px;
    padding:12px;
    border-radius:16px;
    background:rgba(11,15,20,.78);
    border:1px solid rgba(255,255,255,.10);
    box-shadow: var(--shadow);
    z-index: 99998;
  }
  .nav.is-open{display:flex}
  .nav__link{width:100%}
}

/* =========================
   Anchor 跳轉不被 topbar 蓋住
   ========================= */
.section{
  padding: 78px 0;
  scroll-margin-top: calc(var(--topbar-h) + 14px);
}
.section--alt{background:rgba(255,255,255,.03)}
.section__head{margin-bottom:22px}
.section__eyebrow{margin:0 0 6px; color:rgba(255,255,255,.55); letter-spacing:.20em; text-transform:uppercase; font-weight:800; font-size:12px;}
.section__title{margin:0; font-size: clamp(22px, 3.1vw, 34px);}

/* =========================
   Hero（背景滿版 cover，不留黑；內容往下讓 topbar）
   ========================= */
.hero{
  position:relative;
  min-height: 100svh;
  display:grid;
  place-items:center;

  /* ✅ 只推內容，不推背景 */
  padding-top: var(--topbar-h);
  overflow:hidden;
}

.hero__bg{
  position:absolute; inset:0;
  background-image: url("../images/background.jpg");
  background-size: cover;       /* ✅ 滿版（允許裁切） */
  background-position: center;  /* ✅ 置中裁切 */
  background-repeat:no-repeat;
  transform: scale(1.02);

  /* ✅ 不吃點擊 */
  pointer-events:none;
}
.hero__overlay{
  position:absolute; inset:0;
  background:
    radial-gradient(1200px 800px at 70% 20%, rgba(154,230,255,.18), transparent 60%),
    radial-gradient(900px 700px at 30% 70%, rgba(180,255,223,.14), transparent 62%),
    linear-gradient(to bottom, rgba(11,15,20,.22), rgba(11,15,20,.92));

  pointer-events:none;
}

.hero__content{position:relative; z-index:2; padding: 46px 0 78px;}
.hero__kicker{color:rgba(255,255,255,.75); letter-spacing:.18em; text-transform:uppercase; font-weight:700; margin:0 0 8px;}
.hero__title{font-size: clamp(32px, 6vw, 58px); line-height:1.08; margin:0 0 14px; letter-spacing:.02em;}
.hero__subtitle{max-width: 640px; color:rgba(255,255,255,.78); margin:0 0 26px; font-size: clamp(15px, 1.6vw, 18px);}
.hero__cta{display:flex; gap:12px; flex-wrap:wrap}

.scroll-hint{
  position:absolute; bottom:16px; z-index:3;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  color:rgba(255,255,255,.70);
  font-weight:700; letter-spacing:.14em; text-transform:uppercase; font-size:12px;
}
.scroll-hint i{width:2px; height:24px; background:rgba(255,255,255,.55); border-radius:999px; position:relative; overflow:hidden;}
.scroll-hint i::after{content:""; position:absolute; top:-10px; left:0; right:0; height:12px; background:rgba(255,255,255,.9); animation: scroll 1.4s infinite ease-in-out;}
@keyframes scroll{0%{transform:translateY(0)} 100%{transform:translateY(30px)}}

/* =========================
   Cards
   ========================= */
.card-grid{display:grid; grid-template-columns: 1.6fr 1fr; gap:16px; align-items:stretch;}
@media (max-width: 900px){.card-grid{grid-template-columns:1fr}}
.card{border-radius: var(--radius); background: var(--panel); border:1px solid rgba(255,255,255,.10); box-shadow: var(--shadow); padding:22px; height:100%;}
.card--wide{padding:26px}
.card__title{margin:0 0 8px; font-size:20px}
.card__text{margin:0; color:rgba(255,255,255,.74)}
.badge-list{list-style:none; padding:0; margin:16px 0 0; display:flex; flex-wrap:wrap; gap:8px;}
.badge{border-radius:999px; padding:6px 10px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.06); color:rgba(255,255,255,.80); font-weight:700; font-size:13px;}
.stat{margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.10)}
.stat__label{color:rgba(255,255,255,.60); font-weight:700; font-size:13px}
.stat__value{font-weight:800; font-size:18px; margin-top:4px}

/* =========================
   Services
   ========================= */
.service-grid{display:grid; grid-template-columns: repeat(4, 1fr); gap:14px;}
@media (max-width: 980px){.service-grid{grid-template-columns: repeat(2, 1fr)}}
@media (max-width: 540px){.service-grid{grid-template-columns: 1fr}}
.service{border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)); border:1px solid rgba(255,255,255,.10); box-shadow: var(--shadow); padding:18px;}
.service__title{margin:0 0 8px; font-size:18px}
.service__desc{margin:0; color:rgba(255,255,255,.72)}
.service--link{cursor:pointer; transition: transform .15s ease;}
.service--link:hover{transform: translateY(-2px)}

/* =========================
   Buttons & inputs
   ========================= */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 16px; border-radius: 14px; border:1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color:rgba(255,255,255,.92); font-weight:800; cursor:pointer; transition: transform .15s ease, background .2s ease;}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.10)}
.btn--primary{background: linear-gradient(135deg, rgba(154,230,255,.25), rgba(180,255,223,.18)); border-color: rgba(255,255,255,.18);}
.btn--ghost{background: rgba(255,255,255,.05)}
.btn--small{padding:10px 12px; border-radius:12px; font-weight:800; font-size:14px}

.input, .textarea, .select{
  width:100%;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  padding:12px 14px;
  outline:none;
}
.input::placeholder, .textarea::placeholder{color:rgba(255,255,255,.45)}
.textarea{min-height:160px; resize:vertical; padding:14px;}
.input:focus,.textarea:focus{border-color: rgba(154,230,255,.55); box-shadow: 0 0 0 4px rgba(154,230,255,.10);}

/* =========================
   Projects（你的 JS 用到）
   ========================= */
.is-hidden{display:none !important;}
.projects-head{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.projects-category{margin: 26px 0 12px; font-size: 18px; font-weight: 900; color: rgba(255,255,255,.92);}

.projects-grid{
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  align-items: start;
}
@media (max-width: 900px){
  .projects-grid{ grid-template-columns: 1fr; }
}
.project-item{width:100%; max-width:none;}
.project-title{margin:0 0 10px; font-size:16px; font-weight:900;}
.proj-desc{margin-top:10px; color:rgba(255,255,255,0.82); font-size:14px; line-height: 1.6;}

.proj-media{
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  aspect-ratio: 16 / 9;
}
.proj-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.proj-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.45);
  color: rgba(255,255,255,0.95);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform .15s ease, background .15s ease;
}
.proj-arrow--left{ left: 12px; }
.proj-arrow--right{ right: 12px; }
.proj-arrow:hover{
  background: rgba(0,0,0,0.65);
  transform: translateY(-50%) scale(1.06);
}
.proj-arrow span{font-size:26px; line-height:1;}

.proj-dots{
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
}
.proj-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.proj-dot.is-active{ background: rgba(255,255,255,0.95); }

/* =========================
   Contact / Footer
   ========================= */
.contact-actions{display:flex; justify-content:flex-end;}
.footer{margin-top:26px; padding:22px 0; border-top:1px solid rgba(255,255,255,.10);}
.footer__inner{display:flex; align-items:center; justify-content:space-between; gap:12px; color:rgba(255,255,255,.65); flex-wrap:wrap;}
.to-top{color:rgba(255,255,255,.75); font-weight:900}

/* =========================
   LINE FAB（裁掉留白 + 圓角一致）
   ========================= */
#lineFab{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: inline-block;
}
#lineFab.line-fab{
  width: var(--line-size);
  height: var(--line-size);
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  border-radius: var(--line-radius);
  cursor: pointer;
  transition: transform .12s ease;
}
#lineFab.line-fab img{
  width: 115%;
  height: 115%;
  object-fit: cover;
  object-position: center;
  position: relative;
  left: -7.5%;
  top: -7.5%;
  display: block;
}
#lineFab:hover{ transform: translateY(-1px) scale(1.03); }
#lineFab:focus{ outline: none; }

/* =========================
   LINE Modal
   ========================= */
.line-modal{
  position:fixed;
  inset:0;
  z-index:90;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background: rgba(0,0,0,.68);
}
.line-modal.is-open{display:flex;}
.modal__backdrop{position:absolute; inset:0;}
.modal__hint{margin-top:10px; color:rgba(255,255,255,.72); font-weight:700; text-align:center;}
.line-modal__panel{
  width:min(420px, 100%);
  border-radius: 22px;
  background: rgba(11,15,20,.92);
  border:1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.line-modal__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px 10px;
}
.line-modal__title{font-weight:900;}
.line-modal__close{
  width:38px; height:38px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  cursor:pointer;
}
.line-modal__body{padding:0 14px 16px;}
.line-modal__qr{
  width:100%;
  display:block;
  border-radius: 16px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
}
