/* ==================================================
   本地字体
================================================== */

@font-face {
  font-family: "XuanZongTi";
  src: url("./fonts/XuanZongTi-web.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


/* ==================================================
   基础样式
================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-color: #050505;
  color: #d8d4cc;
  font-family: "Microsoft YaHei", "SimSun", serif;
  font-size: 15px;
  line-height: 1.9;
}

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

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-right: 30px;
  padding-left: 30px;
}

.section-space {
  padding-top: 105px;
  padding-bottom: 105px;
}


/* ==================================================
   顶部导航
================================================== */

.header {
  position: relative;
  z-index: 100;
  width: 100%;
  min-height: 70px;
  background-color: #2f0504;
  border-bottom: 1px solid #53110d;
}

.header-container {
  width: 100%;
  max-width: 1100px;
  min-height: 70px;
  margin: 0 auto;
  padding: 0 30px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  color: #c7a66a;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 22px;
  letter-spacing: 5px;
  text-decoration: none;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 72px;
  list-style: none;
}

.main-navigation__link {
  position: relative;
  color: #d7c8b4;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
  letter-spacing: 3px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-navigation__link::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: -8px;
  left: 50%;
  height: 1px;
  background-color: #b79a56;
  transition: right 0.35s ease, left 0.35s ease;
}

.main-navigation__link:hover {
  color: #c5a968;
}

.main-navigation__link:hover::after {
  right: 0;
  left: 0;
}


/* ==================================================
   针线拉开首页
================================================== */

.stitch-opening {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  animation: openingFinish 4.8s forwards;
}

.opening-curtain {
  position: absolute;
  top: 0;
  width: 50.2%;
  height: 100%;
  background-color: #020202;
}

.opening-curtain--left {
  left: 0;
  animation: curtainLeft 1.35s ease-in-out 3s forwards;
}

.opening-curtain--right {
  right: 0;
  animation: curtainRight 1.35s ease-in-out 3s forwards;
}

.opening-thread {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 180px;
  transform: translateY(-50%);
}

.opening-thread path {
  fill: none;
  stroke: #c8c3b8;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;

  animation:
    threadDraw 1.7s ease-out 0.25s forwards,
    threadFade 0.65s ease 2.75s forwards;
}

.opening-needle {
  position: absolute;
  top: -190px;
  left: 50%;
  z-index: 4;
  width: 20px;
  height: 190px;
  transform: translateX(-50%);

  animation:
    needleDrop 1.25s ease-out 1.1s forwards,
    needlePull 0.65s ease-in-out 2.35s forwards,
    needleFade 0.45s ease 3s forwards;
}

.needle-eye {
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 25px;
  border: 2px solid #dedbd3;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.needle-body {
  position: absolute;
  top: 21px;
  left: 50%;
  width: 3px;
  height: 165px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(
    to right,
    #777,
    #f4f1e9,
    #999
  );
  transform: translateX(-50%);
}

.opening-light {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #dfd5bd;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: openingLight 1s ease 2.15s forwards;
}

@keyframes threadDraw {
  from {
    opacity: 0;
    stroke-dashoffset: 1500;
  }

  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes threadFade {
  to {
    opacity: 0;
  }
}

@keyframes needleDrop {
  from {
    top: -190px;
  }

  to {
    top: calc(50% - 92px);
  }
}

@keyframes needlePull {
  from {
    top: calc(50% - 92px);
  }

  to {
    top: calc(50% - 55px);
  }
}

@keyframes needleFade {
  to {
    opacity: 0;
  }
}

@keyframes openingLight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(3);
    box-shadow: 0 0 28px rgba(223, 213, 189, 0.75);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(5);
  }
}

@keyframes curtainLeft {
  to {
    transform: translateX(-100%);
  }
}

@keyframes curtainRight {
  to {
    transform: translateX(100%);
  }
}

@keyframes openingFinish {
  0%,
  94% {
    visibility: visible;
  }

  100% {
    visibility: hidden;
  }
}


/* ==================================================
   首页主视觉
================================================== */

.hero {
  min-height: 650px;
  display: flex;
  align-items: center;
  background-color: #030303;
}

.hero-container {
  text-align: center;
}

.hero-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
}

.hero-title__word {
  width: 250px;
  max-height: 180px;
  object-fit: contain;
}

.hero-title__word--left {
  animation: wordFromLeft 1s ease-out 3.45s both;
}

.hero-title__word--right {
  animation: wordFromRight 1s ease-out 3.45s both;
}

.hero-title__pattern {
  width: 210px;
  height: 210px;
  object-fit: contain;
  animation: patternBreathing 3.8s ease-in-out 4s infinite;
}

.hero-slogan {
  margin-top: 48px;
  color: #ad8d4d;
  letter-spacing: 5px;
  opacity: 0;
  animation: sloganFade 1s ease 3.8s forwards;
}

.hero-slogan span {
  display: block;
  margin-top: 8px;
  color: #75623d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 2px;
}

@keyframes wordFromLeft {
  from {
    opacity: 0;
    transform: translateX(-55px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes wordFromRight {
  from {
    opacity: 0;
    transform: translateX(55px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes patternBreathing {
  0%,
  100% {
    opacity: 0.82;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.025);
  }
}

@keyframes sloganFade {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==================================================
   通用标题
================================================== */

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.flat-stitch-title h2,
.work-card__content h3 {
  font-family: "XuanZongTi", "STKaiti", "KaiTi", serif;
  font-weight: normal;
}

.section-heading h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 7px;
  color: #d6c3a3;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 5px;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 1px;
  background-color: #9a7845;
  transition: width 0.45s ease;
}

.section-heading:hover h2::after {
  width: 100%;
}

.section-heading span,
.flat-stitch-title p {
  display: block;
  margin-top: 5px;
  color: #9c8a6c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-style: normal;
  letter-spacing: 0.7px;
}

.section-heading--right {
  text-align: right;
}

.section-heading--center {
  text-align: center;
}


/* ==================================================
   通用正文
================================================== */

.introduction-content p,
.craft-feature__text p,
.feature-text p,
.artisan-description p,
.eye-detail-content p {
  margin-bottom: 16px;
  color: #a8a39b;
  font-size: 14px;
  line-height: 1.75;
  text-align: justify;
}


/* ==================================================
   湘绣简介
================================================== */

.introduction-container {
  min-height: 560px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 65px;
  align-items: center;
}

.introduction-image {
  overflow: hidden;
}

.introduction-image img {
  max-height: 550px;
  object-fit: contain;
  transition: transform 0.65s ease, filter 0.65s ease;
}

.introduction-image:hover img {
  transform: scale(1.035);
  filter: brightness(1.06);
}


/* ==================================================
   刺绣工艺
================================================== */

.craft {
  background-color: #050505;
}

.craft-steps {
  position: relative;
  max-width: 660px;
  margin: 45px auto 60px;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;

  list-style: none;
}

.craft-step {
  text-align: center;
  transition: transform 0.4s ease;
}

.craft-step:hover {
  transform: translateY(-8px);
}

.craft-step img {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  object-fit: contain;
  opacity: 0.86;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.craft-step:hover img {
  opacity: 1;
  transform: scale(1.08);
}

.craft-step h3 {
  color: #b59755;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 3px;
}

.craft-feature {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 55px;
  align-items: center;
}

.craft-feature__image {
  width: 100%;
  height: 480px;
  object-fit: cover;
  overflow: hidden;
  transition: transform 0.65s ease, filter 0.65s ease;
}

.craft-feature__image:hover {
  transform: scale(1.025);
  filter: brightness(1.06);
}


/* ==================================================
   施针规律和国画背景
================================================== */

.feature {
  position: relative;
  background:
    linear-gradient(
      rgba(4, 4, 4, 0.88),
      rgba(4, 4, 4, 0.96)
    ),
    url("https://res.cloudinary.com/rvg8nhpp/image/upload/v1790233769/%E9%9B%AA%E9%9C%81_1.webp") center 42% / cover no-repeat;

  border-top: 1px solid rgba(183, 154, 86, 0.12);
  border-bottom: 1px solid rgba(183, 154, 86, 0.12);
}

.feature-container {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 45px;
  align-items: center;
}

.feature-image--small {
  justify-self: end;
  overflow: hidden;
}

.feature-image--small img {
  width: 310px;
  max-height: 390px;
  object-fit: contain;
  transition: transform 0.65s ease, filter 0.65s ease;
}

.feature-image--small:hover img {
  transform: scale(1.035);
  filter: brightness(1.06);
}


/* ==================================================
   掺针视频
================================================== */

.artisan {
  background-color: #050505;
}

.artisan-media {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.artisan-heading {
  margin-left: 0;
}

.artisan-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 28px auto 0;
  object-fit: cover;
  background-color: #0d0d0d;
}

.artisan-description {
  width: 100%;
  margin: 24px auto 0;

  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.artisan-description p {
  margin-bottom: 13px;
  line-height: 1.72;
}

.artisan-description p:nth-child(3),
.artisan-description p:nth-child(4) {
  color: #88837c;
  font-family: Georgia, "Times New Roman", serif;
}


/* ==================================================
   平针法
================================================== */

.flat-stitch-section {
  padding: 105px 0 130px;
  background-color: #000;
  color: #9d9d9d;
}

.flat-stitch-container {
  width: 100%;
  max-width: 1090px;
  margin: 0 auto;
  padding: 0 24px;
}

.flat-stitch-title {
  width: 390px;
  margin-bottom: 38px;
  margin-left: auto;
  text-align: right;
}

.flat-stitch-title h2 {
  margin: 0;
  color: #d6c3a3;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 5px;
}

.flat-stitch-title p {
  font-weight: normal;
}

.flat-stitch-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}

.flat-stitch-introduction p,
.flat-stitch-description p {
  margin-bottom: 14px;
  color: #a8a39b;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.65;
  text-align: justify;
}

.flat-stitch-english {
  color: #858079 !important;
  font-family: Georgia, "Times New Roman", serif;
}

.flat-stitch-main-image {
  overflow: hidden;
}

.flat-stitch-main-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.65s ease, filter 0.65s ease;
}

.flat-stitch-main-image:hover img {
  transform: scale(1.035);
  filter: brightness(1.06);
}

.flat-stitch-bottom {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 38px;
}

.flat-stitch-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 29px;
  list-style: none;
}

.flat-stitch-gallery li {
  overflow: hidden;
}

.flat-stitch-gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.65s ease, filter 0.65s ease;
}

.flat-stitch-gallery li:hover img {
  transform: scale(1.035);
  filter: brightness(1.06);
}

.flat-stitch-description {
  padding-top: 14px;
}


/* ==================================================
   游针绣
================================================== */

.eye-detail-container {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 45px;
  align-items: center;
}

.eye-detail-gallery {
  display: grid;
  grid-template-columns: 1fr 0.68fr;
  gap: 18px;
  align-items: end;
  overflow: hidden;
}

.eye-detail-image {
  width: 100%;
  height: 560px;
  object-fit: cover;
  transition: transform 0.65s ease, filter 0.65s ease;
}

.eye-detail-image--detail {
  height: 430px;
}

.eye-detail-gallery:hover .eye-detail-image--detail {
  transform: scale(1.035);
  filter: brightness(1.06);
}


/* ==================================================
   作品赏析
================================================== */

.works {
  padding-bottom: 80px;
  background: linear-gradient(
    180deg,
    #050505 0%,
    #0b0908 100%
  );
}

.works-banner {
  width: 100%;
  height: 285px;
  margin-bottom: 75px;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.76);
}

.works-tip {
  margin: -8px 0 22px;
  color: #76654d;
  font-size: 12px;
  letter-spacing: 2px;
}

.works-slider {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 4px 0 28px;

  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #765e3d #171411;
}

.works-slider::-webkit-scrollbar {
  height: 6px;
}

.works-slider::-webkit-scrollbar-track {
  background-color: #171411;
}

.works-slider::-webkit-scrollbar-thumb {
  background-color: #765e3d;
  border-radius: 99px;
}

.work-card {
  flex: 0 0 min(920px, 88vw);
  min-height: 480px;

  display: grid;
  grid-template-columns: 1.45fr 0.75fr;

  background-color: #11100f;
  border: 1px solid rgba(183, 154, 86, 0.18);

  scroll-snap-align: start;

  transition:
    transform 0.45s ease,
    border-color 0.45s ease;
}

.work-card:hover {
  border-color: rgba(183, 154, 86, 0.42);
  transform: translateY(-5px);
}

.work-card__image-wrap {
  min-height: 480px;
  overflow: hidden;
  background-color: #090909;
}

.work-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s ease;
}

.work-card__image-wrap--portrait img {
  object-fit: contain;
}

.work-card:hover .work-card__image-wrap img {
  transform: scale(1.025);
}

.work-card__content {
  padding: 48px 34px;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.work-card__number {
  color: #79251f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  letter-spacing: 2px;
}

.work-card__content h3 {
  margin: 12px 0 20px;
  padding-bottom: 15px;
  color: #d1b98c;
  font-size: 23px;
  letter-spacing: 2px;
  border-bottom: 1px solid #554329;
}

.work-card__content p {
  color: #aaa49b;
  font-size: 13px;
  line-height: 1.75;
  text-align: justify;
}

.work-card__en {
  margin-top: 14px;
  color: #77716a !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px !important;
}


/* ==================================================
   页脚
================================================== */

.footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #340805,
    #1c0504
  );
  text-align: center;
}

.footer::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    url("./image/p1logo.svg")
    center / 330px
    no-repeat;
  opacity: 0.035;
}

.footer-container {
  position: relative;
  padding: 34px 20px 38px;
  color: #a98860;
  font-size: 12px;
  letter-spacing: 3px;
}

.footer-container p + p {
  margin-top: 5px;
  color: #725a43;
  letter-spacing: 1px;
}


/* ==================================================
   平板适配
================================================== */

@media (max-width: 900px) {
  .main-navigation {
    gap: 28px;
  }

  .hero {
    min-height: 540px;
  }

  .hero-title__word {
    width: 190px;
  }

  .hero-title__pattern {
    width: 160px;
    height: 160px;
  }

  .introduction-container,
  .craft-feature,
  .feature-container {
    gap: 35px;
  }

  .craft-feature {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .flat-stitch-top,
  .flat-stitch-bottom {
    grid-template-columns: 1fr;
  }

  .flat-stitch-title {
    width: 100%;
  }

  .flat-stitch-main-image {
    width: 65%;
    margin-left: auto;
  }

  .flat-stitch-description {
    padding-top: 0;
  }

  .eye-detail-container {
    grid-template-columns: 1fr;
  }

  .eye-detail-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .eye-detail-image,
  .eye-detail-image--detail {
    height: 460px;
  }

  .work-card {
    flex-basis: 82vw;
    grid-template-columns: 1.15fr 0.85fr;
  }
}


/* ==================================================
   手机适配
================================================== */

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .container {
    padding-right: 20px;
    padding-left: 20px;
  }

  .section-space {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .header-container {
    padding-top: 18px;
    padding-bottom: 18px;
    flex-direction: column;
    gap: 18px;
  }

  .main-navigation {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 25px;
  }

  .main-navigation__link {
    font-size: 14px;
    letter-spacing: 2px;
  }

  .opening-thread {
    height: 120px;
  }

  .hero {
    min-height: 430px;
  }

  .hero-title {
    gap: 10px;
  }

  .hero-title__word {
    width: 100px;
  }

  .hero-title__pattern {
    width: 90px;
    height: 90px;
  }

  .hero-slogan {
    margin-top: 30px;
    font-size: 12px;
    letter-spacing: 2px;
  }

  .hero-slogan span {
    padding: 0 20px;
    line-height: 1.6;
  }

  .section-heading h2,
  .flat-stitch-title h2 {
    font-size: 27px;
  }

  .section-heading--right {
    text-align: left;
  }

  .introduction-container,
  .craft-feature,
  .feature-container {
    grid-template-columns: 1fr;
  }

  .introduction-container {
    min-height: 0;
  }

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

  .craft-feature__image {
    height: auto;
    max-height: 480px;
  }

  .feature-image--small {
    justify-self: center;
  }

  .artisan-image {
    width: 100%;
    height: auto;
  }

  .flat-stitch-section {
    padding: 70px 0 80px;
  }

  .flat-stitch-container {
    padding: 0 18px;
  }

  .flat-stitch-main-image {
    width: 100%;
  }

  .flat-stitch-main-image img {
    height: auto;
  }

  .flat-stitch-gallery {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .flat-stitch-gallery img {
    height: auto;
  }

  .eye-detail-gallery {
    grid-template-columns: 1fr;
  }

  .eye-detail-image,
  .eye-detail-image--detail {
    width: 100%;
    height: auto;
    max-height: 520px;
  }

  .works-banner {
    height: 210px;
    margin-bottom: 55px;
  }

  .work-card {
    flex-basis: 88vw;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .work-card__image-wrap {
    min-height: 330px;
    height: 54vh;
  }

  .work-card__content {
    padding: 28px 24px 32px;
  }

  .work-card__content h3 {
    font-size: 20px;
  }
}


/* ==================================================
   小屏手机适配
================================================== */

@media (max-width: 480px) {
  .header-logo {
    font-size: 19px;
  }

  .main-navigation {
    gap: 12px 18px;
  }

  .main-navigation__link {
    font-size: 13px;
  }

  .hero-title__word {
    width: 82px;
  }

  .hero-title__pattern {
    width: 74px;
    height: 74px;
  }

  .hero-slogan p {
    font-size: 11px;
  }

  .craft-steps {
    gap: 28px 20px;
  }

  .flat-stitch-title {
    text-align: left;
  }

  .work-card {
    flex-basis: 92vw;
  }

  .work-card__image-wrap {
    height: 430px;
  }

  .works-tip {
    font-size: 11px;
    letter-spacing: 1px;
  }
}


/* ==================================================
   减少动态模式
================================================== */

@media (prefers-reduced-motion: reduce) {
  .stitch-opening {
    display: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}