/* ===== 樂原榞 品牌形象網站 ===== */
:root {
  --forest: #1D3326;
  --green: #2E4A36;
  --green-line: #4A6A4F;
  --sand: #F4F0E6;
  --sand-deep: #E9E3D3;
  --paper: #FFFDF7;
  --line: #E2DACA;
  --line-strong: #B9AE96;
  --ink: #1E2721;
  --text: #46514A;
  --muted: #5C665F;
  --gold: #D9B26F;
  --amber: #8A5A1E;
  --mist: #CFD6C9;
  --radius: 20px;
  --serif: "Noto Serif TC", "Noto Serif CJK TC", serif;
  --sans: "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); margin: 0; }
p { margin: 0; }
a { color: var(--green); }
a:hover { color: var(--forest); }
img { max-width: 100%; display: block; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--gold); color: var(--forest); padding: 8px 16px; z-index: 100;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 16px; line-height: 1.2;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--forest); }
.btn-gold:hover { background: #E4C48A; color: var(--forest); }
.btn-light { background: var(--sand); color: var(--forest); }
.btn-light:hover { background: #fff; color: var(--forest); }
.btn-outline { border: 1.5px solid var(--gold); color: var(--sand); font-weight: 500; }
.btn-outline:hover { background: rgba(217,178,111,.12); color: #fff; }
.btn-line { background: #06C755; color: #fff; }
.btn-line:hover { background: #05B14B; color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* ---------- 導覽列 ---------- */
.site-header { background: var(--forest); color: var(--sand); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--sand); text-decoration: none; }
.brand:hover { color: #fff; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; display: block; }
.brand span { font-family: var(--serif); font-weight: 900; font-size: 24px; letter-spacing: 4px; }
.site-nav { display: flex; align-items: center; gap: 4px 22px; font-size: 15px; }
.site-nav a:not(.btn) { color: #E6DFCD; text-decoration: none; padding: 10px 0; white-space: nowrap; }
.brand, .nav-cta { white-space: nowrap; }
.site-nav a:not(.btn):hover { color: var(--gold); }
.nav-cta { min-height: 42px; padding: 10px 20px; font-size: 15px; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--sand); transition: transform .2s, opacity .2s; }
.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); }

@media (max-width: 1240px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--forest); padding: 8px 24px 24px; border-top: 1px solid var(--green-line);
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 16px; }
  .nav-cta { margin-top: 16px; }
}

/* ---------- 主視覺 ---------- */
.hero { background: var(--forest); color: var(--sand); overflow: hidden; }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 96px; }
.hero-text { flex: 1 1 460px; min-width: 0; }
.hero-eyebrow { color: var(--gold); letter-spacing: 6px; font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.3; font-weight: 900; letter-spacing: 2px; }
.hero-lead { margin-top: 28px; max-width: 500px; color: var(--mist); font-size: 18px; }
.hero-visual { flex: 1 1 420px; min-width: 0; position: relative; height: 460px; }
.hero-photo {
  position: absolute; inset: 0 0 0 40px;
  border-radius: 220px 220px 24px 24px;
  border: 1px solid var(--green-line);
  background-color: var(--green);
  background-image: url("../images/hero.jpg"), radial-gradient(circle at 70% 30%, #3B5C44 0%, var(--green) 60%);
  background-size: cover; background-position: 52% center;
}
.hero-leaves { position: absolute; left: 0; bottom: -10px; }

/* ---------- 區塊通用 ---------- */
.section { padding: 104px 0; }
.section-sand { background: var(--sand-deep); }
.eyebrow { color: var(--amber); letter-spacing: 4px; font-size: 14px; font-weight: 700; }
.eyebrow-gold { color: var(--gold); }
.section h2, .band h2 { margin-top: 10px; font-size: clamp(30px, 3.6vw, 40px); line-height: 1.4; color: var(--forest); }
.lead { margin-top: 20px; max-width: 720px; color: var(--text); font-size: 17px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 56px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: 1fr; } }
.more-list { display: flex; flex-direction: column; gap: 8px; }
.grid-gap-top { margin-top: 48px; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 32px; display: flex; flex-direction: column; gap: 12px; text-align: left;
}
.card-flat { border-color: transparent; }
.card h3 { font-size: 22px; }
.card p, .card li { color: var(--text); }
.card ul { margin: 4px 0 0; padding-left: 20px; }
.grow { flex-grow: 1; }
.glyph { font-family: var(--serif); font-size: 72px; font-weight: 900; line-height: 1; color: var(--green); margin-bottom: 8px; }
.more { font-weight: 700; color: var(--green); }
.tag-box { font-size: 15px; background: #EEF1E8; border-radius: 10px; padding: 10px 14px; align-self: stretch; }
.kicker { color: var(--amber) !important; font-size: 14px; font-weight: 700; }

/* ---------- 品牌家族樹狀圖 ---------- */
.tree-root {
  margin: 48px auto 0; display: inline-flex; flex-direction: column; align-items: center;
  background: var(--forest); color: var(--sand); border-radius: var(--radius); padding: 24px 48px;
}
.tree-name { font-family: var(--serif); font-weight: 900; font-size: 30px; letter-spacing: 4px; }
.tree-sub { font-size: 14px; color: var(--mist); }
.tree-stem { width: 2px; height: 40px; background: var(--line-strong); margin: 0 auto; }
.tree-bar { width: calc(66.666% + 16px); height: 2px; background: var(--line-strong); margin: 0 auto; }
.tree-branches { margin-top: 0; }
.branch { display: flex; flex-direction: column; }
.branch::before { content: ""; display: block; width: 2px; height: 32px; background: var(--line-strong); margin: 0 auto; }
.branch .card { flex-grow: 1; padding: 28px; }
@media (max-width: 920px) {
  .tree-bar, .tree-stem { display: none; }
  .tree-root { margin-bottom: 8px; }
  .branch::before { height: 24px; }
}

.channels-label { margin: 48px 0 16px; color: var(--text); font-size: 15px; }
.pill-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pill-row-left { justify-content: flex-start; }
.pill {
  display: inline-flex; align-items: center; min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 22px; text-decoration: none;
}
.pill:hover { background: var(--paper); }

/* ---------- 知識專欄橫幅 ---------- */
.band { background: var(--green); color: var(--sand); }
.band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding-top: 88px; padding-bottom: 88px; }
.band-text { flex: 1 1 520px; min-width: 0; }
.band h2 { color: var(--sand); }
.band-text > p:last-child { margin-top: 16px; color: var(--mist); font-size: 17px; max-width: 560px; }

/* ---------- 合作洽詢 ---------- */
.mail-bar {
  margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
  background: var(--forest); color: var(--sand); border-radius: var(--radius); padding: 28px 32px;
}
.mail-bar p { flex: 1 1 360px; }
.mail-bar strong { color: var(--gold); word-break: break-all; }

/* ---------- 聯絡我們 ---------- */
.contact-inner { display: flex; flex-wrap: wrap; gap: 48px; }
.contact-info { flex: 1 1 480px; min-width: 0; }
.contact-info h2 { margin-bottom: 32px; }
.info { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 16px 20px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 500; word-break: break-word; }
.note { margin-top: 28px; font-size: 14px; color: var(--muted); }
.contact-line { flex: 1 1 380px; min-width: 0; }
.line-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.line-qr { width: 120px; height: 120px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.social-title { font-size: 18px !important; margin-top: 16px; }
@media (max-width: 520px) {
  .info { grid-template-columns: 1fr; gap: 2px; }
  .info dd { margin-bottom: 14px; }
}

/* ---------- 今日值日生 ---------- */
.section-duty { background: #EEF1E6; }
.duty-lead { margin-top: 8px; color: var(--muted); }
.duty-card { margin-top: 36px; flex-direction: row; flex-wrap: wrap; gap: 32px; padding: 28px; align-items: flex-start; }
.duty-card[hidden] { display: none; }
.duty-photo { flex: 1 1 360px; margin: 0; min-width: 0; }
.duty-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; display: block; background: var(--sand-deep); }
.duty-photo figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); }
.duty-photo figcaption a { color: inherit; }
.duty-body { flex: 1 1 380px; min-width: 0; }
.duty-body h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.duty-tag { font-size: 14px; font-weight: 500; background: var(--sand-deep); color: var(--green); border-radius: 999px; padding: 3px 12px; }
.duty-sci { margin: 4px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; color: var(--muted); }
.duty-info { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
.duty-info > div { min-width: 0; }
.duty-info .wide { grid-column: 1 / -1; }
.duty-info dt { font-size: 14px; font-weight: 700; color: var(--muted); }
.duty-info dd { margin: 4px 0 0; color: var(--ink); }
.stars { color: #E0603A; letter-spacing: 2px; font-size: 18px; }
.stars .off { color: #C9BFAE; }
#duty-live .duty-photo img { aspect-ratio: auto; object-fit: contain; }
.duty-summary { margin-top: 16px; color: var(--text); }
.duty-src { font-size: 13px; color: var(--muted); }
.duty-src a { color: inherit; }
/* 值日生小謎題（對話泡泡） */
.duty-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.duty-head-text { flex: 1 1 auto; min-width: 0; }
.duty-quiz { position: relative; flex: 0 1 400px; background: #FFFDF8; border: 1px solid var(--line); border-radius: 22px; padding: 18px 22px 20px; box-shadow: 0 10px 28px rgba(29, 51, 38, .12); margin-bottom: 14px; }
.duty-quiz[hidden] { display: none; }
.duty-quiz::after { content: ""; position: absolute; left: 44px; bottom: -11px; width: 20px; height: 20px; background: #FFFDF8; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); border-bottom-right-radius: 4px; }
.duty-quiz-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--amber); }
.duty-quiz-q { margin: 0 0 14px; font-weight: 700; color: var(--ink); line-height: 1.6; }
.duty-quiz-btn { font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; border: 0; border-radius: 999px; padding: 8px 18px; background: var(--gold); color: var(--forest); }
.duty-quiz-btn:hover { filter: brightness(1.05); }
.duty-quiz-btn:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.duty-quiz-a { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); line-height: 1.7; }
@media (max-width: 860px) { .duty-head { flex-direction: column; align-items: stretch; gap: 20px; } .duty-quiz { flex-basis: auto; margin-bottom: 0; } }
.duty-more { margin-top: 24px; text-align: center; }
@media (max-width: 520px) { .duty-info { grid-template-columns: 1fr 1fr; } .duty-card { padding: 20px; } }

/* ---------- 線上諮詢表單 ---------- */
.inquiry { margin-top: 48px; }
.inquiry-lead { margin-bottom: 24px; }
.inquiry-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 20px; }
.inquiry-form .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.inquiry-form .field-full { grid-column: 1 / -1; }
.inquiry-form label { font-weight: 500; color: var(--ink); font-size: 15px; }
.inquiry-form .req { color: var(--amber); }
.inquiry-form input, .inquiry-form select, .inquiry-form textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 14px; width: 100%;
}
.inquiry-form textarea { resize: vertical; min-height: 130px; }
.inquiry-form input:focus, .inquiry-form select:focus, .inquiry-form textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--green); }
.inquiry-form [aria-invalid="true"] { border-color: #B3261E; }
.inquiry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.inquiry-actions .btn { border: 0; cursor: pointer; }
.inquiry-actions .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.inquiry-status { margin: 0; font-weight: 500; }
.inquiry-status.ok { color: var(--green); }
.inquiry-status.err { color: #B3261E; }
.inquiry-note { margin: 0; font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) { .inquiry-form { grid-template-columns: 1fr; } }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--forest); color: #A9B8A3; font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 32px; padding-bottom: 32px; }

/* ---------- 手機 ---------- */
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .hero-inner { padding-top: 48px; padding-bottom: 64px; gap: 40px; }
  .hero-visual { height: 340px; }
  .hero-photo { inset: 0 0 0 24px; border-radius: 160px 160px 20px 20px; }
  .hero-leaves { width: 120px; height: 140px; }
  .card { padding: 28px 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .band-inner { padding-top: 64px; padding-bottom: 64px; }
}
