/* XIAOJIE INC — building materials (warm terracotta + slate) */

:root {
  --xj-terracotta: #c45c3e;
  --xj-terracotta-dark: #9a432c;
  --xj-slate: #1e293b;
  --xj-slate-soft: #334155;
  --xj-cream: #faf6f1;
  --xj-sand: #e8e3db;
  --xj-white: #ffffff;
  --xj-radius: 20px;
  --xj-shadow: 0 22px 50px rgba(30, 41, 59, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--xj-slate);
  background: var(--xj-cream);
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--xj-terracotta);
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 241, 0.92);
  border-bottom: 1px solid rgba(30, 41, 59, 0.08);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a {
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  border-bottom-color: var(--xj-terracotta);
  color: var(--xj-slate);
}

/* —— Page shell —— */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.35rem 3rem;
}

.section__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--xj-terracotta);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.section__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: var(--xj-slate);
}

.section__lead {
  margin: 0 0 1.75rem;
  max-width: 62ch;
  color: var(--xj-slate-soft);
  font-size: 1.02rem;
}

/* —— Hero carousel (3 slides) —— */
.xj-hero {
  position: relative;
  margin: 0 auto 2.25rem;
  max-width: 1180px;
  min-height: min(78vh, 640px);
  border-radius: var(--xj-radius);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--xj-shadow);
}

.xj-hero__slides {
  position: absolute;
  inset: 0;
}

.xj-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 720ms ease;
}

.xj-hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.xj-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xj-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
      115deg,
      rgba(30, 41, 59, 0.78) 0%,
      rgba(30, 41, 59, 0.35) 48%,
      rgba(196, 92, 62, 0.25) 100%
    ),
    linear-gradient(0deg, rgba(30, 41, 59, 0.55), transparent 45%);
}

.xj-hero__content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 6vw, 4rem);
}

.xj-hero__copy {
  max-width: 36rem;
  color: var(--xj-cream);
}

.xj-hero__copy h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.xj-hero__copy p {
  margin: 0 0 1.35rem;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  opacity: 0.94;
  line-height: 1.55;
}

.xj-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.35rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--xj-terracotta);
  color: var(--xj-white);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn--primary:hover {
  background: var(--xj-terracotta-dark);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--xj-cream);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.xj-hero__side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(30, 41, 59, 0.45);
  color: var(--xj-cream);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.xj-hero__side:hover {
  background: rgba(196, 92, 62, 0.55);
}

.xj-hero__side--prev {
  left: 0.85rem;
}

.xj-hero__side--next {
  right: 0.85rem;
}

.xj-hero__controls {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 5;
}

.xj-hero__dots {
  display: flex;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.xj-hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.xj-hero__dot.is-active {
  background: var(--xj-white);
  transform: scale(1.12);
}

@media (max-width: 640px) {
  .xj-hero__side {
    display: none;
  }
}

/* —— Products: fixed 4-column grid, equal cards —— */
.product-section {
  padding: 0.5rem 0 2.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  background: var(--xj-white);
  border-radius: var(--xj-radius);
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: 0 14px 36px rgba(30, 41, 59, 0.07);
}

.product-card__media {
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.product-card__body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--xj-slate-soft);
  flex: 1;
}

.product-grid__filler {
  min-height: 360px;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid__filler {
    display: none;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Company strip —— */
.company-strip {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.75rem;
  align-items: center;
  padding: 2.5rem 0 1rem;
}

.company-strip__media {
  border-radius: var(--xj-radius);
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: var(--xj-shadow);
  min-height: 280px;
}

.company-strip__media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .company-strip {
    grid-template-columns: 1fr;
  }
}

/* —— Testimonials —— */
.testimonials {
  padding: 2.75rem 0 1rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.review-card {
  background: var(--xj-white);
  border-radius: var(--xj-radius);
  padding: 1.2rem 1.25rem;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: 0 14px 36px rgba(30, 41, 59, 0.07);
  min-height: 100%;
}

.review-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.review-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.review-card__name {
  font-weight: 700;
}

.review-card__role {
  font-size: 0.88rem;
  color: var(--xj-slate-soft);
  margin-top: 0.1rem;
}

.review-card__stars {
  color: #d97706;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.55rem;
}

.review-card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--xj-slate-soft);
}

@media (max-width: 900px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Message split —— */
.message-section {
  padding: 2.5rem 0 1rem;
}

.message-split {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-top: 1.25rem;
}

.message-split__media {
  border-radius: var(--xj-radius);
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: var(--xj-shadow);
  min-height: 320px;
}

.message-split__media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.xj-form {
  border-radius: var(--xj-radius);
  padding: 1.35rem;
  background: var(--xj-white);
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: var(--xj-shadow);
  display: grid;
  gap: 0.95rem;
}

.xj-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.xj-field {
  display: grid;
  gap: 0.35rem;
}

.xj-field span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--xj-slate-soft);
}

.xj-field input,
.xj-field textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(30, 41, 59, 0.14);
  padding: 0.78rem 0.9rem;
  font: inherit;
  background: var(--xj-cream);
  outline: none;
}

.xj-field input:focus,
.xj-field textarea:focus {
  border-color: var(--xj-terracotta);
}

.xj-field textarea {
  resize: vertical;
  min-height: 140px;
}

.xj-form__hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--xj-slate-soft);
}

@media (max-width: 900px) {
  .message-split {
    grid-template-columns: 1fr;
  }

  .message-split__media {
    order: -1;
  }
}

@media (max-width: 600px) {
  .xj-form__row {
    grid-template-columns: 1fr;
  }
}

/* —— About page —— */
.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.about-hero-grid figure {
  margin: 0;
  border-radius: var(--xj-radius);
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: var(--xj-shadow);
}

.about-hero-grid img {
  width: 100%;
  height: min(52vh, 420px);
  object-fit: cover;
}

.about-prose {
  max-width: 720px;
}

.about-prose p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--xj-slate-soft);
}

@media (max-width: 768px) {
  .about-hero-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Contact page —— */
.contact-banner {
  margin: 0 auto 2rem;
  max-width: 1180px;
  border-radius: var(--xj-radius);
  overflow: hidden;
  max-height: 320px;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: var(--xj-shadow);
}

.contact-banner img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.contact-split__figure {
  margin: 0;
  border-radius: var(--xj-radius);
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: var(--xj-shadow);
}

.contact-split__figure img {
  width: 100%;
  min-height: 360px;
  object-fit: cover;
}

.contact-card {
  background: var(--xj-white);
  padding: 1.5rem 1.6rem;
  border-radius: var(--xj-radius);
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: var(--xj-shadow);
}

.contact-card h2 {
  font-family: "Fraunces", Georgia, serif;
  margin: 0 0 1rem;
}

.contact-card dl {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.contact-card dt {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--xj-terracotta);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-card dd {
  margin: 0;
  font-size: 1.05rem;
}

.contact-card a {
  color: var(--xj-terracotta);
  font-weight: 600;
}

@media (max-width: 860px) {
  .contact-split {
    grid-template-columns: 1fr;
  }
}

/* —— Footer —— */
.site-footer {
  margin-top: 3rem;
  background: var(--xj-slate);
  color: rgba(250, 246, 241, 0.88);
  padding: 2.5rem 1.35rem 2rem;
}

.site-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 1.75rem;
}

.site-footer__brand img {
  height: 40px;
  width: auto;
  margin-bottom: 0.75rem;
}

.site-footer__brand p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0.88;
}

.site-footer h3 {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.95rem;
}

.site-footer a:hover {
  color: var(--xj-white);
}

.social-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.social-row a {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.social-row a:hover {
  background: rgba(196, 92, 62, 0.35);
  color: var(--xj-white);
}

.site-footer__fine {
  max-width: 1180px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  opacity: 0.65;
  text-align: center;
}

@media (max-width: 960px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}
