/* TIANYAN MAPLE INC — deep evergreen + maple gold, editorial wood-trade */

:root {
  --bg: #eef2ef;
  --surface: #fbfcfa;
  --ink: #14221f;
  --muted: #4d5c57;
  --accent: #c9a227;
  --accent-deep: #1a3c34;
  --line: rgba(20, 34, 31, 0.12);
  --shadow: 0 18px 40px rgba(26, 60, 52, 0.12);
  --radius: 14px;
  --max: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, .tm-display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.tm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 250, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.tm-header__inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.tm-logo img {
  height: 46px;
  width: auto;
}

.tm-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.35rem;
}

.tm-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.88;
}

.tm-nav a:hover,
.tm-nav a.is-active {
  opacity: 1;
  color: var(--accent-deep);
}

.tm-menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--accent-deep);
}

@media (max-width: 768px) {
  .tm-menu-btn {
    display: inline-flex;
  }
  .tm-nav {
    position: absolute;
    right: 1rem;
    top: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .tm-nav.is-open {
    display: block;
  }
  .tm-nav ul {
    flex-direction: column;
    gap: 0.65rem;
  }
}

/* Main wrap */
.tm-main {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3.5rem;
}

/* Hero carousel */
.tm-hero {
  position: relative;
  min-height: min(700px, 90vh);
  border-radius: 6px;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.tm-hero__slides {
  position: absolute;
  inset: 0;
}

.tm-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 720ms ease;
}

.tm-hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.tm-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(105deg, rgba(26, 60, 52, 0.78) 0%, rgba(26, 60, 52, 0.35) 48%, rgba(20, 34, 31, 0.55) 100%);
}

.tm-hero__inner {
  position: relative;
  z-index: 3;
  max-width: 720px;
  padding: clamp(2.75rem, 6vw, 4.75rem) clamp(1.25rem, 4vw, 3rem) 5rem;
  color: #f5f7f6;
}

.tm-hero__panes {
  min-height: 11.5rem;
}

.tm-hero__pane {
  display: none;
}

.tm-hero__pane.is-active {
  display: block;
  animation: tm-fade 480ms ease;
}

@keyframes tm-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tm-kicker {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-family: "Source Sans 3", sans-serif;
  color: rgba(201, 162, 39, 0.95);
  margin: 0 0 0.65rem;
}

.tm-hero__pane h1,
.tm-hero__pane h2 {
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.1;
  margin: 0 0 0.85rem;
  color: #fff;
}

.tm-lead {
  margin: 0;
  font-size: clamp(1rem, 1.55vw, 1.12rem);
  max-width: 48ch;
  opacity: 0.93;
}

.tm-hero__cta {
  margin-top: 1.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.tm-btn:hover {
  transform: translateY(-1px);
}

.tm-btn--solid {
  background: var(--accent);
  color: #1a1204;
  border-color: rgba(201, 162, 39, 0.4);
}

.tm-btn--solid:hover {
  background: #d4ae32;
}

.tm-btn--line {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.tm-btn--line:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tm-hero__prev,
.tm-hero__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 34, 31, 0.35);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}

.tm-hero__prev:hover,
.tm-hero__next:hover {
  background: rgba(20, 34, 31, 0.55);
}

.tm-hero__prev {
  left: 0.75rem;
}

.tm-hero__next {
  right: 0.75rem;
}

.tm-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  background: rgba(20, 34, 31, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tm-hero__dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}

.tm-hero__dot.is-active {
  background: var(--accent);
  transform: scale(1.12);
}

@media (max-width: 640px) {
  .tm-hero__prev,
  .tm-hero__next {
    display: none;
  }
  .tm-hero {
    min-height: min(620px, 88vh);
    border-radius: 4px;
  }
}

/* Sections */
.tm-section {
  margin-bottom: 3rem;
}

.tm-section__head {
  margin-bottom: 1.35rem;
}

.tm-section__head .tm-kicker {
  color: var(--accent-deep);
  opacity: 0.85;
}

.tm-section__head h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0.35rem 0 0;
  color: var(--accent-deep);
}

/* Product grid — fixed 4 columns, equal cards */
.tm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

@media (max-width: 1024px) {
  .tm-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .tm-grid {
    grid-template-columns: 1fr;
  }
}

.tm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 60, 52, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.tm-card__img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e3e8e5;
}

.tm-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-card__body {
  padding: 1rem 1.05rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tm-card__body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  color: var(--accent-deep);
}

.tm-card__body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
}

/* Intro split */
.tm-intro {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.75rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.tm-intro__media {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  min-height: 280px;
}

.tm-intro__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.tm-intro__text h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  color: var(--accent-deep);
}

.tm-intro__text p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.98rem;
}

@media (max-width: 860px) {
  .tm-intro {
    grid-template-columns: 1fr;
  }
}

/* Testimonials */
.tm-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .tm-testimonials {
    grid-template-columns: 1fr;
  }
}

.tm-quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 8px 22px rgba(26, 60, 52, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tm-quote__stars {
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.tm-quote__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  flex: 1;
}

.tm-quote__who {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tm-quote__who img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.tm-quote__meta strong {
  display: block;
  font-size: 0.92rem;
  color: var(--accent-deep);
}

.tm-quote__meta span {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Message split */
.tm-message {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tm-message__visual {
  min-height: 320px;
}

.tm-message__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.tm-message__form-wrap {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.tm-message__form-wrap h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  color: var(--accent-deep);
}

.tm-message__form-wrap > p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.tm-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--accent-deep);
  margin-bottom: 0.3rem;
}

.tm-form input,
.tm-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  font: inherit;
  margin-bottom: 0.85rem;
  background: #fff;
}

.tm-form textarea {
  min-height: 120px;
  resize: vertical;
}

.tm-form button {
  margin-top: 0.25rem;
  cursor: pointer;
  border: 0;
}

@media (max-width: 860px) {
  .tm-message {
    grid-template-columns: 1fr;
  }
  .tm-message__visual {
    order: -1;
    min-height: 220px;
  }
  .tm-message__visual img {
    min-height: 220px;
  }
}

/* Footer */
.tm-footer {
  background: var(--accent-deep);
  color: rgba(245, 247, 246, 0.92);
  margin-top: 2rem;
  padding: 2.5rem 0 2rem;
}

.tm-footer__inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .tm-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .tm-footer__inner {
    grid-template-columns: 1fr;
  }
}

.tm-footer__brand img {
  height: 44px;
  width: auto;
  margin-bottom: 0.65rem;
}

.tm-footer__brand p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.88;
  max-width: 36ch;
}

.tm-footer h3 {
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
  color: rgba(201, 162, 39, 0.95);
}

.tm-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tm-footer a {
  color: inherit;
  text-decoration: none;
  opacity: 0.88;
  font-size: 0.92rem;
}

.tm-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

.tm-footer__contact p {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.tm-social {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.tm-social a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.tm-social a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.tm-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.tm-footer__bottom {
  width: min(var(--max), calc(100% - 2rem));
  margin: 1.75rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  opacity: 0.75;
  text-align: center;
}

/* About page */
.tm-about-hero {
  margin-bottom: 2rem;
}

.tm-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.tm-about-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.tm-about-prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.tm-about-prose h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  color: var(--accent-deep);
}

.tm-about-prose p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.tm-about-prose p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .tm-about-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact page */
.tm-contact-banner {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
  max-height: 340px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tm-contact-banner img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.tm-contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow);
}

.tm-contact-split__img {
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
}

.tm-contact-split__img img {
  width: 100%;
  min-height: 300px;
  object-fit: cover;
}

.tm-contact-split__info h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 2.6vw, 2.1rem);
  color: var(--accent-deep);
}

.tm-contact-split__info p {
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.tm-contact-split__info a {
  color: var(--accent-deep);
  font-weight: 650;
}

@media (max-width: 768px) {
  .tm-contact-split {
    grid-template-columns: 1fr;
  }
}
