/* ============================================================
   MDH — Major Development & Hospitality
   Modern single-page site
   ============================================================ */

:root {
  /* Palette — fresh green, "countryside + modern" */
  --bg: #f7faf7;
  --bg-tint: #ebf1ec;
  --surface: #ffffff;
  --ink: #16201b;
  --ink-soft: #4c5a52;
  --ink-faint: #7d8b83;
  --line: rgba(22, 32, 27, 0.10);
  --line-strong: rgba(22, 32, 27, 0.16);

  --accent: #2f7d5b;      /* prominent green */
  --accent-deep: #235e45;
  --accent-2: #3f9a72;    /* lighter green (success) */
  --accent-soft: rgba(47, 125, 91, 0.10);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(28,26,23,.05), 0 2px 8px rgba(28,26,23,.04);
  --shadow-md: 0 10px 30px -12px rgba(28,26,23,.22);
  --shadow-lg: 0 30px 60px -24px rgba(28,26,23,.30);

  --ff-sans: 'Inter', 'Noto Sans Thai', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ff-serif: 'Fraunces', 'Noto Sans Thai', Georgia, 'Times New Roman', serif;

  --maxw: 1160px;
  --nav-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1512;
    --bg-tint: #151d18;
    --surface: #19221d;
    --ink: #eef3ef;
    --ink-soft: #bcc7c0;
    --ink-faint: #828d86;
    --line: rgba(232, 245, 238, 0.10);
    --line-strong: rgba(232, 245, 238, 0.18);
    --accent: #57b98c;
    --accent-deep: #3f9a72;
    --accent-2: #6cc79c;
    --accent-soft: rgba(87, 185, 140, 0.14);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 10px 30px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 30px 60px -24px rgba(0,0,0,.7);
  }
}

/* ---------- Reset-ish ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* ---------- Ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
}
.orb--1 {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  top: -12vw; right: -8vw;
  background: #3f9a72;
  opacity: .16;
}
.orb--2 {
  width: 40vw; height: 40vw; max-width: 540px; max-height: 540px;
  bottom: -10vw; left: -10vw;
  background: #2f7d5b;
  opacity: .12;
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: .8rem; --pad-x: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ff-sans);
  font-weight: 600; font-size: .95rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn--sm { --pad-y: .55rem; --pad-x: 1rem; font-size: .875rem; }
.btn--block { width: 100%; }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn--ghost { color: var(--ink); border-color: var(--line-strong); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; }
.brand { display: flex; align-items: baseline; gap: .6rem; font-weight: 700; }
.brand__mark {
  font-family: var(--ff-serif); font-weight: 600;
  font-size: 1.35rem; letter-spacing: .01em;
  color: var(--accent);
}
.brand__full { font-size: .82rem; color: var(--ink-faint); font-weight: 500; }
.nav__links { display: flex; gap: 1.6rem; }
.nav__links a {
  font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: .25rem 0;
  transition: color .2s ease;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s ease; border-radius: 2px;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: .75rem; }

/* Language toggle */
.lang {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--ff-sans); font-weight: 600; font-size: .85rem;
  color: var(--ink-soft); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: .45rem .8rem; cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.lang svg { width: 16px; height: 16px; opacity: .8; }
.lang:hover { color: var(--accent); border-color: var(--accent); }
.lang__label { min-width: 1.6em; text-align: center; }

/* Slightly relax heading letter-spacing for Thai (no serif Thai face) */
.lang-th .section__title,
.lang-th .hero__title { letter-spacing: 0; line-height: 1.25; }

.nav__toggle {
  display: none;
  flex-direction: column; gap: 5px; justify-content: center;
  width: 42px; height: 38px; padding: 8px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: transparent; cursor: pointer;
}
.nav__toggle span { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  display: grid; gap: .25rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: .5rem clamp(20px,5vw,40px) 1rem;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform .28s ease, opacity .28s ease;
}
.nav__mobile.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav__mobile a { padding: .85rem .25rem; font-weight: 500; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.nav__mobile a:last-child { border-bottom: none; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
.section__title {
  font-family: var(--ff-serif); font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.12; letter-spacing: -0.01em; margin: 0;
  color: var(--ink);
}
.grad-text { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero__title {
  font-family: var(--ff-serif); font-weight: 500;
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 1.4rem; max-width: 16ch;
}
.hero__lead { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; margin: 0 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: var(--ff-serif); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; line-height: 1; color: var(--ink); }
.stat__label { font-size: .9rem; color: var(--ink-faint); margin-top: .4rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--bg-tint); }
.section__head { max-width: 44ch; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about__body p { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 1.2rem; }
.about__body p:last-child { margin-bottom: 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.5vw, 1.5rem); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card:hover::before { transform: scaleX(1); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 1.2rem;
  background: var(--accent-soft); color: var(--accent);
}
.card__icon svg { width: 26px; height: 26px; }
.card__title { font-family: var(--ff-serif); font-weight: 600; font-size: 1.4rem; margin: 0 0 .6rem; }
.card__text { color: var(--ink-soft); margin: 0 0 1.1rem; font-size: 1rem; }
.card__list { list-style: none; margin: 0 0 .25rem; padding: 0; display: grid; gap: .55rem; }
.card__list li { position: relative; padding-left: 1.5rem; font-size: .95rem; color: var(--ink-soft); }
.card__list li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); opacity: .7;
}
.card__link { display: inline-block; margin-top: 1.1rem; font-weight: 600; color: var(--accent); }
.card__link:hover { color: var(--accent-deep); }

/* Approach */
.approach { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.approach__item { border-top: 2px solid var(--line-strong); padding-top: 1.4rem; }
.approach__k { font-family: var(--ff-serif); font-size: 1rem; color: var(--accent); font-weight: 600; }
.approach__item h3 { font-family: var(--ff-serif); font-weight: 500; font-size: 1.35rem; margin: .5rem 0 .5rem; }
.approach__item p { color: var(--ink-soft); margin: 0; }

/* Clients */
.clients { display: flex; flex-wrap: wrap; gap: 1rem; }
.client {
  display: inline-flex; align-items: center;
  font-family: var(--ff-serif); font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 500;
  color: var(--ink-soft);
  padding: 1rem 1.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: color .25s ease, border-color .25s ease, transform .25s ease;
}
a.client:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.contact__lead { color: var(--ink-soft); font-size: 1.08rem; margin: 1.2rem 0 2rem; max-width: 44ch; }
.contact__meta { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.contact__meta li { display: grid; gap: .2rem; }
.contact__meta-label { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.contact__meta a { color: var(--accent); }

.contact__form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-md); display: grid; gap: 1.1rem;
}
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  font-family: var(--ff-sans); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--bg);
  transition: border-color .2s ease, box-shadow .2s ease;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form__status { margin: .25rem 0 0; font-size: .92rem; color: var(--accent-2); min-height: 1.2em; }
.form__status.is-error { color: #c0392b; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 3.5rem) 0; background: var(--bg-tint); }
.footer__inner { display: grid; gap: 1.5rem; }
.footer__brand { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer__brand p { margin: 0; color: var(--ink-faint); font-size: .95rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer__links a { font-size: .92rem; color: var(--ink-soft); transition: color .2s ease; }
.footer__links a:hover { color: var(--accent); }
.footer__copy { margin: 0; color: var(--ink-faint); font-size: .85rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .brand__full { display: none; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .about, .contact { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .approach { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav__actions .btn--sm { display: none; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
}
