/* Bangkok Orchids Biotech — shared site styles */
html {
  scroll-behavior: smooth;
}
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.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;
}

/* —— Skip link & focus (visual appearance unchanged until keyboard focus) —— */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: #00261b;
  color: #ffffff;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 0.5rem 0.5rem;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #fed65b;
  outline-offset: 2px;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid #735c00;
  outline-offset: 3px;
}
.btn-lift:focus-visible,
.hero-btn:focus-visible,
a:focus-visible {
  outline-offset: 3px;
}

/* —— Hero overlays —— */
.hero-gradient {
  background:
    linear-gradient(
      180deg,
      rgba(0, 38, 27, 0.45) 0%,
      rgba(0, 38, 27, 0.55) 35%,
      rgba(0, 38, 27, 0.82) 70%,
      rgba(0, 38, 27, 0.92) 100%
    );
}
@media (min-width: 768px) {
  .hero-gradient {
    background:
      linear-gradient(90deg, rgba(0, 38, 27, 0.88) 0%, rgba(0, 38, 27, 0.62) 42%, rgba(0, 38, 27, 0.28) 72%, rgba(0, 38, 27, 0.18) 100%),
      linear-gradient(to top, rgba(0, 38, 27, 0.55) 0%, transparent 45%);
  }
}
.hero-copy h1,
.hero-copy p {
  text-shadow: none;
}
@media (min-width: 768px) {
  .hero-copy h1,
  .hero-copy p {
    text-shadow: 0 2px 28px rgba(0, 20, 14, 0.65);
  }
  .hero-copy span.hero-line:first-child {
    text-shadow: 0 1px 14px rgba(0, 20, 14, 0.5);
  }
}
.page-hero-gradient {
  background: linear-gradient(135deg, rgba(0, 38, 27, 0.88), rgba(11, 61, 46, 0.75));
}
.text-balance {
  text-wrap: balance;
}

/* —— Mobile menu —— */
#mobile-menu {
  visibility: hidden;
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.5s;
}
#mobile-menu.open {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}
#mobile-menu nav a {
  opacity: 0;
  transform: translateX(0.75rem);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
#mobile-menu.open nav a {
  opacity: 1;
  transform: none;
}
#mobile-menu.open nav a:nth-child(1) { transition-delay: 0.08s; }
#mobile-menu.open nav a:nth-child(2) { transition-delay: 0.14s; }
#mobile-menu.open nav a:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open nav a:nth-child(4) { transition-delay: 0.26s; }
#mobile-menu.open nav a:nth-child(5) { transition-delay: 0.32s; }
#mobile-menu.open nav a:nth-child(6) { transition-delay: 0.38s; }

/* —— Scroll reveal (progressive: visible without JS; animated only with .js) —— */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 1.35s cubic-bezier(0.33, 0, 0.2, 1),
    transform 1.35s cubic-bezier(0.33, 0, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.js .reveal.on {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}
.js .reveal-left {
  transform: translate3d(-24px, 0, 0);
}
.js .reveal-left.on {
  transform: translate3d(0, 0, 0);
}
.js .reveal-scale {
  transform: translate3d(0, 20px, 0) scale(0.98);
}
.js .reveal-scale.on {
  transform: translate3d(0, 0, 0) scale(1);
}

/* Images inside reveals fade a touch softer */
.js .reveal img {
  opacity: 0.001;
  transition: opacity 1.5s cubic-bezier(0.33, 0, 0.2, 1);
  transition-delay: calc(var(--reveal-delay, 0s) + 0.12s);
}
.js .reveal.on img {
  opacity: 1;
}

/* —— Home hero media —— */
.hero-media-wrap {
  background: #00261b;
}
.hero-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 38, 27, 0) 0%,
    rgba(0, 38, 27, 0.1) 35%,
    rgba(0, 38, 27, 0.55) 68%,
    rgba(0, 38, 27, 0.92) 88%,
    #00261b 100%
  );
}
.hero-media {
  opacity: 0;
  object-position: 70% 38%;
  animation: hero-fade-in 1.4s cubic-bezier(0.33, 0, 0.2, 1) 0.05s forwards;
}
.hero-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.95rem 1.15rem;
  border-radius: 0.5rem;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}
.hero-btn--primary {
  background: #fed65b;
  color: #745c00;
}
.hero-btn--outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #ffffff;
}
@media (min-width: 768px) {
  .hero-section {
    background: transparent;
  }
  .hero-media {
    object-position: 68% center;
    transform: scale(1.02);
    animation:
      hero-fade-in 1.8s cubic-bezier(0.33, 0, 0.2, 1) 0.05s forwards,
      hero-drift 28s ease-in-out 1.8s infinite alternate;
    will-change: transform, opacity;
  }
  .hero-btn {
    width: auto;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
  }
}
.hero-copy .hero-line {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  animation: hero-rise 1.4s cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.hero-copy .hero-line:nth-child(1) { animation-delay: 0.35s; }
.hero-copy .hero-line:nth-child(2) { animation-delay: 0.55s; }
.hero-copy .hero-line:nth-child(3) { animation-delay: 0.75s; }
.hero-copy .hero-line:nth-child(4) { animation-delay: 0.95s; }

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes hero-drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.05) translate3d(-1.2%, 0, 0); }
}

/* —— Inner page heroes —— */
.page-hero-media {
  opacity: 0;
  transform: scale(1.05);
  animation: page-hero-in 2s cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.page-hero-copy > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: hero-rise 1.35s cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.page-hero-copy > *:nth-child(1) { animation-delay: 0.35s; }
.page-hero-copy > *:nth-child(2) { animation-delay: 0.55s; }
.page-hero-copy > *:nth-child(3) { animation-delay: 0.75s; }

@keyframes page-hero-in {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* —— Interactive accents —— */
.nav-link.active {
  color: #00261b;
  border-bottom: 2px solid #00261b;
  padding-bottom: 0.25rem;
}
.prod-feature-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.prod-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 38, 27, 0.08);
}
.reach-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.reach-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 38, 27, 0.08);
}
.ornament {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.ornament > span:first-child,
.ornament > span:last-child {
  display: block;
  width: 3.5rem;
  height: 1px;
  background: #735c00;
  opacity: 0.7;
}
.values-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.values-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 38, 27, 0.1);
}
.site-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.site-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 38, 27, 0.1);
}
.cultivar-card img {
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.cultivar-card:hover img {
  transform: scale(1.05);
}
.product-card {
  transition: transform 0.6s cubic-bezier(0.33, 0, 0.2, 1), box-shadow 0.6s ease;
}
.product-card img {
  transition: transform 1s cubic-bezier(0.33, 0, 0.2, 1), opacity 1.5s cubic-bezier(0.33, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-4px);
}
.product-card:hover img {
  transform: scale(1.04);
}
.btn-lift {
  transition: transform 0.45s cubic-bezier(0.33, 0, 0.2, 1), box-shadow 0.45s ease, filter 0.45s ease;
}
.btn-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 38, 27, 0.18);
}
.link-arrow {
  transition: gap 0.4s ease;
}
.link-arrow .material-symbols-outlined {
  transition: transform 0.4s cubic-bezier(0.33, 0, 0.2, 1);
}
.link-arrow:hover .material-symbols-outlined {
  transform: translateX(4px);
}

.timeline-dot {
  animation: soft-pulse 3.6s ease-in-out infinite;
}

/* —— Responsive timeline —— */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
}
.timeline-item {
  position: relative;
  display: block;
}
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.45rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 9999px;
  background: #fed65b;
  display: block;
  margin-left: 2px;
  z-index: 1;
}
.timeline-body {
  text-align: left;
}
@media (min-width: 768px) {
  .timeline {
    padding-left: 0;
    gap: 0;
  }
  .timeline::before {
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
  }
  .timeline-item {
    display: grid;
    grid-template-columns: 1fr 1rem 1fr;
    align-items: start;
    column-gap: 1.5rem;
    padding: 2.5rem 0;
  }
  .timeline-dot {
    position: static;
    margin: 0.55rem auto 0;
    grid-column: 2;
    grid-row: 1;
  }
  .timeline-body {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
    padding-right: 0.5rem;
  }
  .timeline-item--right .timeline-body {
    grid-column: 3;
    text-align: left;
    padding-right: 0;
    padding-left: 0.5rem;
  }
}

/* —— Page hero mobile —— */
@media (max-width: 767px) {
  .page-hero-copy h1 {
    font-size: 1.85rem;
    line-height: 1.2;
  }
  .page-hero-copy p {
    font-size: 1rem;
    line-height: 1.55;
  }
  #mobile-menu {
    overflow-y: auto;
  }
  footer .font-headline-md {
    font-size: 1.25rem;
    line-height: 1.35;
  }
}

@keyframes soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 214, 91, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(254, 214, 91, 0); }
}

/* —— Reduced motion —— */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .js .reveal,
  .js .reveal-left,
  .js .reveal-scale,
  .js .reveal img,
  #mobile-menu,
  #mobile-menu nav a,
  .product-card,
  .product-card img,
  .btn-lift,
  .link-arrow,
  .link-arrow .material-symbols-outlined {
    transition: none !important;
    animation: none !important;
  }
  .reveal,
  .js .reveal,
  .js .reveal img,
  .hero-copy .hero-line,
  .page-hero-copy > *,
  .hero-media,
  .page-hero-media {
    opacity: 1 !important;
    transform: none !important;
  }
  .timeline-dot {
    animation: none !important;
  }
  .product-card:hover,
  .btn-lift:hover {
    transform: none;
  }
}

/* Contact form controls — keep select height aligned with text inputs */
.form-field {
  box-sizing: border-box;
}
input.form-field,
select.form-field {
  height: 3.25rem;
  min-height: 3.25rem;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.5;
}
select.form-field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgb(248 250 248);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23414944' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1rem;
  padding-right: 2.75rem;
}
textarea.form-field {
  min-height: 8rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.form-field.is-invalid {
  border-color: #8c1d18;
}
.form-error {
  margin: 0.4rem 0 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #8c1d18;
}
.form-error:empty {
  display: none;
}
.form-status {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
}
.form-status--success {
  color: #00261b;
}
.form-status--error {
  color: #8c1d18;
}
.form-status--loading {
  color: #414944;
}
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* Footer bottom bar — explicit gaps (Tailwind gap-x-* may be purged) */
.footer-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 768px) {
  .footer-bar {
    flex-direction: row;
  }
}
.footer-bar__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.75rem;
}
@media (min-width: 768px) {
  .footer-bar__end {
    justify-content: flex-end;
  }
}
.footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
}

/* Product enquiry modal */
.enquiry-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.enquiry-modal.is-open {
  display: flex !important;
}
.enquiry-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 38, 27, 0.55);
}
.enquiry-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(192, 200, 195, 0.35);
  box-shadow: 0 24px 60px rgba(0, 38, 27, 0.22);
  padding: 1.5rem;
  margin: auto;
}
@media (min-width: 768px) {
  .enquiry-modal__dialog {
    padding: 2rem;
  }
}
.enquiry-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgb(248 250 248);
  color: #00261b;
  cursor: pointer;
}
.enquiry-modal__close:hover {
  background: rgb(225 227 225);
}
.enquiry-modal__layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .enquiry-modal__layout {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2rem;
    align-items: start;
  }
}
.enquiry-modal__image-wrap {
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 3 / 4;
  background: rgb(248 250 248);
  margin-bottom: 1rem;
  max-height: 420px;
}
@media (min-width: 768px) {
  .enquiry-modal__image-wrap {
    max-height: none;
  }
}
.enquiry-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.enquiry-modal__form {
  padding-top: 0.25rem;
}
body.enquiry-open {
  overflow: hidden;
}

/* —— Language switcher —— */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(0, 38, 27, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #3f4944;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-btn:hover {
  color: #00261b;
  background: rgba(0, 38, 27, 0.06);
}
.lang-btn.is-active,
.lang-btn[aria-pressed="true"] {
  background: #00261b;
  color: #ffffff;
}
.lang-btn.is-active:hover,
.lang-btn[aria-pressed="true"]:hover {
  background: #00261b;
  color: #ffffff;
}
.lang-switch--compact .lang-btn {
  padding: 0.4rem 0.45rem;
  font-size: 10px;
}
#mobile-menu .lang-switch {
  align-self: flex-start;
  margin-top: 0.5rem;
}
html[data-lang="th"] body,
html[data-lang="zh"] body {
  word-break: normal;
  overflow-wrap: anywhere;
}
html[data-lang="zh"] body {
  font-family: "Hanken Grotesk", "Noto Sans TC", sans-serif;
}
html[data-lang="th"] body {
  font-family: "Hanken Grotesk", "Noto Sans Thai", sans-serif;
}
html[data-lang="zh"] .font-headline-lg,
html[data-lang="zh"] .font-headline-md,
html[data-lang="zh"] .font-display-lg,
html[lang="zh-Hant"] h1,
html[lang="zh-Hant"] h2,
html[lang="zh-Hant"] h3 {
  font-family: "EB Garamond", "Noto Sans TC", serif;
  letter-spacing: 0;
  line-height: 1.3;
}
html[data-lang="th"] .font-headline-lg,
html[data-lang="th"] .font-headline-md,
html[data-lang="th"] .font-display-lg,
html[lang="th"] h1,
html[lang="th"] h2,
html[lang="th"] h3 {
  font-family: "EB Garamond", "Noto Sans Thai", serif;
  letter-spacing: 0;
  line-height: 1.35;
}
html[data-lang="zh"] .uppercase,
html[data-lang="th"] .uppercase {
  text-transform: none;
  letter-spacing: 0.02em;
}
@media (prefers-reduced-motion: reduce) {
  .enquiry-modal__dialog {
    box-shadow: 0 8px 24px rgba(0, 38, 27, 0.16);
  }
}
