/* ===========================
   MONO 墨研工作室 — Bold Typographic B&W + Red
   B06 Creative Studio Template
   =========================== */

/* ============ CSS VARIABLES ============ */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-dark: #0a0a0a;
  --text: #1a1a1a;
  --text-muted: #666666;
  --text-light: #f5f5f5;
  --accent: #e63946;
  --accent-hover: #d62839;
  --border: #1a1a1a;
  --font-heading: 'Space Grotesk', 'Noto Sans TC', sans-serif;
  --font-body: 'Noto Sans TC', 'Space Grotesk', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ RESET & BASE ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  transition: box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}

.nav.scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

.logo-zh {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links li a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.nav-links li a:hover {
  color: var(--text);
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 6px;
  transition: background 0.3s, transform 0.3s;
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1001;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  background: var(--text);
  transform: translate(-50%, -50%);
  transition: all 0.4s var(--ease);
}

.nav-toggle span:nth-child(1) {
  transform: translate(-50%, calc(-50% - 6px));
}

.nav-toggle span:nth-child(3) {
  transform: translate(-50%, calc(-50% + 6px));
}

body.menu-open .nav-toggle span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

body.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.menu-open .nav-toggle span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .mobile-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu ul {
  text-align: center;
}

.mobile-menu ul li {
  margin-bottom: 24px;
}

.mobile-menu ul li a {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.3s;
}

.mobile-menu ul li a:hover {
  color: var(--accent);
}

.mobile-menu .mobile-cta {
  display: inline-block;
  margin-top: 16px;
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 6px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* ============ HERO — Giant Outline Typography ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  background: var(--bg);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: center;
  width: 100%;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-text {
  position: relative;
}

.hero-title {
  line-height: 0.95;
  margin-bottom: 32px;
}

.hero-line {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.hero-outline {
  font-size: clamp(72px, 12vw, 140px);
  -webkit-text-stroke: 2.5px var(--text);
  color: transparent;
  transition: -webkit-text-stroke 0.3s;
}

.hero-filled {
  font-size: clamp(72px, 12vw, 140px);
  color: var(--accent);
  -webkit-text-stroke: 0;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero preview card */
.hero-preview {
  position: relative;
}

.hero-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s;
}

.hero-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-card-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

/* Pill tag */
.pill {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  text-transform: uppercase;
}

/* ============ WORKS — Case Study Cards ============ */
.works {
  padding: 120px 0;
  background: var(--bg-alt);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 56px;
  letter-spacing: -0.02em;
}

.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.work-card {
  display: block;
  border: 2px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.work-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
}

.work-card-img {
  overflow: hidden;
}

.work-card-img img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.work-card:hover .work-card-img img {
  transform: scale(1.06);
}

.work-card-body {
  padding: 24px 28px;
}

.work-card-body .pill {
  margin-bottom: 12px;
}

.work-card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.work-card-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============ PROCESS — Horizontal Numbered Timeline ============ */
.process {
  padding: 120px 0;
  background: var(--bg);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

/* Horizontal connecting line */
.timeline::before {
  content: '';
  position: absolute;
  top: 88px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.timeline-step {
  text-align: center;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.timeline-num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  -webkit-text-stroke: 2px var(--text);
  color: transparent;
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 auto 24px;
  position: relative;
}

.timeline-dot::before {
  content: '';
  position: absolute;
  top: -4px; right: -4px; bottom: -4px; left: -4px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0.4;
}

.timeline-step-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.timeline-step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============ CLIENTS — Logo Marquee Strip ============ */
.clients {
  padding: 100px 0 60px;
  background: var(--bg-alt);
}

.clients .section-title {
  text-align: center;
  margin-bottom: 48px;
}

.marquee-wrap {
  overflow: hidden;
  padding: 32px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.marquee-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marqueeScroll 20s linear infinite;
  will-change: transform;
}

.marquee-item {
  flex-shrink: 0;
  padding: 0 48px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.35;
  transition: opacity 0.3s;
}

.marquee-item:hover {
  opacity: 1;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ============ TEAM — Minimal Grid ============ */
.team {
  padding: 120px 0;
  background: var(--bg);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.team-card {
  text-align: center;
}

.team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 20px;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s var(--ease);
}

.team-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: var(--accent);
  opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}

.team-card:hover .team-photo img {
  filter: grayscale(0%);
}

.team-card:hover .team-overlay {
  opacity: 0.35;
}

.team-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.team-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.team-bio {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ============ STATS / AWARDS ============ */
.stats {
  padding: 80px 0;
  background: var(--bg-dark);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-item {
  padding: 20px 0;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: rgba(245, 245, 245, 0.5);
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ============ CONTACT — Minimal Split ============ */
.contact {
  padding: 120px 0;
  background: var(--bg-alt);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.contact-heading {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-details p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-details strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.contact-details a {
  color: var(--text-muted);
  transition: color 0.3s;
}

.contact-details a:hover {
  color: var(--accent);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  background: var(--bg);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  color: var(--text);
  transition: border-color 0.3s, box-shadow 0.3s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 60px 0 40px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
  letter-spacing: 0.02em;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s;
}

.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.footer-bottom {
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ RESPONSIVE — 1024px ============ */
@media (max-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .hero-inner {
    grid-template-columns: 1fr 300px;
    gap: 40px;
  }

  .hero-outline,
  .hero-filled {
    font-size: clamp(56px, 10vw, 100px);
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 32px;
  }

  .timeline::before {
    display: none;
  }

  .team-grid {
    gap: 28px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}

/* ============ RESPONSIVE — 768px ============ */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  /* Nav mobile */
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-inner {
    height: 60px;
  }

  /* Hero */
  .hero {
    padding-top: 60px;
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 24px;
  }

  .hero-outline,
  .hero-filled {
    font-size: clamp(48px, 14vw, 80px);
    -webkit-text-stroke-width: 2px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-preview {
    max-width: 320px;
  }

  .hero-card img {
    aspect-ratio: 16 / 10;
  }

  /* Works */
  .works {
    padding: 80px 0;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-title {
    margin-bottom: 40px;
  }

  /* Process */
  .process {
    padding: 80px 0;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .timeline-step {
    text-align: left;
    padding: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 20px;
    align-items: start;
  }

  .timeline-num {
    grid-row: 1 / 3;
    font-size: 48px;
    align-self: center;
  }

  .timeline-dot {
    display: none;
  }

  .timeline-step-title {
    align-self: end;
  }

  .timeline-step-desc {
    align-self: start;
  }

  /* Clients */
  .clients {
    padding: 60px 0 40px;
  }

  .marquee-item {
    font-size: 16px;
    padding: 0 32px;
  }

  /* Team */
  .team {
    padding: 80px 0;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Stats */
  .stats {
    padding: 60px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .stat-number {
    font-size: 48px;
  }

  /* Contact */
  .contact {
    padding: 80px 0;
  }

  .contact-heading {
    font-size: clamp(28px, 8vw, 40px);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

/* ============ RESPONSIVE — 480px ============ */
@media (max-width: 480px) {
  .hero-outline,
  .hero-filled {
    font-size: clamp(40px, 16vw, 64px);
    -webkit-text-stroke-width: 1.5px;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
    text-align: center;
  }

  .stat-number {
    font-size: 40px;
  }

  .mobile-menu ul li a {
    font-size: 22px;
  }

  .work-card-body {
    padding: 20px;
  }

  .work-card-title {
    font-size: 17px;
  }
}
