/* Yihang Food — Premium Demo Shared Styles */
/* Loaded on every page via <link> or <style> block */

/* Base */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; }
.font-display { font-family: 'Cabinet Grotesk', sans-serif; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Card hover */
.product-card { transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px -12px rgba(15,31,19,.18); }
.product-card img { transition: transform .6s cubic-bezier(.16,1,.3,1); }
.product-card:hover img { transform: scale(1.05); }

/* Cert badge */
.cert-badge { transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s; }
.cert-badge:hover { transform: translateY(-3px); border-color: #68a06d; }

/* Spec table */
.spec-table th { background: #f2f7f2; font-weight: 600; color: #1d3822; }
.spec-table td, .spec-table th { padding: 1rem 1.25rem; border-bottom: 1px solid #e0ede0; }
.spec-table tr:last-child td { border-bottom: none; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid #e0ede0; }
.faq-item:last-child { border-bottom: none; }
.faq-btn { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 0; cursor: pointer; background: none; border: none; }
.faq-btn svg { transition: transform .3s; }
.faq-btn.active svg { transform: rotate(45deg); }
.faq-content { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.16,1,.3,1); }
.faq-content.open { max-height: 500px; }

/* Countdown */
.countdown-digit { font-variant-numeric: tabular-nums; }

/* Language switcher */
.lang-btn { transition: all .2s; }
.lang-btn.active { background: #244329; color: white; }

/* Breadcrumb */
.breadcrumb a { color: #68a06d; }
.breadcrumb a:hover { color: #47834d; }
.breadcrumb span { color: #1c1f1a99; }

/* Article body */
.article-body h2 { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; font-size: 1.5rem; color: #1d3822; margin-top: 2.5rem; margin-bottom: 1rem; }
.article-body p { color: #1c1f1ab3; line-height: 1.75; margin-bottom: 1.25rem; }
.article-body ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; color: #1c1f1ab3; }
.article-body li { margin-bottom: .5rem; }

/* VR placeholder */
.vr-placeholder { border: 2px dashed #c2dbc3; border-radius: 1.5rem; background: #f2f7f2; }
.vr-placeholder-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5rem 2rem; text-align: center; }

/* Trust badge strip */
.trust-badge { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem; background: white; border: 1px solid #e0ede0; border-radius: 9999px; }
.trust-badge svg { color: #47834d; }

/* Landing page hero */
.landing-hero { min-height: 100dvh; display: flex; align-items: flex-end; }

/* Media logo placeholder */
.media-logo { opacity: .35; filter: grayscale(1); transition: all .3s; }
.media-logo:hover { opacity: .7; filter: grayscale(0); }

/* Testimonial */
.testimonial { background: white; border: 1px solid #e0ede0; border-radius: 1.5rem; padding: 2rem; }
.testimonial-quote { font-size: 1.125rem; color: #1c1f1ab3; line-height: 1.7; font-style: italic; }
.testimonial-author { margin-top: 1.5rem; display: flex; align-items: center; gap: .75rem; }
.testimonial-avatar { width: 2.5rem; height: 2.5rem; border-radius: 9999px; background: #e0ede0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #47834d; font-size: .875rem; }

/* Inquiry form */
.inquiry-form input, .inquiry-form select, .inquiry-form textarea {
  width: 100%; border-radius: .75rem; border: 1px solid #c2dbc3; padding: .875rem 1rem;
  font-size: .875rem; outline: none; transition: all .2s; background: white;
}
.inquiry-form input:focus, .inquiry-form select:focus, .inquiry-form textarea:focus {
  border-color: #47834d; box-shadow: 0 0 0 3px #f2f7f2;
}
.inquiry-form label { font-size: .875rem; font-weight: 600; color: #1d3822; margin-bottom: .375rem; display: block; }

/* Page header */
.page-header { background: #1d3822; color: white; padding: 5rem 0 4rem; }
.page-header h1 { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; font-size: 2.5rem; letter-spacing: -.02em; }
.page-header p { color: #c2dbc3; margin-top: .75rem; max-width: 40rem; }

/* Section spacing */
.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }

/* Section title */
.section-title { font-family: 'Cabinet Grotesk', sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: -.02em; color: #1d3822; }
@media (min-width: 768px) { .section-title { font-size: 3rem; } }

/* Section subtitle */
.section-subtitle { color: #1c1f1ab3; margin-top: 1rem; line-height: 1.75; max-width: 40rem; }

/* CTA button */
.cta-primary { background: #dfa41f; color: #1c1f1a; padding: .875rem 1.75rem; border-radius: 9999px; font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; display: inline-block; transition: all .2s; }
.cta-primary:hover { background: #eabb45; transform: translateY(-1px); }
.cta-secondary { border: 1px solid rgba(255,255,255,.4); color: white; padding: .875rem 1.75rem; border-radius: 9999px; font-family: 'Cabinet Grotesk', sans-serif; font-weight: 700; display: inline-block; transition: all .2s; }
.cta-secondary:hover { background: rgba(255,255,255,.1); }

/* Responsive nav dropdown */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #f7f6f2; border-bottom: 1px solid #e0ede0; padding: 1rem; gap: .5rem; }
}

/* ── Scroll progress bar (injected by shared.js) ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 3px; width: 0;
  background: linear-gradient(90deg, #c58317, #dfa41f, #eabb45);
  box-shadow: 0 0 8px rgba(223,164,31,.55);
  will-change: width;
}

/* ── Magnetic button ── */
.magnetic-btn { will-change: transform; }
.magnetic-btn.magnetic-on {
  transition: transform .18s ease-out, background .2s, border-color .2s, box-shadow .2s;
}
.magnetic-btn.magnetic-release {
  transition: transform .55s cubic-bezier(.22,1.61,.36,1), background .2s, border-color .2s, box-shadow .2s;
}

/* ── Link underline sweep (nav + footer + inline text links) ── */
nav a:not(.cta-primary):not(.cta-secondary):not(.magnetic-btn),
footer a,
.link-underline {
  position: relative;
}
nav a:not(.cta-primary):not(.cta-secondary):not(.magnetic-btn)::after,
footer a::after,
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
nav a:not(.cta-primary):not(.cta-secondary):not(.magnetic-btn):hover::after,
footer a:hover::after,
.link-underline:hover::after { transform: scaleX(1); }
/* Exclude icon-only / logo links from underline */
nav a:has(svg:only-child)::after, footer a:has(svg:only-child)::after,
nav a:has(svg + span)::after { content: none; }

/* ── Product card glow ── */
.product-card:hover {
  box-shadow: 0 20px 50px -12px rgba(15,31,19,.18),
              0 0 0 1px rgba(104,160,109,.35),
              0 8px 36px -6px rgba(104,160,109,.35);
}

/* ── Button press feedback ── */
.cta-primary, .cta-secondary, .magnetic-btn, button[type="submit"] {
  transition-property: transform, background, background-color, border-color, box-shadow, color;
}
.cta-primary:active, .cta-secondary:active,
.magnetic-btn:active, button[type="submit"]:active { transform: scale(.95); }

/* ── Floating-label form fields ── */
.float-field { position: relative; }
.float-field input, .float-field select, .float-field textarea {
  padding-top: 1.45rem; padding-bottom: .45rem;
}
.float-field label {
  position: absolute; left: 1rem; top: .95rem;
  font-size: .875rem; font-weight: 500; color: #1c1f1a66;
  pointer-events: none; margin: 0;
  transition: top .22s cubic-bezier(.16,1,.3,1), font-size .22s cubic-bezier(.16,1,.3,1), color .22s;
}
.float-field input:focus ~ label,
.float-field input:not(:placeholder-shown) ~ label,
.float-field textarea:focus ~ label,
.float-field textarea:not(:placeholder-shown) ~ label,
.float-field select:focus ~ label,
.float-field select.filled ~ label {
  top: .4rem; font-size: .68rem; letter-spacing: .02em; color: #47834d;
}
.float-field input:focus, .float-field select:focus, .float-field textarea:focus {
  border-color: #47834d; box-shadow: 0 0 0 3px rgba(71,131,77,.12);
}

/* ── Story-scroll stagger: JS assigns .stagger-child to children of .reveal ── */
.stagger-child { transition-delay: calc(var(--i, 0) * 100ms); }

/* ── Section divider line that draws itself in ── */
.section-divider {
  height: 1px; border: 0; background: #e0ede0;
  transform: scaleX(0); transform-origin: center;
  transition: transform 1.1s cubic-bezier(.16,1,.3,1);
}
.section-divider.visible { transform: scaleX(1); }

/* ── Word-by-word hero title reveal ── */
.wr-word { display: inline-block; opacity: 0; transform: translateY(.55em); }
.wr-in .wr-word {
  opacity: 1; transform: translateY(0);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* ── Hero parallax layer ── */
.hero-parallax { will-change: transform; transform: translateZ(0); }

/* ── Reduced motion: disable all kinetic extras ── */
@media (prefers-reduced-motion: reduce) {
  .wr-word { opacity: 1; transform: none; }
  .stagger-child { transition-delay: 0ms; }
  .section-divider { transform: scaleX(1); transition: none; }
  .magnetic-btn, .magnetic-btn.magnetic-on, .magnetic-btn.magnetic-release { transition: none; }
}

/* ── Multi-step inquiry wizard ── */
.form-step { display: none; }
.form-step.active { display: block; animation: stepIn .35s cubic-bezier(.16,1,.3,1); }
@keyframes stepIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-label { transition: color .25s; }
.step-label.active { color: #47834d; font-weight: 700; }

/* Choice chips (multi-select product cards) */
.choice-chip { display: block; cursor: pointer; }
.choice-chip input { position: absolute; opacity: 0; pointer-events: none; }
.choice-chip .chip-body {
  display: block; padding: .875rem 1rem; border: 1.5px solid #e0ede0;
  border-radius: .875rem; background: white;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
}
.choice-chip .chip-title { display: block; font-weight: 600; font-size: .875rem; color: #1d3822; }
.choice-chip .chip-desc { display: block; font-size: .78rem; color: #1c1f1a66; margin-top: 2px; }
.choice-chip:hover .chip-body { border-color: #97c09a; transform: translateY(-1px); }
.choice-chip input:checked ~ .chip-body {
  border-color: #47834d; background: #f2f7f2;
  box-shadow: 0 0 0 3px rgba(71,131,77,.12);
}
.choice-chip input:checked ~ .chip-body .chip-title { color: #2b5330; }
.choice-chip input:focus-visible ~ .chip-body { outline: 2px solid #47834d; outline-offset: 2px; }

/* Radio pills (business type / volume) */
.choice-radio { display: block; cursor: pointer; }
.choice-radio input { position: absolute; opacity: 0; pointer-events: none; }
.choice-radio .radio-body {
  display: flex; align-items: center; justify-content: center;
  padding: .7rem .875rem; border: 1.5px solid #e0ede0; border-radius: .75rem;
  background: white; font-size: .82rem; font-weight: 500; color: #1c1f1ab3;
  text-align: center; transition: all .2s;
}
.choice-radio:hover .radio-body { border-color: #97c09a; color: #1d3822; }
.choice-radio input:checked ~ .radio-body {
  border-color: #47834d; background: #f2f7f2; color: #2b5330; font-weight: 600;
  box-shadow: 0 0 0 3px rgba(71,131,77,.12);
}
.choice-radio input:focus-visible ~ .radio-body { outline: 2px solid #47834d; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .form-step.active { animation: none; }
}

/* Print styles */
@media print {
  .no-print { display: none !important; }
  .scroll-progress { display: none !important; }
}
