/* ═══════════════════════════════════════════════════════════════════
   Tablee — Editorial Warm design system
   Aesthetic: cream canvas, amber accent, editorial serif + sans
   =══════════════════════════════════════════════════════════════════ */

:root {
  /* palette */
  --cream:      #FBF7F0;
  --cream-dark: #F2ECE0;
  --cream-warm: #EFE6D4;
  --amber:      #C67D2C;
  --amber-ink:  #8A5116;
  --amber-soft: rgba(198, 125, 44, 0.12);
  --ink:        #1A1714;
  --ink-soft:   #3C342D;
  --ink-muted:  #7A6E63;
  --ink-faint:  #A89C8F;
  --rule:       #DFD5C2;
  --rule-soft:  #EADFCB;
  --night:      #1A1714;
  --night-2:    #252019;

  /* type */
  --f-display: 'Playfair Display', 'Noto Serif TC', Georgia, serif;
  --f-sans:    'DM Sans', 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', 'Menlo', monospace;
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
p { margin: 0 0 1em; color: var(--ink-soft); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }

/* layout */
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .wrap, .wrap-narrow { padding: 0 22px; } }

/* ═════════════ TYPE ═════════════ */
.serif { font-family: var(--f-display); font-weight: 400; letter-spacing: -0.01em; }
.kicker { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); font-weight: 500; }
.section-index { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--amber); }
.display-xxl { font-family: var(--f-display); font-size: clamp(54px, 9vw, 124px); font-weight: 400; line-height: 0.98; letter-spacing: -0.025em; }
.display-xxl em { font-style: italic; font-weight: 300; color: var(--amber); }
.display-xl  { font-family: var(--f-display); font-size: clamp(42px, 6vw, 84px); font-weight: 400; line-height: 1.02; letter-spacing: -0.02em; }
.display-xl em { font-style: italic; font-weight: 300; color: var(--amber); }
.display-lg  { font-size: clamp(32px, 4.4vw, 60px); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; }
.display-lg em { font-style: italic; color: var(--amber); font-weight: 300; }
.display-md  { font-size: clamp(26px, 3vw, 42px); line-height: 1.1; letter-spacing: -0.015em; }
.display-sm  { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -0.01em; }
.lede { font-size: 17px; line-height: 1.65; color: var(--ink-soft); max-width: 58ch; text-wrap: pretty; }

/* ═════════════ BUTTONS ═════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-family: var(--f-sans); font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 2px;
  transition: all .25s cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--amber-ink); transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: var(--amber-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

.btn-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-sans); font-size: 13.5px; font-weight: 500;
  color: var(--ink); letter-spacing: 0.02em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: all .25s;
}
.btn-link:hover { color: var(--amber); border-bottom-color: var(--amber); }
.btn-link:hover .arrow { transform: translateX(4px); }
.btn-link .arrow { transition: transform .25s; }

/* ═════════════ NAV ═════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 22px 40px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  transition: all .3s;
}
.nav.scrolled { background: rgba(251,247,240,0.92); backdrop-filter: saturate(1.1) blur(12px); padding: 14px 40px; border-bottom: 1px solid var(--rule-soft); }
.nav-brand { font-family: var(--f-display); font-size: 24px; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); }
.nav-brand .dot { color: var(--amber); }
.nav-menu { display: flex; gap: 32px; justify-content: center; }
.nav-menu a { font-size: 13.5px; color: var(--ink-soft); transition: color .2s; position: relative; padding: 4px 0; }
.nav-menu a:hover { color: var(--amber); }
.nav-right { display: flex; gap: 18px; align-items: center; justify-content: flex-end; }
.lang-toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; background: var(--cream); }
.lang-toggle button { padding: 5px 12px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--ink-muted); border-radius: 999px; }
.lang-toggle button.active { background: var(--ink); color: var(--cream); }
.hamburger { display: none; padding: 8px; color: var(--ink); }
@media (max-width: 860px) {
  .nav { padding: 18px 22px; grid-template-columns: 1fr auto; }
  .nav.scrolled { padding: 12px 22px; }
  .nav-menu { display: none; }
  .hamburger { display: inline-flex; }
}

.mobile-drawer { position: fixed; inset: 0; background: var(--cream); z-index: 200; padding: 28px 22px; transform: translateX(100%); transition: transform .3s; display: flex; flex-direction: column; gap: 18px; }
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mobile-close { font-size: 32px; line-height: 1; color: var(--ink); padding: 4px 12px; }
.mobile-drawer a { font-family: var(--f-display); font-size: 32px; color: var(--ink); border-bottom: 1px solid var(--rule-soft); padding: 14px 0; }

/* ═════════════ HERO ═════════════ */
.hero { padding: 140px 0 60px; min-height: 95vh; display: flex; align-items: center; }
.hero-inner { width: 100%; }
.hero-meta { display: flex; align-items: center; gap: 20px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-bottom: 48px; }
.hero-meta .dash { display: inline-block; width: 40px; height: 1px; background: var(--amber); }
.hero-row { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: end; }
@media (min-width: 1000px) { .hero-row { grid-template-columns: 1.4fr 1fr; gap: 60px; } }
.hero-media { position: relative; aspect-ratio: 4/5; background: var(--cream-dark); overflow: hidden; border-radius: 2px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-bottom { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--rule); margin-top: 80px; padding-top: 40px; }
@media (max-width: 780px) { .hero-bottom { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
.hero-stat { }
.hero-stat .n { font-family: var(--f-display); font-size: clamp(40px, 5vw, 60px); font-weight: 400; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.hero-stat .n sup { font-family: var(--f-sans); font-size: 0.3em; font-weight: 500; color: var(--amber); margin-left: 4px; top: -1.4em; position: relative; letter-spacing: 0; }
.hero-stat .lbl { font-size: 13px; color: var(--ink-muted); margin-top: 10px; line-height: 1.45; }

/* ═════════════ GENERIC SECTIONS ═════════════ */
section { padding: 100px 0; position: relative; }
@media (max-width: 780px) { section { padding: 72px 0; } }

.editorial-head {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 60px;
}
@media (min-width: 900px) { .editorial-head { grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: end; } }

/* ═════════════ PLACEHOLDER SYSTEM (cross-hatched) ═════════════ */
.ph {
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(26,23,20,0.045) 18px 19px),
    linear-gradient(180deg, var(--cream-warm), var(--cream-dark));
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ph::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px dashed rgba(26,23,20,0.15);
}
.ph::after {
  content: attr(data-label);
  position: absolute; top: 14px; left: 14px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--amber-ink); background: var(--cream); padding: 4px 10px; border: 1px solid var(--rule);
  max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ph.dark {
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(251,247,240,0.06) 18px 19px),
    linear-gradient(180deg, var(--night-2), var(--night));
}
.ph.dark::before { border-color: rgba(251,247,240,0.2); }
.ph.dark::after { background: var(--night-2); color: var(--amber); border-color: rgba(251,247,240,0.15); }
.ph.amber {
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,0.1) 18px 19px),
    linear-gradient(180deg, #D88E3F, var(--amber));
}
.ph.amber::before { border-color: rgba(255,255,255,0.35); }
.ph.amber::after { background: var(--amber-ink); color: #fff; border-color: rgba(255,255,255,0.2); }

/* ═════════════ MEDIA (real images replacing .ph) ═════════════ */
.media { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-media .media { position: absolute; inset: 0; }
.full-bleed .media { aspect-ratio: 21/9; }
.split-media .media { border-radius: 2px; }
.mock .media { aspect-ratio: 1/1; border-radius: 4px; }

/* ═════════════ FULL-BLEED IMAGE STRIP ═════════════ */
.full-bleed { position: relative; width: 100%; margin: 60px 0; }
.full-bleed .ph { width: 100%; aspect-ratio: 21/9; }
.full-bleed .caption { display: flex; justify-content: space-between; padding: 14px 40px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }

/* ═════════════ SPLIT FEATURES ═════════════ */
.split { display: grid; grid-template-columns: 1fr; gap: 60px; align-items: center; padding: 40px 0; }
@media (min-width: 1000px) {
  .split { grid-template-columns: 1.1fr 1fr; gap: 100px; }
  .split.reverse { grid-template-columns: 1fr 1.1fr; }
  .split.reverse .split-copy { order: 0; }
  .split.reverse .split-media { order: 1; }
}
.split-media { aspect-ratio: 4/5; position: relative; overflow: hidden; border-radius: 2px; }
.split-copy h2 { margin-bottom: 28px; }
.split-copy p { margin-bottom: 20px; max-width: 52ch; font-size: 16px; }
.split-copy .btn-link { margin-top: 14px; }

/* ═════════════ PULL QUOTE ═════════════ */
.pull-quote { padding: 120px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-align: center; }
.pull-quote blockquote {
  font-family: var(--f-display); font-style: italic; font-weight: 300;
  font-size: clamp(28px, 4vw, 48px); line-height: 1.25; letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 32px; text-wrap: balance;
}
.pull-quote cite { font-style: normal; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }

/* ═════════════ FEATURE LIST (editorial rows) ═════════════ */
.feat-list { border-top: 1px solid var(--ink); }
.feat-row {
  display: grid; grid-template-columns: 60px 1fr; gap: 24px;
  padding: 28px 0; border-bottom: 1px solid var(--rule);
  align-items: baseline;
  transition: background .3s;
  cursor: default;
}
@media (min-width: 860px) {
  .feat-row { grid-template-columns: 80px 280px 1fr 40px; align-items: baseline; padding: 36px 0; gap: 40px; }
}
.feat-row:hover { background: linear-gradient(90deg, transparent, var(--amber-soft) 30%, transparent); }
.feat-num { font-family: var(--f-mono); font-size: 11px; color: var(--amber); letter-spacing: 0.18em; padding-top: 4px; }
.feat-title { font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; letter-spacing: -0.015em; line-height: 1.15; color: var(--ink); }
.feat-desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.65; max-width: 54ch; margin: 0; }
.feat-arrow { font-family: var(--f-display); font-size: 24px; color: var(--ink-faint); text-align: right; transition: all .25s; }
.feat-row:hover .feat-arrow { color: var(--amber); transform: translateX(6px); }
@media (max-width: 860px) {
  .feat-row .feat-arrow { display: none; }
  .feat-title { margin-bottom: 8px; }
}

/* ═════════════ FAQ ═════════════ */
.faq-list { border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary { list-style: none; padding: 28px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; cursor: pointer; font-family: var(--f-display); font-size: clamp(20px, 2.2vw, 26px); font-weight: 400; letter-spacing: -0.01em; color: var(--ink); transition: color .2s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--f-display); font-size: 28px; color: var(--amber); transition: transform .3s; font-weight: 300; }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:hover { color: var(--amber); }
.faq-item .ans { padding: 0 0 28px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.7; max-width: 62ch; }

/* ═════════════ END CTA ═════════════ */
.end-cta { background: var(--night); color: var(--cream); padding: 140px 0; text-align: center; position: relative; overflow: hidden; }
.end-cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, var(--amber-soft), transparent 60%);
  pointer-events: none;
}
.end-cta > * { position: relative; z-index: 1; }
.end-cta h2 { font-family: var(--f-display); font-size: clamp(44px, 6vw, 80px); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 28px; color: var(--cream); }
.end-cta h2 em { font-style: italic; color: var(--amber); font-weight: 300; }
.end-cta p { color: rgba(251,247,240,0.7); font-size: 16px; max-width: 52ch; margin: 0 auto 36px; }
.end-cta .btn-ghost { color: var(--cream); border-color: var(--cream); }
.end-cta .btn-ghost:hover { background: var(--cream); color: var(--ink); }

/* ═════════════ FOOTER ═════════════ */
.site-footer { background: var(--night); color: rgba(251,247,240,0.6); padding: 80px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; }
@media (max-width: 860px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 500px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer .brand-col .nav-brand { font-size: 28px; color: var(--cream); }
.site-footer .brand-col p { color: rgba(251,247,240,0.55); font-size: 13.5px; margin-top: 16px; max-width: 36ch; }
.site-footer h4 { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; font-weight: 500; }
.site-footer a { display: block; color: rgba(251,247,240,0.7); font-size: 14px; padding: 5px 0; transition: color .2s; }
.site-footer a:hover { color: var(--amber); }
.site-footer .copy {
  margin-top: 60px; padding-top: 28px; border-top: 1px solid rgba(251,247,240,0.1);
  display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
}
@media (max-width: 500px) { .site-footer .copy { flex-direction: column; gap: 12px; } }

/* ═════════════ FORM PRIMITIVES ═════════════ */
.quiet-card { background: var(--cream-dark); border: 1px solid var(--rule); border-radius: 2px; padding: 40px; }
@media (max-width: 640px) { .quiet-card { padding: 28px 22px; } }
.form-group { margin-bottom: 22px; }
.form-label { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; font-weight: 500; }
.form-control {
  width: 100%; padding: 14px 16px;
  font-family: var(--f-sans); font-size: 15px; color: var(--ink);
  background: var(--cream); border: 1px solid var(--rule); border-radius: 2px;
  transition: border-color .2s, background .2s;
  outline: none;
}
.form-control:focus { border-color: var(--amber); background: #fff; }
textarea.form-control { resize: vertical; min-height: 120px; font-family: var(--f-sans); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A6E63' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* ═════════════ REVEAL ANIMATIONS ═════════════ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-slow { transition-duration: 1.2s; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

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

/* ═════════════ UTILITY ═════════════ */
.text-amber { color: var(--amber); }
.text-muted { color: var(--ink-muted); }
.italic { font-style: italic; }
