/* =========================================================
   สวนยั่งยืน - Yang Yuen Farm — one-page storytelling site
   Resort / nature mood, light theme
========================================================= */

:root {
  --forest-900: #2f3a1f;
  --forest-800: #3c4a26;
  --forest-700: #4c5e30;
  --forest-600: #61763d;
  --forest-500: #7c8f52;
  --forest-100: #e7ecdb;

  --cream-50:  #fffdf7;
  --cream-100: #faf6ec;
  --cream-200: #f2ead6;
  --cream-300: #e9dfc2;

  --gold-400: #d8ac5c;
  --gold-500: #c8973f;
  --gold-700: #a8752b;

  --brown-500: #8a5a2b;

  --ink: #2b2b1f;
  --ink-soft: #57543f;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --shadow-soft: 0 20px 45px -20px rgba(47, 58, 31, 0.35);
  --shadow-card: 0 12px 30px -14px rgba(47, 58, 31, 0.28);

  --font-head: "Noto Serif Thai", serif;
  --font-body: "Prompt", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-100);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { font-family: var(--font-head); color: var(--forest-900); margin: 0 0 .5em; font-weight: 600; }

a { color: inherit; text-decoration: none; }

/* -------------------- reveal on scroll -------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* -------------------- buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 500;
  font-size: .98rem;
  letter-spacing: .02em;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-700));
  color: var(--cream-50);
  box-shadow: var(--shadow-card);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -12px rgba(168,117,43,.55); }

.btn-outline {
  border-color: rgba(255,255,255,.75);
  color: #fff;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
}
.btn-outline:hover { background: rgba(255,255,255,.18); transform: translateY(-3px); }

.btn-outline-light {
  border-color: var(--cream-100);
  color: var(--cream-100);
}
.btn-outline-light:hover { background: rgba(255,255,255,.12); transform: translateY(-3px); }

/* -------------------- section headings -------------------- */
.section-eyebrow {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-700);
  font-weight: 600;
  margin: 0 0 10px;
  text-align: center;
}
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}
.section-sub {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* =========================================================
   HEADER
========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 14px 0;
  transition: background .35s ease, box-shadow .35s ease, padding .35s ease;
}
.site-header.is-scrolled {
  background: rgba(250, 246, 236, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px -14px rgba(47,58,31,.35);
  padding: 8px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: width .3s ease, height .3s ease;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: #fff;
  transition: color .35s ease;
}
.brand-text em {
  font-style: normal;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.is-scrolled .brand-text strong { color: var(--forest-900); }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  font-size: .95rem;
  font-weight: 500;
  color: #fff;
  position: relative;
  padding: 4px 0;
  transition: color .3s ease;
}
.is-scrolled .site-nav a { color: var(--forest-900); }
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 2px; background: var(--gold-500);
  transition: right .3s ease;
}
.site-nav a:hover::after { right: 0; }
.site-nav a.nav-cta {
  background: var(--gold-500);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 100px;
}
.site-nav a.nav-cta::after { display: none; }
.site-nav a.nav-cta:hover { background: var(--gold-700); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.nav-toggle span {
  width: 26px; height: 2px; background: #fff;
  border-radius: 2px; transition: all .3s ease;
}
.is-scrolled .nav-toggle span { background: var(--forest-900); }

/* =========================================================
   HERO
========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1.16); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(30,38,17,.55) 0%, rgba(30,38,17,.35) 40%, rgba(24,30,14,.75) 100%);
}
.hero-leaf-fade {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 140px;
  background: var(--cream-100);
  clip-path: polygon(0 60%, 8% 45%, 18% 65%, 30% 40%, 42% 62%, 55% 38%, 68% 60%, 80% 42%, 92% 62%, 100% 48%, 100% 100%, 0 100%);
}
.hero-content { position: relative; z-index: 2; padding-top: 60px; }
.hero-eyebrow {
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--gold-400);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 22px;
  text-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.hero-title span { color: var(--gold-400); font-size: .55em; letter-spacing: .05em; }
.hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 560px;
  color: rgba(255,255,255,.92);
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 2;
}
.scroll-hint span {
  display: block; width: 26px; height: 42px;
  border: 2px solid rgba(255,255,255,.7); border-radius: 20px; position: relative;
}
.scroll-hint span::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px;
  background: var(--gold-400); border-radius: 2px; transform: translateX(-50%);
  animation: scrollDot 1.8s ease infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* =========================================================
   STORY
========================================================= */
.story { padding: 120px 0 60px; background: var(--cream-100); }

.story-beat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto 110px;
  padding: 0 24px;
}
.story-beat--reverse .story-media { order: 2; }
.story-beat--reverse .story-text { order: 1; }

.story-index {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .95rem;
  color: var(--gold-700);
  border: 1.5px solid var(--gold-500);
  border-radius: 100px;
  padding: 3px 16px;
  margin-bottom: 16px;
  letter-spacing: .05em;
}
.story-text h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.story-text p { color: var(--ink-soft); }

.story-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4/3.2;
}
.story-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.story-media:hover img { transform: scale(1.06); }

.story-media--collage { position: relative; aspect-ratio: auto; box-shadow: none; overflow: visible; }
.collage-main {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4/3.4;
  object-fit: cover;
  width: 100%;
}
.collage-inset {
  position: absolute;
  width: 46%;
  aspect-ratio: 3/4;
  object-fit: cover;
  right: -6%;
  bottom: -12%;
  border-radius: var(--radius-md);
  border: 6px solid var(--cream-100);
  box-shadow: 0 18px 40px -14px rgba(47,58,31,.45);
}

.story-beat--stats {
  background: var(--forest-100);
  border-radius: var(--radius-lg);
  padding: 50px;
  grid-template-columns: 1.1fr .9fr;
}
.story-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.stat-chip {
  background: var(--cream-50);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-chip strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--forest-700);
  margin-bottom: 6px;
}
.stat-chip span { font-size: .82rem; color: var(--ink-soft); }

.story-beat--letter { grid-template-columns: 1fr; margin-bottom: 40px; }
.story-letter {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  position: relative;
}
.story-letter .story-index { }
.story-letter p { color: var(--ink-soft); font-size: 1.05rem; }

/* =========================================================
   QUOTE BANNER
========================================================= */
.quote-banner {
  background: linear-gradient(135deg, var(--forest-800), var(--forest-900));
  padding: 90px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quote-banner::before {
  content: "🌴";
  position: absolute; font-size: 14rem; opacity: .06;
  right: -30px; top: -50px; transform: rotate(15deg);
}
.quote-mark {
  font-family: var(--font-head);
  font-size: 4rem;
  color: var(--gold-500);
  margin: 0;
  line-height: 1;
}
.quote-text {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  color: #fff;
  margin: 10px 0 0;
  font-weight: 500;
}

/* =========================================================
   PRODUCTS
========================================================= */
.products { padding: 110px 0; background: var(--cream-100); }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 56px;
}
.badge {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  color: var(--forest-700);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 500;
  box-shadow: var(--shadow-card);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.product-card {
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .4s ease, box-shadow .4s ease;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-soft); }
.product-media { aspect-ratio: 4/3.4; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product-card:hover .product-media img { transform: scale(1.08); }
.product-body { padding: 28px 26px 32px; }
.product-body h3 { font-size: 1.3rem; }
.product-body p { color: var(--ink-soft); font-size: .93rem; margin: 0; }

/* =========================================================
   FARM
========================================================= */
.farm {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: stretch;
  color: #fff;
  overflow: hidden;
}
.farm-media { position: absolute; inset: 0; }
.farm-media img { width: 100%; height: 100%; object-fit: cover; }
.farm::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(24,30,14,.88) 0%, rgba(24,30,14,.55) 55%, rgba(24,30,14,.2) 100%);
}
.farm-content { position: relative; z-index: 2; display: flex; align-items: center; width: 100%; padding: 90px 0; }
.farm-content .section-title,
.farm-content .section-eyebrow { color: #fff; text-align: left; }
.farm-content .section-eyebrow { color: var(--gold-400); }
.farm-content .section-sub { color: rgba(255,255,255,.88); text-align: left; margin: 0 0 32px; max-width: 520px; }

/* =========================================================
   GALLERY
========================================================= */
.gallery { padding: 110px 0; background: var(--cream-200); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1/1;
  box-shadow: var(--shadow-card);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.gallery-item:hover img { transform: scale(1.1); }

/* =========================================================
   LOCATION
========================================================= */
.location { padding: 110px 0 0; background: var(--cream-100); }
.location-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  max-width: 1180px;
  margin: 0 auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.location-map { min-height: 420px; }
.location-map iframe { width: 100%; height: 100%; border: 0; min-height: 420px; }
.location-card {
  background: var(--forest-800);
  color: #fff;
  padding: 50px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.location-card h3 { color: #fff; font-size: 1.4rem; }
.location-card p { color: rgba(255,255,255,.85); margin: 0 0 10px; }

/* =========================================================
   CONTACT
========================================================= */
.contact { padding: 90px 0 120px; background: var(--cream-100); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.contact-card {
  background: var(--cream-50);
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--gold-500);
}
.contact-icon { font-size: 2.1rem; display: block; margin-bottom: 14px; }
.contact-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.contact-card p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  background: var(--forest-900);
  color: rgba(255,255,255,.75);
  padding: 46px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.brand--footer .brand-text strong { color: #fff; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-size: .9rem; color: rgba(255,255,255,.75); }
.footer-nav a:hover { color: var(--gold-400); }
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  margin: 10px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 980px) {
  .story-beat,
  .story-beat--stats { grid-template-columns: 1fr; gap: 36px; padding: 0 20px; }
  .story-beat--reverse .story-media,
  .story-beat--reverse .story-text { order: initial; }
  .story-stats { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .location-inner { grid-template-columns: 1fr; }
  .location-map, .location-map iframe { min-height: 320px; }
  .farm-content .section-title,
  .farm-content .section-eyebrow,
  .farm-content .section-sub { text-align: center; margin-left: auto; margin-right: auto; }
  .farm-content { text-align: center; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    height: 100vh;
    background: var(--cream-50);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform .4s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,.2);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav a { color: var(--forest-900) !important; font-size: 1.1rem; }
  .site-nav a.nav-cta { color: #fff !important; }

  .product-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .story-beat--stats { padding: 32px 24px; }
  .collage-inset { right: 0; bottom: -8%; width: 50%; }
  .story-letter { padding: 40px 26px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}
