Optimize studio-sample: shared CSS, mobile nav, SEO, a11y, working filter

- Extract duplicated per-page CSS into one shared style.css
- Add CSS-only hamburger menu for ≤720px (was overflowing)
- Add meta description / Open Graph / favicon to all pages
- Unify footers, fix dead links, distinct <title>s
- :focus-visible outlines, aria-hidden on decorative text, contrast bumps
- Make works.html category filter actually filter (data-cat)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-23 20:07:46 +08:00
parent 39f099aacf
commit 8e31d73376
6 changed files with 1057 additions and 1654 deletions

View File

@@ -0,0 +1,969 @@
/* ───────────────────────────────────────────────────────────────
Studio Sample — 共用樣式表
四個頁面共用同一份,改一次全站生效。
衝突處用父層 scope#works / .works-section或 modifier 區分。
─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
"Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP",
"Noto Sans TC", system-ui, sans-serif;
background-color: #ffffff;
color: #333333;
line-height: 1.6;
}
/* ─── NAV ─────────────────────────────────────────────── */
nav {
position: sticky;
top: 0;
z-index: 100;
background: #ffffff;
border-bottom: 1px solid #eeeeee;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 clamp(16px, 5vw, 64px);
height: 56px;
}
.nav-logo {
font-size: 18px;
font-weight: 800;
letter-spacing: 0.12em;
color: #e53935;
text-transform: uppercase;
text-decoration: none;
}
.nav-links {
display: flex;
gap: clamp(16px, 3vw, 40px);
list-style: none;
}
.nav-links a {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #555555;
text-decoration: none;
transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: #e53935; }
/* 手機版漢堡選單 — ponytail: 純 CSS checkbox hack,免 JS。
要 aria-expanded 等完整無障礙再換成 JS 版本。 */
.nav-toggle { display: none; }
.nav-burger {
display: none;
font-size: 22px;
line-height: 1;
color: #111111;
background: none;
border: none;
cursor: pointer;
padding: 4px 8px;
user-select: none;
}
@media (max-width: 720px) {
.nav-burger { display: block; }
.nav-links {
position: absolute;
top: 56px;
left: 0;
right: 0;
flex-direction: column;
gap: 0;
background: #ffffff;
border-bottom: 1px solid #eeeeee;
max-height: 0;
overflow: hidden;
transition: max-height 0.25s ease;
}
.nav-toggle:checked ~ .nav-links { max-height: 70vh; }
.nav-links li { width: 100%; }
.nav-links a {
display: block;
padding: 14px clamp(16px, 5vw, 64px);
border-top: 1px solid #f2f2f2;
}
}
/* ─── HERO (index) ────────────────────────────────────── */
#hero {
min-height: calc(100vh - 56px);
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
padding: clamp(48px, 8vw, 96px) clamp(24px, 8vw, 96px);
background: #f7f7f7;
position: relative;
overflow: hidden;
}
.hero-bg-text {
position: absolute;
right: -0.05em;
bottom: -0.15em;
font-size: clamp(120px, 18vw, 280px);
font-weight: 900;
letter-spacing: -0.02em;
color: #eeeeee;
user-select: none;
line-height: 1;
pointer-events: none;
}
.hero-eyebrow {
font-size: clamp(11px, 1.2vw, 13px);
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 20px;
}
.hero-title {
font-size: clamp(36px, 6vw, 80px);
font-weight: 800;
letter-spacing: -0.02em;
color: #111111;
line-height: 1.1;
margin-bottom: 24px;
max-width: 12em;
}
.hero-title em { font-style: normal; color: #e53935; }
.hero-sub {
font-size: clamp(14px, 1.6vw, 18px);
color: #666666;
max-width: 38em;
margin-bottom: 40px;
}
/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
display: inline-block;
padding: 14px 32px;
font-size: 14px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
text-decoration: none;
border: 2px solid #e53935;
transition: background 0.2s, color 0.2s;
}
.btn-primary { background: #e53935; color: #ffffff; }
.btn-primary:hover { background: #c62828; border-color: #c62828; }
.btn-outline {
background: transparent;
color: #e53935;
margin-left: 12px;
}
.btn-outline:hover { background: #e53935; color: #ffffff; }
.btn-white { background: #ffffff; color: #e53935; border-color: #ffffff; }
.btn-white:hover { background: #f5f5f5; border-color: #f5f5f5; }
/* ─── SECTION COMMON ──────────────────────────────────── */
section {
padding: clamp(56px, 8vw, 96px) clamp(24px, 8vw, 96px);
}
.section-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.25em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 12px;
}
.section-title {
font-size: clamp(24px, 3.5vw, 40px);
font-weight: 800;
letter-spacing: -0.01em;
color: #111111;
margin-bottom: 16px;
}
.section-lead {
font-size: clamp(14px, 1.5vw, 17px);
color: #666666;
max-width: 42em;
margin-bottom: 48px;
}
/* ─── PAGE HEADER (services / works / timeline) ───────── */
.page-header {
padding: clamp(48px, 7vw, 88px) clamp(24px, 8vw, 96px) clamp(32px, 4vw, 48px);
background: #f7f7f7;
border-bottom: 1px solid #eeeeee;
}
.page-header-eyebrow,
.page-header-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 12px;
}
.page-header-title {
font-size: clamp(32px, 5.5vw, 68px);
font-weight: 800;
letter-spacing: -0.02em;
color: #111111;
line-height: 1.08;
margin-bottom: 16px;
}
.page-header-lead,
.page-header-sub {
font-size: clamp(14px, 1.5vw, 17px);
color: #666666;
max-width: 38em;
}
/* ─── FEATURES (index) ────────────────────────────────── */
#features { background: #ffffff; }
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 2px;
background: #eeeeee;
border: 2px solid #eeeeee;
}
.feature-card { background: #ffffff; padding: clamp(24px, 3vw, 40px); }
.feature-num {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.15em;
color: #e53935;
margin-bottom: 16px;
}
.feature-title {
font-size: clamp(16px, 1.8vw, 20px);
font-weight: 800;
color: #111111;
margin-bottom: 10px;
}
.feature-desc {
font-size: clamp(13px, 1.3vw, 15px);
color: #666666;
line-height: 1.7;
}
/* ─── WORKS (shared card; grid scoped per page) ───────── */
#works { background: #f7f7f7; }
.works-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
}
/* index 首頁的作品預覽 */
#works .works-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
/* works 頁的完整作品牆 */
.works-section { padding: clamp(40px, 6vw, 72px) clamp(24px, 8vw, 96px); }
.works-section .works-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; }
.work-card {
background: #ffffff;
border: 1px solid #eeeeee;
overflow: hidden;
transition: box-shadow 0.2s;
}
.work-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.work-thumb {
width: 100%;
aspect-ratio: 16/9;
background: #eeeeee;
display: flex;
align-items: center;
justify-content: center;
font-size: clamp(28px, 3.6vw, 46px);
font-weight: 900;
letter-spacing: -0.02em;
color: #cccccc;
}
.work-thumb.red { background: #fde8e8; color: #e53935; }
.work-thumb.dark { background: #222222; color: #444444; }
.work-thumb.gray { background: #e8e8e8; color: #bbbbbb; }
.work-thumb.cream { background: #f5f0e8; color: #c8b89a; }
.work-thumb.navy { background: #1a2640; color: #2e4070; }
.work-thumb.sage { background: #e4ece4; color: #8aaa8a; }
.work-thumb.black { background: #111111; color: #333333; }
.work-thumb.blush { background: #fde8f0; color: #e07898; }
.work-body { padding: 22px 26px; }
.work-meta {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.work-tag {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 6px;
}
.work-year { font-size: 11px; color: #999999; letter-spacing: 0.05em; }
.work-title {
font-size: clamp(15px, 1.7vw, 20px);
font-weight: 800;
color: #111111;
margin-bottom: 8px;
line-height: 1.3;
}
.work-desc {
font-size: 13px;
color: #777777;
line-height: 1.7;
margin-bottom: 16px;
}
.work-scope { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-tag {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.06em;
padding: 3px 10px;
border: 1px solid #eeeeee;
color: #6a6a6a;
}
/* 作品篩選列 (works) */
.filter-bar {
padding: 20px clamp(24px, 8vw, 96px);
border-bottom: 1px solid #eeeeee;
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.filter-btn {
padding: 6px 16px;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
border: 1px solid #dddddd;
background: transparent;
color: #666666;
cursor: pointer;
transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active { border-color: #e53935; color: #e53935; }
/* featured 寬卡 */
.work-card.featured { grid-column: span 2; }
.work-card.featured .work-thumb { aspect-ratio: 21/9; }
@media (max-width: 720px) {
.work-card.featured { grid-column: span 1; }
.work-card.featured .work-thumb { aspect-ratio: 16/9; }
}
/* ─── PROCESS (index) ─────────────────────────────────── */
#process { background: #f7f7f7; }
.process-steps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 0;
counter-reset: step;
}
.process-step {
padding: clamp(28px, 3vw, 44px) clamp(20px, 2.5vw, 36px);
border-right: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
position: relative;
}
.process-step:last-child { border-right: none; }
@media (max-width: 640px) {
.process-step { border-right: none; }
}
.step-num {
font-size: clamp(40px, 6vw, 64px);
font-weight: 900;
color: #eeeeee;
line-height: 1;
margin-bottom: 12px;
letter-spacing: -0.03em;
}
.step-title {
font-size: clamp(15px, 1.6vw, 18px);
font-weight: 800;
color: #111111;
margin-bottom: 8px;
}
.step-desc {
font-size: clamp(13px, 1.2vw, 14px);
color: #777777;
line-height: 1.7;
}
/* ─── ABOUT (index, dark) ─────────────────────────────── */
#about { background: #111111; color: #ffffff; }
#about .section-title { color: #ffffff; }
#about .section-lead { color: #999999; }
#about .section-label { color: #e53935; }
.about-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: clamp(32px, 6vw, 80px);
align-items: start;
}
@media (max-width: 640px) {
.about-layout { grid-template-columns: 1fr; }
}
.about-stats {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2px;
background: #2a2a2a;
border: 2px solid #2a2a2a;
}
.stat-box { background: #1a1a1a; padding: 28px 24px; }
.stat-num {
font-size: clamp(28px, 4vw, 44px);
font-weight: 800;
color: #e53935;
letter-spacing: -0.02em;
line-height: 1;
margin-bottom: 6px;
}
.stat-label {
font-size: 12px;
color: #888888;
letter-spacing: 0.1em;
text-transform: uppercase;
}
.about-text p {
font-size: clamp(14px, 1.5vw, 16px);
color: #aaaaaa;
line-height: 1.8;
margin-bottom: 20px;
}
/* ─── NEWS (index) ────────────────────────────────────── */
#news { background: #ffffff; }
.news-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
}
.news-card { border-top: 2px solid #eeeeee; padding-top: 20px; }
.news-card:first-child { border-top-color: #e53935; }
.news-date {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.15em;
color: #999999;
margin-bottom: 8px;
text-transform: uppercase;
}
.news-title {
font-size: clamp(15px, 1.6vw, 18px);
font-weight: 700;
color: #111111;
margin-bottom: 8px;
line-height: 1.4;
}
.news-excerpt {
font-size: 13px;
color: #777777;
line-height: 1.7;
margin-bottom: 14px;
}
.news-link {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #e53935;
text-decoration: none;
}
.news-link:hover { text-decoration: underline; }
/* ─── CONTACT (index) ─────────────────────────────────── */
#contact { background: #ffffff; }
.contact-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: clamp(32px, 6vw, 80px);
align-items: start;
}
@media (max-width: 640px) {
.contact-layout { grid-template-columns: 1fr; }
}
.form-group { margin-bottom: 20px; }
label {
display: block;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #555555;
margin-bottom: 8px;
}
input, textarea, select {
width: 100%;
padding: 12px 16px;
border: 1px solid #dddddd;
border-radius: 0;
font-size: 14px;
font-family: inherit;
color: #333333;
background: #ffffff;
outline: none;
transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { border-color: #e53935; }
textarea { min-height: 120px; resize: vertical; }
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-item-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 6px;
}
.contact-item-value { font-size: clamp(14px, 1.5vw, 16px); color: #333333; }
.contact-item-sub { font-size: 13px; color: #6a6a6a; margin-top: 2px; }
/* ─── SERVICE BLOCKS (services) ───────────────────────── */
#services { background: #ffffff; }
.service-block {
display: grid;
grid-template-columns: 1fr 2fr;
gap: clamp(32px, 6vw, 80px);
padding: clamp(32px, 4vw, 56px) 0;
border-top: 1px solid #eeeeee;
align-items: start;
}
.service-block:first-of-type { border-top: 2px solid #e53935; }
@media (max-width: 640px) {
.service-block { grid-template-columns: 1fr; }
}
.service-index {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.2em;
color: #e53935;
text-transform: uppercase;
}
.service-name {
font-size: clamp(22px, 2.8vw, 32px);
font-weight: 800;
color: #111111;
letter-spacing: -0.01em;
margin: 12px 0 0;
}
.service-detail h4 {
font-size: clamp(14px, 1.4vw, 16px);
font-weight: 700;
color: #111111;
margin-bottom: 8px;
}
.service-detail p {
font-size: clamp(13px, 1.3vw, 15px);
color: #666666;
line-height: 1.8;
margin-bottom: 24px;
}
.deliverables {
list-style: none;
display: flex;
flex-direction: column;
gap: 6px;
margin-bottom: 24px;
}
.deliverables li {
font-size: 13px;
color: #444444;
padding-left: 20px;
position: relative;
}
.deliverables li::before {
content: "—";
position: absolute;
left: 0;
color: #e53935;
font-weight: 700;
}
.service-note {
font-size: 12px;
color: #888888;
border-left: 2px solid #eeeeee;
padding-left: 12px;
line-height: 1.6;
}
/* ─── PRICING (services) ──────────────────────────────── */
#pricing { background: #f7f7f7; }
.pricing-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 2px;
background: #e0e0e0;
border: 2px solid #e0e0e0;
}
.pricing-card { background: #ffffff; padding: clamp(28px, 3.5vw, 44px) clamp(24px, 2.5vw, 36px); }
.pricing-card.highlighted { background: #111111; }
.pricing-tier {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #e53935;
margin-bottom: 16px;
}
.pricing-price {
font-size: clamp(28px, 3.5vw, 40px);
font-weight: 900;
color: #111111;
letter-spacing: -0.02em;
line-height: 1;
margin-bottom: 4px;
}
.pricing-card.highlighted .pricing-price { color: #ffffff; }
.pricing-unit { font-size: 13px; color: #999999; margin-bottom: 20px; }
.pricing-desc {
font-size: clamp(13px, 1.3vw, 14px);
color: #666666;
line-height: 1.7;
margin-bottom: 24px;
}
.pricing-card.highlighted .pricing-desc { color: #999999; }
.pricing-features {
list-style: none;
display: flex;
flex-direction: column;
gap: 8px;
}
.pricing-features li {
font-size: 13px;
color: #444444;
padding-left: 20px;
position: relative;
}
.pricing-card.highlighted .pricing-features li { color: #aaaaaa; }
.pricing-features li::before {
content: "✓";
position: absolute;
left: 0;
color: #e53935;
font-weight: 700;
font-size: 12px;
}
/* ─── FAQ (services) ──────────────────────────────────── */
#faq { background: #ffffff; }
.faq-list { max-width: 720px; display: flex; flex-direction: column; gap: 0; }
.faq-item { border-top: 1px solid #eeeeee; padding: 20px 0; }
.faq-item:last-child { border-bottom: 1px solid #eeeeee; }
.faq-q {
font-size: clamp(15px, 1.5vw, 17px);
font-weight: 700;
color: #111111;
margin-bottom: 10px;
}
.faq-a {
font-size: clamp(13px, 1.3vw, 15px);
color: #666666;
line-height: 1.8;
}
/* ─── CTA STRIP (works=dark base / services=red) ──────── */
.cta-strip {
background: #111111;
padding: clamp(40px, 6vw, 72px) clamp(24px, 8vw, 96px);
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
flex-wrap: wrap;
}
.cta-strip.red { background: #e53935; }
.cta-strip-text h2 {
font-size: clamp(22px, 3vw, 36px);
font-weight: 800;
color: #ffffff;
letter-spacing: -0.01em;
margin-bottom: 6px;
}
.cta-strip-text p { font-size: clamp(13px, 1.3vw, 15px); color: #999999; }
.cta-strip.red .cta-strip-text p { color: rgba(255,255,255,0.8); }
/* ─── TIMELINE (timeline) ─────────────────────────────── */
.timeline-section { padding: clamp(64px, 10vw, 120px) clamp(24px, 8vw, 96px); }
.timeline { position: relative; max-width: 860px; margin: 0 auto; }
.timeline::before {
content: '';
position: absolute;
left: 140px;
top: 8px;
bottom: 8px;
width: 1px;
background: #e0e0e0;
}
.timeline-year { margin-bottom: 56px; }
.timeline-year-label {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.2em;
text-transform: uppercase;
color: #999999;
width: 120px;
text-align: right;
padding-top: 4px;
margin-bottom: 24px;
}
.timeline-item {
display: grid;
grid-template-columns: 120px 1fr;
gap: 0 40px;
position: relative;
margin-bottom: 36px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-date { text-align: right; padding-top: 2px; }
.timeline-date-month {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #999999;
}
.timeline-date-day {
font-size: 22px;
font-weight: 800;
color: #cfcfcf;
line-height: 1;
margin-top: 2px;
}
.timeline-item::after {
content: '';
position: absolute;
left: 134px;
top: 6px;
width: 13px;
height: 13px;
border-radius: 50%;
background: #ffffff;
border: 2px solid #cccccc;
transition: border-color 0.2s, background 0.2s;
}
.timeline-item.highlight::after { background: #e53935; border-color: #e53935; }
.timeline-content {
padding-left: 20px;
padding-bottom: 36px;
border-bottom: 1px solid #f2f2f2;
}
.timeline-item:last-child .timeline-content { border-bottom: none; padding-bottom: 0; }
.timeline-tag {
display: inline-block;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.15em;
text-transform: uppercase;
color: #e53935;
background: #fdecea;
border-radius: 2px;
padding: 2px 7px;
margin-bottom: 8px;
}
.timeline-tag.tag-launch { color: #1565c0; background: #e3f2fd; }
.timeline-tag.tag-award { color: #2e7d32; background: #e8f5e9; }
.timeline-tag.tag-collab { color: #6a1b9a; background: #f3e5f5; }
.timeline-tag.tag-studio { color: #e53935; background: #fdecea; }
.timeline-tag.tag-article { color: #e65100; background: #fff3e0; }
.timeline-title {
font-size: clamp(15px, 2vw, 17px);
font-weight: 700;
color: #111111;
line-height: 1.35;
margin-bottom: 6px;
}
.timeline-desc { font-size: 14px; color: #666666; line-height: 1.7; }
.timeline-desc span {
display: block;
color: #888888;
margin-top: 2px;
font-size: 13px;
}
@media (max-width: 600px) {
.timeline::before { left: 0; }
.timeline-item { grid-template-columns: 1fr; gap: 4px 0; padding-left: 22px; }
.timeline-item::after { left: -6px; top: 4px; }
.timeline-date { text-align: left; display: flex; align-items: baseline; gap: 8px; }
.timeline-date-day { font-size: 14px; }
.timeline-content { padding-left: 0; }
.timeline-year-label { width: auto; text-align: left; padding-left: 22px; }
}
/* ─── FOOTER ──────────────────────────────────────────── */
footer {
background: #111111;
padding: 32px clamp(24px, 8vw, 96px);
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 16px;
border-top: 1px solid #1e1e1e;
}
.footer-logo {
font-size: 16px;
font-weight: 800;
letter-spacing: 0.12em;
color: #e53935;
text-transform: uppercase;
}
.footer-nav { display: flex; gap: clamp(16px, 3vw, 32px); list-style: none; }
.footer-nav a {
font-size: 12px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #888888;
text-decoration: none;
transition: color 0.2s;
}
.footer-nav a:hover { color: #e53935; }
.footer-copy { font-size: 12px; color: #777777; letter-spacing: 0.05em; }
/* ─── 鍵盤焦點 (a11y) ─────────────────────────────────── */
.nav-links a:focus-visible,
.footer-nav a:focus-visible,
.nav-logo:focus-visible,
.btn:focus-visible,
.filter-btn:focus-visible,
.news-link:focus-visible,
.nav-burger:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
outline: 2px solid #e53935;
outline-offset: 2px;
}