/* YISHUANG INC — burgundy + sage, card layout, no JS carousel */
:root {
  --ink: #1f1a1c;
  --muted: rgba(31, 26, 28, 0.68);
  --paper: #f7f3ee;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(31, 26, 28, 0.1);
  --accent: #6b2d3c;
  --accent-2: #5c6f56;
  --shadow: 0 22px 50px rgba(31, 26, 28, 0.1);
  --radius: 20px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(107, 45, 60, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(92, 111, 86, 0.1), transparent 50%),
    var(--paper);
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 238, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  width: min(1160px, calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; opacity: 0.9; }
.site-logo img { width: 140px; height: auto; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}
.site-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  opacity: 0.85;
}
.site-nav a:hover { opacity: 1; text-decoration: underline; }

.container { width: min(1140px, calc(100% - 2.5rem)); margin: 0 auto; }

/* ----- Hero: CSS-only autoplay + :target manual ----- */
.hero {
  position: relative;
  margin: 1.25rem auto 0;
  width: min(1160px, calc(100% - 2rem));
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  min-height: min(640px, 88vh);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero__hash {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  visibility: hidden;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-duration: 18s;
}

/* Three slides — ~6s each per 18s loop */
@keyframes hero-s1 {
  0%, 28% { opacity: 1; z-index: 2; visibility: visible; }
  33%, 100% { opacity: 0; z-index: 0; visibility: hidden; }
}
@keyframes hero-s2 {
  0%, 30% { opacity: 0; z-index: 0; visibility: hidden; }
  33%, 61% { opacity: 1; z-index: 2; visibility: visible; }
  66%, 100% { opacity: 0; z-index: 0; visibility: hidden; }
}
@keyframes hero-s3 {
  0%, 63% { opacity: 0; z-index: 0; visibility: hidden; }
  66%, 94% { opacity: 1; z-index: 2; visibility: visible; }
  100% { opacity: 0; z-index: 0; visibility: hidden; }
}

.hero__slide:nth-child(1) { animation-name: hero-s1; }
.hero__slide:nth-child(2) { animation-name: hero-s2; }
.hero__slide:nth-child(3) { animation-name: hero-s3; }

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg, rgba(31, 26, 28, 0.72) 0%, rgba(31, 26, 28, 0.35) 45%, rgba(31, 26, 28, 0.55) 100%);
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn--primary {
  background: #fff;
  color: var(--accent);
}
.btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

/* Manual: pause autoplay when a slide anchor is :target */
#ys-slide-1:target ~ .hero__slides .hero__slide,
#ys-slide-2:target ~ .hero__slides .hero__slide,
#ys-slide-3:target ~ .hero__slides .hero__slide {
  animation: none !important;
  opacity: 0;
  visibility: hidden;
}

#ys-slide-1:target ~ .hero__slides .hero__slide:nth-child(1),
#ys-slide-2:target ~ .hero__slides .hero__slide:nth-child(2),
#ys-slide-3:target ~ .hero__slides .hero__slide:nth-child(3) {
  opacity: 1;
  z-index: 4;
  visibility: visible;
}

/* Per-slide copy visibility follows slide image (same keyframes) */
.hero__text-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.hero__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  max-width: 640px;
  opacity: 0;
  z-index: 0;
  visibility: hidden;
  animation-duration: 18s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.hero__text:nth-child(1) { animation-name: hero-s1; }
.hero__text:nth-child(2) { animation-name: hero-s2; }
.hero__text:nth-child(3) { animation-name: hero-s3; }

#ys-slide-1:target ~ .hero__text-layer .hero__text,
#ys-slide-2:target ~ .hero__text-layer .hero__text,
#ys-slide-3:target ~ .hero__text-layer .hero__text {
  animation: none !important;
  opacity: 0;
  visibility: hidden;
}

#ys-slide-1:target ~ .hero__text-layer .hero__text:nth-child(1),
#ys-slide-2:target ~ .hero__text-layer .hero__text:nth-child(2),
#ys-slide-3:target ~ .hero__text-layer .hero__text:nth-child(3) {
  opacity: 1;
  z-index: 5;
  visibility: visible;
}

.hero__controls {
  position: absolute;
  left: 50%;
  bottom: 1.15rem;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero__dot--link {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  text-indent: -9999px;
  overflow: hidden;
}

.hero__dot--link:hover {
  background: rgba(255, 255, 255, 0.75);
}

/* Highlight active dot when URL hash matches (manual mode) */
#ys-slide-1:target ~ .hero__controls a[href="#ys-slide-1"],
#ys-slide-2:target ~ .hero__controls a[href="#ys-slide-2"],
#ys-slide-3:target ~ .hero__controls a[href="#ys-slide-3"] {
  background: #fff;
  transform: scale(1.12);
}

.hero__resume {
  margin-left: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-decoration: none;
}
.hero__resume:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }

/* Sections */
.section { padding: clamp(3rem, 5vw, 4.5rem) 0; }
.section__head { margin-bottom: 1.35rem; }
.section__kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.section__title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  letter-spacing: -0.02em;
}

/* Product grid — fixed 4 columns, equal cards */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card__img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(31, 26, 28, 0.06);
}

.card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body { padding: 1rem 1.05rem 1.15rem; }
.card__title { margin: 0 0 0.35rem; font-size: 1.02rem; font-weight: 700; }
.card__desc { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* About strip on home */
.about-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}
.about-strip__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 280px;
}
.about-strip__media img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.about-strip__text h2 {
  font-family: Georgia, "Times New Roman", serif;
  margin-top: 0;
}
.about-strip__text p { color: var(--muted); }

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.review {
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 100%;
}
.review__head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.review__avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.review__name { font-weight: 700; }
.review__role { font-size: 0.88rem; color: var(--muted); }
.review__stars { color: #c9a24d; font-size: 0.95rem; letter-spacing: 0.06em; margin-bottom: 0.55rem; }
.review__text { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Split message */
.section__head--center { text-align: center; }
.split {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 1.15rem;
  align-items: stretch;
}
.split__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 320px;
}
.split__media img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }

.form {
  border-radius: var(--radius);
  padding: 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.field { display: grid; gap: 0.3rem; }
.field__label { font-size: 0.88rem; color: var(--muted); }
.field__input,
.field__textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0.8rem 0.9rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.95);
}
.field__textarea { resize: vertical; min-height: 140px; }
.form__hint { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* Footer */
.footer {
  margin-top: 2rem;
  background: linear-gradient(180deg, rgba(107, 45, 60, 0.06), rgba(92, 111, 86, 0.08));
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 1.25rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.footer__logo:hover { text-decoration: none; opacity: 0.88; }
.footer__logo img { width: 150px; height: auto; }
.footer__desc { margin: 0.65rem 0 1rem; color: var(--muted); max-width: 40ch; font-size: 0.95rem; }
.footer__title { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.65rem; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer__list a { color: var(--ink); font-weight: 600; }
.footer__social { display: flex; gap: 0.55rem; margin-top: 0.85rem; }
.footer__social a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}
.footer__social a:hover { text-decoration: none; background: #fff; }
.footer__social svg { width: 18px; height: 18px; fill: currentColor; }
.footer__bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

/* About page */
.page-hero { padding: 1.5rem 0 0; }
.page-hero__inner {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: min(420px, 55vh);
}
.page-hero__inner img { width: 100%; height: min(420px, 55vh); object-fit: cover; }

.about-page { padding: 2.5rem 0 3rem; }
.about-page__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.about-page__figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.about-page__figure img { width: 100%; height: auto; min-height: 260px; object-fit: cover; }
.about-page__prose { font-size: 1.05rem; color: var(--muted); }
.about-page__prose h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  margin-top: 0;
}

/* Contact page */
.contact-banner {
  width: min(1160px, calc(100% - 2rem));
  margin: 1.25rem auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: min(380px, 48vh);
}
.contact-banner img { width: 100%; height: min(380px, 48vh); object-fit: cover; }

.contact-body { padding: 2.5rem 0 3rem; }
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.contact-split__media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.contact-split__media img { width: 100%; min-height: 300px; object-fit: cover; }
.contact-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.contact-card h2 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; }
.contact-card dl { margin: 0; display: grid; gap: 1rem; }
.contact-card dt { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.contact-card dd { margin: 0; font-weight: 600; }

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .about-strip { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .about-page__grid { grid-template-columns: 1fr; }
  .contact-split { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .site-nav { justify-content: flex-end; }
}
