/* 紡紡布行官方網站 - 文青風格樣式 */
/* 色票：米白背景、暖灰、墨色文字、焦茶點綴 */

:root {
  --bg-cream: #faf8f5;
  --bg-warm: #f5f0e8;
  --text-ink: #2c2c2c;
  --text-muted: #5c5c5c;
  --accent: #8b6914;
  --accent-soft: #c4a84a;
  --border: #e8e4dc;
  --serif: "Noto Serif TC", "Source Han Serif TC", Georgia, serif;
  --sans: "Noto Sans TC", "PingFang TC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-ink);
  background: var(--bg-cream);
}

/* 版心 */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 導覽 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(250, 248, 245, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 商標：外框焦茶色、內文墨色 */
.logo_animation .logo-frame {
  fill: var(--accent-soft);
}
.logo_animation .logo-text {
  fill: var(--text-ink);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-ink);
}
.logo-header {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.logo-word {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* 漢堡按鈕：直向時顯示，橫向時隱藏 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-ink);
  border-radius: 8px;
  transition: background 0.2s;
}
.nav-toggle:hover,
.nav-toggle:focus {
  background: var(--border);
  outline: none;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  margin: 0 auto;
  transition: transform 0.2s, opacity 0.2s;
}
.site-header.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-header.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg-cream) 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("../img/6310050324185110.jpg") center / cover no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero-logo {
  margin-bottom: 1rem;
}
.logo-hero {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  display: block;
}

.hero-tag {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-ink);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--text-ink);
  color: var(--bg-cream);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--bg-cream);
}

/* 區塊標題 */
.section {
  padding: 4rem 0;
}

.section-tag {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-ink);
  margin: 0 0 1.5rem;
}

.section p {
  color: var(--text-muted);
  margin: 0 0 1rem;
  max-width: 640px;
}

/* 關於我們 */
.about {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 1.5rem;
}
.about-text p {
  max-width: none;
}
.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-images img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid var(--border);
}
@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
  }
  .about-images {
    order: -1;
    grid-template-columns: 1fr;
  }
}

/* 服務 / 特色 */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.feature-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-ink);
  margin: 0 0 0.5rem;
}

.feature-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* 店面日常 / 宣傳圖 */
.gallery {
  background: #fff;
  border-top: 1px solid var(--border);
}
.gallery-desc {
  margin-bottom: 1.5rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.gallery-item {
  overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.03);
}

/* 聯絡區塊 */
.contact {
  background: var(--bg-warm);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.contact-item h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-ink);
  margin: 0 0 0.5rem;
}

.contact-item p,
.contact-item a {
  color: var(--text-muted);
  margin: 0;
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--accent);
}

/* 頁尾 */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 響應式：直向手機改漢堡選單，避免選單換行撐高頂部 */
@media (max-width: 768px) {
  .site-header .container {
    position: relative;
    flex-wrap: wrap;
  }
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 -1.5rem; /* 對齊 container 左右 padding，使下拉全寬 */
    background: rgba(250, 248, 245, 0.98);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  }
  .site-header.is-open .main-nav {
    max-height: 280px;
    opacity: 1;
  }
  .nav-links {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }
  .nav-links li {
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child {
    border-bottom: none;
  }
  .nav-links a {
    display: block;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    min-height: 44px;
    line-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
  }
  .nav-links a:hover {
    background: var(--bg-warm);
    color: var(--accent);
  }
}
@media (max-width: 640px) {
  .hero {
    min-height: 75vh;
    padding: 5rem 1rem 3rem;
  }
  .section {
    padding: 3rem 0;
  }
}
