/* Shared foundations and reusable layout utilities */
/* 01. Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; font-size: 16px;}
body { margin: 0; overflow-x: hidden; font-family: "Noto Sans TC","Microsoft JhengHei",sans-serif; background: #08111f; color: #172033; font-size: 1rem; line-height: 1.7; -webkit-font-smoothing: antialiased; }
.container { width: min(1180px,calc(100% - 40px)); margin: 0 auto; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
ul, ol { margin-top: 0; margin-bottom: 0; }
/* 02. Flex utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
/* 03. Gap utilities */
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }
/* 04. Position, display, and size utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.block { display: block; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-full { max-width: 100%; }
/* 05. Typography utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-white { color: #fff; }
.text-primary { color: var(--red); }
.text-secondary { color: var(--blue); }
.text-muted { color: var(--muted); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; }
.text-xs { font-size: .75rem; }
.text-sm { font-size: .875rem; }
.text-md { font-size: 1rem; }
.text-lg { font-size: 1.125rem; line-height: 1.6; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 1.6; }
.text-3xl { font-size: 1.875rem; line-height: 1.4; }
.text-4xl { font-size: 2.25rem; line-height: 1.3; }
.text-5xl { font-size: 3rem; line-height: 1.2; }
.text-6xl { font-size: 3.25rem; line-height: 1.15; }
/* 06. Spacing utilities */
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mx-auto { margin-right: auto; margin-left: auto; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
/* 07. Shared section structure */
section.section-host { position: relative; isolation: isolate; overflow: hidden; padding: 88px 0; }
section.section-host::before { position: absolute; z-index: 0; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cfilter id='paper-noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper-noise)' opacity='.68'/%3E%3C/svg%3E"); background-size: 150px 150px; content: ""; opacity: .2; filter: contrast(1.12); mix-blend-mode: multiply; pointer-events: none; }
section.section-host > * { position: relative; z-index: 1; }
section.section-host:nth-of-type(odd) { background: #f4f8fd; }
section.section-host:nth-of-type(even) { background: #fff; }
section .section-kicker { margin: 0 0 8px; color: var(--red); font-size: 1rem; font-weight: 900; letter-spacing: .16em; }
section .section-title { margin: 0; color: #101828; font-size: clamp(1.875rem,3vw,3rem); line-height: 1.3; font-weight: 900; }
section .section-lead { margin: 12px 0 0; color: #526077; font-size: 1.25rem; }
section .section-head { margin-bottom: 36px; }
/* 08. Shared grid and card helpers */
.grid { display: grid; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-12 { grid-template-columns: repeat(12,1fr); }
.card { background: #fff; border: 1px solid #dbe5f1; border-radius: 18px; box-shadow: 0 18px 50px rgba(21,44,77,.08); }
/* 09. Shared buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; padding: 14px 22px; font-weight: 800; transition: .2s ease; }
.button-primary { background: var(--red); color: #fff; box-shadow: 0 10px 28px rgba(255,63,77,.28); }
.button-primary:hover { background: #e92d40; color: #fff; transform: translateY(-2px); }
/* 10. Responsive utilities */
@media(max-width:1024px) {
  .grid-12 { grid-template-columns: 1fr; }
}
@media(max-width:900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:700px) {
  .container { width: min(100% - 28px,1180px); }
  section.section-host { padding: 64px 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  section .section-title { font-size: 1.875rem; }
  .text-6xl, .text-5xl { font-size: 2.25rem; }
  .text-4xl { font-size: 1.875rem; }
  .text-3xl { font-size: 1.5rem; }
  .text-2xl { font-size: 1.25rem; }
  .md-only { display: none !important; }
  .flex-md-col { flex-direction: column !important; }
  .items-md-start { align-items: flex-start !important; }
  .gap-8 { gap: 1rem; }
}
