/* ============================================================================
   潮龍 Chaolong Agave — international B2B site
   Pure static: system fonts only, no external requests (mainland-China safe).
   Visual language continues the approved hero comp: pure black, gold accents,
   warm cream text, cinematic feathered specimen.
   ============================================================================ */

:root {
  --black:       #000000;
  --ink:         #050505;      /* barely-off-black for alternating sections */
  --gold:        #c9a25b;
  --gold-bright: #d8b978;
  --cream:       #f2ece0;
  --cream-dim:   rgba(242, 236, 224, 0.72);
  --muted:       #8a8375;      /* dimmed warm grey — secondary text */
  --hairline:    rgba(201, 162, 91, 0.28);
  --card:        #0c0b09;
  --card-line:   rgba(201, 162, 91, 0.16);

  --serif:    Georgia, 'Times New Roman', 'Songti SC', 'STSong', 'Noto Serif CJK SC', serif;
  --serif-cn: 'Songti SC', 'STSong', 'Noto Serif CJK SC', Georgia, serif;
  --sans:     system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
}

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

html { scroll-behavior: smooth; }

html, body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body { line-height: 1.6; }

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

/* Shared inner width */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 64px);
}

/* ---------- Shared typographic atoms ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding-left: 0.5em;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.section-body {
  font-family: var(--serif);
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--cream-dim);
  max-width: 56ch;
  line-height: 1.68;
}

.divider {
  display: block;
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ============================ Top bar ============================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 5vw, 64px);
  background: linear-gradient(180deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
  transition: background 0.4s ease;
}
.topbar.is-scrolled {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 162, 91, 0.12);
}

.brand-mark {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-left: 0.4em;
  white-space: nowrap;
  transition: color 0.35s ease;
}
.brand-mark:hover { color: var(--cream); }

.lang {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lang button {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 4px 12px;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.lang button + button::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 10px;
  background: rgba(138, 131, 117, 0.4);
  transform: translateY(-50%);
}
.lang button:hover { color: var(--cream); }
.lang button.active { color: var(--gold-bright); }

/* ============================ 1. Hero ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--black);
  padding: clamp(84px, 11vh, 118px) 20px clamp(40px, 6vh, 80px);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: clamp(6px, 1.4vh, 16px);
}

/* Wordmark — luminous calligraphy, black canvas knocked out. Top of the stack,
   in the pure-black head-space. */
.wordmark {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: none;
  /* Reserve only the glyph band. The PNG is a square canvas that is mostly empty
     black; letting it overflow (masked + screen = invisible) means it no longer
     reserves ~250px of dead vertical space that would press onto the specimen. */
  height: clamp(64px, 8vh, 98px);
  overflow: visible;
  will-change: transform;
  opacity: 0;
  animation: fade-up 1.6s var(--ease) 0.3s forwards;
}
.wordmark img {
  width: clamp(168px, 18vw, 248px);
  height: auto;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 60% 46% at center, #000 60%, transparent 84%);
  mask-image: radial-gradient(ellipse 60% 46% at center, #000 60%, transparent 84%);
  user-select: none;
  -webkit-user-drag: none;
}

/* Specimen — the DOMINANT hero visual. The source PNG has heavy black margins,
   so the plant is only ~40% of the file. We grow the <img> well past the figure
   box and clip the overflow, turning it into a zoomed window where the rosette
   fills most of the frame. All four edges are feathered so it fuses into pure
   black with no rectangular seam. Box uses flex:1 to claim the space under the
   copy, making the plant large and centre-bottom. */
.hero-figure {
  position: relative;
  width: min(900px, 96vw);
  height: clamp(300px, 48vh, 560px);
  margin: clamp(6px, 1.2vh, 16px) auto 0;   /* clean gap below the wordmark */
  overflow: hidden;
  will-change: transform;
  opacity: 0;
  animation: rise-in 2s var(--ease) 0.5s forwards;
  /* Feather sides + bottom into pure black, but keep a tall, upward-biased opaque
     core (center 44%, vertical radius 92%, opaque to 54%) so the rosette CROWN at
     the top stays fully visible and is never faded into black. */
  -webkit-mask-image: radial-gradient(ellipse 60% 92% at 50% 44%, #000 54%, transparent 86%);
  mask-image: radial-gradient(ellipse 60% 92% at 50% 44%, #000 54%, transparent 86%);
}
.hero-figure img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  /* Zoom ~165% of the box: big and commanding, yet the whole rosette (crown to
     base) stays inside the frame — no crown clipping. Nudged down (-44%) so the
     crown clears the top edge with a little black headroom above it. */
  height: 165%;
  max-width: none;
  transform: translate(-50%, -44%);
  filter: saturate(1.03) contrast(1.02);
}
/* Cinematic vignette — crush the frame edges to true black, biased up and with a
   wide transparent core so the crown is not dimmed. */
.hero-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 84% at 50% 45%,
    transparent 52%, rgba(0,0,0,0.38) 80%, #000 100%);
}

.hero-copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 1.8vh, 18px);
  margin-top: clamp(14px, 2.4vh, 30px);
  padding: 0 16px;
  flex: none;
  opacity: 0;
  animation: fade-up 1.7s var(--ease) 0.7s forwards;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 50px);
  line-height: 1.1;
  letter-spacing: 0.008em;
  color: var(--cream);
  max-width: 20ch;
}
.hero-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--cream-dim);
  max-width: 52ch;
  line-height: 1.65;
}

/* Scroll cue — in normal flow beneath the copy. */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: clamp(22px, 3.4vh, 40px);
  text-decoration: none;
  opacity: 0;
  animation: fade-up 2s var(--ease) 1.1s forwards;
}
.scroll-cue span:first-child {
  font-size: 9.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 0.42em;
}
.scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(180deg, var(--gold), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  top: -50%; left: 0;
  width: 100%; height: 50%;
  background: var(--gold-bright);
  animation: drip 2.4s cubic-bezier(0.6, 0, 0.2, 1) infinite;
}

/* ============================ Generic section ============================ */
.section {
  position: relative;
  padding: clamp(76px, 12vh, 150px) 0;
}
.section--about     { background: var(--ink); }
.section--expertise { background: var(--black); }
.section--products  { background: var(--ink); }
.section--reach     { background: var(--black); }
.section--contact   { background: var(--ink); }

.section .eyebrow { margin-bottom: 20px; }
.section-title    { margin-bottom: 22px; }
.section-body     { margin-bottom: 8px; }

/* Longer narrative paragraphs (about / expertise / reach): generous measure
   and leading for high-end readability. */
.section-body--lede {
  max-width: 60ch;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.75;
  color: rgba(242, 236, 224, 0.82);
}

/* ---------- About: text + cinematic hand image ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.about-copy { min-width: 0; }

.about-figure {
  position: relative;
  min-width: 0;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  /* Feather all edges into pure black. Ellipse biased up-left so the lower-right
     corner (where the Gemini star watermark sits) fades fully to black. */
  -webkit-mask-image: radial-gradient(ellipse 66% 66% at 44% 42%, #000 40%, transparent 78%);
  mask-image: radial-gradient(ellipse 66% 66% at 44% 42%, #000 40%, transparent 78%);
}
.about-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Bias up/left so the palm's lower-right (and its watermark) is pushed out of
     frame; the corner feather + vignette finish the job. */
  object-position: 34% 30%;
  transform: scale(1.06);
  filter: saturate(1.02) contrast(1.02);
}
.about-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Extra crush on the lower-right corner to guarantee the watermark is gone. */
  background:
    radial-gradient(ellipse 70% 70% at 44% 42%, transparent 40%, rgba(0,0,0,0.4) 74%, #000 100%),
    radial-gradient(circle at 92% 88%, #000 0%, rgba(0,0,0,0.85) 12%, transparent 34%);
}

/* ---------- Products: placeholder cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(16px, 2vw, 26px);
  margin-top: clamp(34px, 5vh, 56px);
}
.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 91, 0.4);
}
.card-media {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(201,162,91,0.06), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.012) 0 12px, transparent 12px 24px),
    #080806;
}
.card-media__label {
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 16px;
}

/* ---------- Contact ---------- */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(34px, 5vh, 52px);
}
.contact-btn {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 160px;
  padding: 22px 30px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 3px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--sans);
  transition: transform 0.4s var(--ease), border-color 0.4s ease, background 0.4s ease;
}
.contact-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 91, 0.5);
  background: #100e0b;
}
.contact-btn__label {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.qr-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border: 1px dashed rgba(201, 162, 91, 0.35);
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 6px, transparent 6px 12px);
}

/* ============================ Footer ============================ */
.footer {
  padding: clamp(44px, 7vh, 72px) 0;
  background: var(--black);
  border-top: 1px solid rgba(201, 162, 91, 0.12);
}
.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.footer-tagline {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--muted);
}
.footer-copy {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(138, 131, 117, 0.7);
}

/* ============================ Scroll-reveal ============================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================ Keyframes ============================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes drip {
  0%   { top: -50%; }
  60%  { top: 100%; }
  100% { top: 100%; }
}

/* ============================ Reduced motion ============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .wordmark, .hero-copy, .hero-figure { opacity: 1 !important; }
}

/* ============================ Responsive ============================ */
/* Tablet */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: clamp(24px, 5vh, 44px); }
  .about-figure { aspect-ratio: 16 / 10; max-height: 60vh; order: 2; }
}

/* Mobile */
@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
  }
  .brand-mark { display: none; }
  .lang {
    justify-content: center;
    row-gap: 2px;
    max-width: 100%;
  }
  .lang button { padding: 7px 10px; font-size: 11px; letter-spacing: 0.06em; }

  .hero { padding: clamp(96px, 15vh, 140px) 18px clamp(44px, 7vh, 72px); }
  .hero-figure {
    width: min(430px, 94vw);
    height: clamp(280px, 42vh, 440px);
  }
  /* Portrait: a touch more zoom for presence, still keeping the full crown in frame. */
  .hero-figure img { height: 180%; transform: translate(-50%, -45%); }
  .hero-title { font-size: clamp(26px, 7.4vw, 38px); max-width: 16ch; }
  .hero-subtitle { font-size: 16px; max-width: 34ch; }

  .section { padding: clamp(64px, 10vh, 110px) 0; }
  .about-figure { aspect-ratio: 4 / 3; }

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

  .contact-actions { flex-direction: column; }
  .contact-btn { width: 100%; }
}

/* Very narrow (≈375 and below): keep the language row from crowding. */
@media (max-width: 400px) {
  .lang button { padding: 7px 8px; font-size: 10.5px; }
}
