/* ============================================
   插画师个人网站 — 样式
   ============================================ */

/* --- 变量 --- */
:root {
  --bg: #faf9f7;
  --bg-alt: #f3f0eb;
  --text: #2c241b;
  --text-light: #7a6f63;
  --accent: #c97b5d;
  --accent-light: #e8c4b4;
  --border: #e3ddd6;
  --card-bg: #ffffff;
  --shadow: 0 4px 24px rgba(44, 36, 27, 0.06);
  --radius: 16px;
  --radius-sm: 8px;
  --font-serif: "STSong", "Songti SC", "PingFang SC", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --max-w: 1200px;
  --header-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding-top: var(--header-h);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.site-nav a.active {
  color: var(--text);
}

/* --- Mobile Menu --- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Hero Section --- */
.hero {
  padding: 40px 24px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  min-height: auto;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.3;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-text .subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.hero-text .tagline {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image .placeholder {
  color: var(--text-light);
  font-size: 0.9rem;
  opacity: 0.6;
  text-align: center;
  padding: 40px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #b86a4a;
  color: #fff;
}

.btn-outline {
  border-color: var(--text);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Section Common --- */
.section {
  padding: 32px 24px;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 28px;
  max-width: 600px;
}

.section-title-centered {
  text-align: center;
}

.section-desc-centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- Featured Works (Home) --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.art-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.art-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(44, 36, 27, 0.1);
}

.art-card-image {
  background: var(--bg-alt);
  display: flex;
  overflow: hidden;
}

.art-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.art-card-image .placeholder {
  color: var(--text-light);
  font-size: 0.8rem;
  opacity: 0.5;
  text-align: center;
  padding: 20px;
}

.art-card-info {
  padding: 16px 20px 20px;
}

.art-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.art-card-category {
  font-size: 0.8rem;
  color: var(--text-light);
}

.view-all {
  text-align: center;
  margin-top: 40px;
}

/* --- Portfolio / Gallery --- */
.gallery-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.masonry-grid {
  column-count: 3;
  column-gap: 20px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  cursor: pointer;
}

.masonry-item:hover {
  transform: translateY(-2px);
}

.masonry-item .art-card-image {
  min-height: 200px;
}

.masonry-item .art-card-image .placeholder {
  padding: 60px 20px;
}

.masonry-item .art-card-info {
  padding: 12px 16px 16px;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
}

.lightbox-image {
  max-height: 70vh;
  min-width: 300px;
  min-height: 200px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image .placeholder {
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 60px;
}

/* 下载按钮 */
.lightbox-download {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 22px;
  border-radius: 100px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox-download:hover {
  background: #b86a4a;
}

  background: #4a7a49;
}

.lightbox-info { text-align: center;
  padding: 16px 24px 20px;
}

.lightbox-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.lightbox-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav.prev {
  left: 24px;
}

.lightbox-nav.next {
  right: 24px;
}

/* --- About Page --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image .placeholder {
  color: var(--text-light);
  font-size: 0.9rem;
  opacity: 0.6;
  padding: 40px;
  text-align: center;
}

.about-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.about-content p {
  margin-bottom: 16px;
  color: var(--text-light);
  line-height: 1.9;
}

.about-content .highlight {
  color: var(--text);
  font-weight: 600;
}

/* --- Licensing Page --- */
.licensing-intro {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--text-light);
  line-height: 1.9;
}

.licensing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.step-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}

.license-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.license-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.license-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.license-card .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.license-card ul {
  list-style: none;
  padding: 0;
}

.license-card li {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 4px 0;
  line-height: 1.6;
}

.license-card li::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 600;
}

/* --- Contact Page --- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.9;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.contact-detail .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-form {
  background: var(--card-bg);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: var(--bg);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.form-submit:hover {
  background: #b86a4a;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
}

.site-footer .social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

.site-footer .social-links a {
  color: var(--text-light);
  font-size: 0.9rem;
}

.site-footer .social-links a:hover {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 24px 40px;
    min-height: auto;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .licensing-steps {
    grid-template-columns: 1fr;
  }

  .license-types {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .menu-toggle {
    display: block;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    column-count: 1;
  }

  .section {
    padding: 48px 20px;
  }

  .contact-form {
    padding: 24px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    text-align: center;
  }
}

/* 购买授权按钮 */
.lightbox-license {
  display: inline-block;
  margin-top: 12px;
  margin-left: 8px;
  padding: 8px 22px;
  border-radius: 100px;
  border: none;
  background: #c97b5d;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}
.lightbox-license:hover {
  background: #b86a4a;
}


/* --- Search Bar --- */
.search-bar {
  position: relative;
  max-width: 400px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
}

.search-bar input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 123, 93, 0.1);
}

.search-bar input::placeholder {
  color: var(--text-light);
  opacity: 0.6;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0.5;
}

.search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  color: var(--text-light);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.search-clear:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.search-no-result {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  padding: 40px 0;
}

@media (max-width: 600px) {
  .search-bar {
    max-width: 100%;
    margin-bottom: 20px;
  }
}

/* --- Image Search --- */
.img-search-bar {
  max-width: 500px;
  margin: 0 auto 20px;
}
.img-search-drop {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.img-search-drop:hover,
.img-search-drop.drag {
  border-color: var(--accent);
  background: #fef5f0;
  color: var(--accent);
}
.img-search-icon {
  font-size: 1.2rem;
}
.img-search-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 6px;
  display: none;
}
@media (max-width: 600px) {
  .img-search-bar { max-width: 100%; }
}
