/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a1a2e;
  --accent: #e8b931;
  --accent-dark: #c99e1a;
  --bg: #f8f6f0;
  --card: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #e0ddd5;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --max-w: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== Header / Nav ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.1); }

nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}

.logo {
  font-size: 1.5rem; font-weight: 800; color: var(--primary);
  display: flex; align-items: center; gap: 8px;
}
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 0.95rem; font-weight: 500; color: var(--text-light);
  transition: color 0.2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  background: var(--accent); color: var(--primary) !important;
  padding: 10px 24px; border-radius: 8px; font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }
.nav-cta::after { display: none !important; }

/* Mobile menu */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span {
  display: block; width: 24px; height: 2px; background: var(--primary);
  margin: 6px 0; transition: 0.3s;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, #16213e 100%);
  color: white; position: relative; overflow: hidden;
  padding-top: 72px;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 800px; height: 800px; border-radius: 50%;
  background: rgba(232, 185, 49, 0.1);
}
.hero-content { position: relative; z-index: 1; max-width: 650px; }
.hero-badge {
  display: inline-block; background: rgba(232,185,49,0.2);
  color: var(--accent); padding: 6px 16px; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 24px;
  border: 1px solid rgba(232,185,49,0.3);
}
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.15rem; opacity: 0.85; margin-bottom: 36px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 8px; font-weight: 600;
  font-size: 1rem; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(232,185,49,0.3); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: flex; gap: 48px; margin-top: 60px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stats .stat-num { font-size: 2rem; font-weight: 800; color: var(--accent); }
.hero-stats .stat-label { font-size: 0.85rem; opacity: 0.6; margin-top: 4px; }

/* ===== Sections ===== */
section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.2rem; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.section-header p { color: var(--text-light); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.section-tag {
  display: inline-block; color: var(--accent-dark); font-weight: 700;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px;
}

/* ===== Services ===== */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--card); border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.service-icon {
  width: 56px; height: 56px; background: linear-gradient(135deg, var(--accent), #f0c94b);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
}
.service-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; color: var(--primary); }
.service-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }

/* ===== Portfolio ===== */
.portfolio-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}
.portfolio-card {
  border-radius: var(--radius); overflow: hidden; background: var(--card);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.3s;
}
.portfolio-card:hover { transform: translateY(-4px); }
.portfolio-img {
  height: 240px; background: linear-gradient(135deg, #ddd 0%, #ccc 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: #999; position: relative; overflow: hidden;
}
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-info { padding: 24px; }
.portfolio-info h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; color: var(--primary); }
.portfolio-info p { color: var(--text-light); font-size: 0.9rem; }
.portfolio-tag {
  display: inline-block; background: rgba(232,185,49,0.15); color: var(--accent-dark);
  padding: 4px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; margin-top: 12px;
}

/* ===== About ===== */
.about-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.about-text h2 { font-size: 2rem; font-weight: 800; margin-bottom: 20px; color: var(--primary); }
.about-text p { color: var(--text-light); margin-bottom: 16px; font-size: 1.05rem; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.about-feature {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.about-feature-icon { font-size: 1.5rem; flex-shrink: 0; }
.about-feature h4 { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.about-feature p { font-size: 0.85rem; color: var(--text-light); }

.about-visual {
  background: linear-gradient(135deg, var(--primary), #16213e);
  border-radius: var(--radius); padding: 48px; color: white;
  display: flex; flex-direction: column; gap: 24px;
}
.about-visual .big-number { font-size: 4rem; font-weight: 800; color: var(--accent); line-height: 1; }
.about-visual .big-label { font-size: 1.1rem; opacity: 0.8; }

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), #16213e);
  color: white; text-align: center; border-radius: var(--radius);
  padding: 80px 40px; margin: 0 24px;
}
.cta-section h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.cta-section p { opacity: 0.8; font-size: 1.1rem; margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ===== Contact ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
.contact-info-card {
  background: var(--card); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.contact-item { display: flex; gap: 16px; margin-bottom: 28px; }
.contact-item:last-child { margin-bottom: 0; }
.contact-icon {
  width: 48px; height: 48px; background: rgba(232,185,49,0.15);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.contact-item h4 { font-size: 0.85rem; color: var(--text-light); margin-bottom: 4px; }
.contact-item p { font-size: 1rem; font-weight: 600; color: var(--primary); }

.contact-form {
  background: var(--card); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.9rem; color: var(--primary); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; font-family: inherit;
  transition: border-color 0.2s; background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== Footer ===== */
footer {
  background: var(--primary); color: rgba(255,255,255,0.7);
  padding: 60px 0 30px; margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 { color: white; font-size: 0.95rem; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.9rem; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
  display: flex; justify-content: space-between; font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { 
    display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    background: white; flex-direction: column; padding: 40px 24px;
    gap: 24px; align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .menu-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
  .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

  .hero h1 { font-size: 2.2rem; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .about-content { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .portfolio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
}
