/* ============================================================
   Udon Thani Land — styles.css
   Design tokens live here. Change a color once, it changes
   everywhere.
   ============================================================ */
:root {
  --gold: #b78b53;
  --gold-dark: #9f7642;
  --ink: #1c1917;          /* near-black text */
  --ink-soft: #57534e;     /* secondary text */
  --ink-faint: #78716c;
  --paper: #f8f6f2;        /* warm section background */
  --panel: #f3ece3;        /* warm inset panel */
  --line: #d6d3d1;         /* borders */
  --dark: #0c0a09;         /* dark sections */
  --radius: 28px;
  --shadow: 0 20px 60px rgba(60, 42, 18, 0.08);
  --font-display: "Playfair Display", "Noto Sans Thai", serif;
  --font-body: "Inter", "Noto Sans Thai", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 246, 242, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.brand small {
  display: block; font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
}
.nav-links { display: none; gap: 1.6rem; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: 0.85rem; font-weight: 500; color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }
@media (min-width: 768px) { .nav-links { display: flex; } }

.lang-toggle {
  display: flex; border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; background: #fff;
}
.lang-toggle button {
  border: 0; background: transparent; padding: 0.45rem 0.9rem;
  font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--ink-soft);
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--dark); color: #fff;
  display: flex; align-items: flex-end; min-height: 92svh;
  padding: 6rem 0 3.5rem;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.6; z-index: -2;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(12,10,9,0.55), rgba(12,10,9,0.4) 45%, rgba(12,10,9,0.92));
}
.hero-grid { display: grid; gap: 2.5rem; width: 100%; }
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: end; }
}
.badges { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.badge {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.1);
  border-radius: 999px; padding: 0.5rem 1rem; backdrop-filter: blur(6px);
}
.hero-loc { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: rgba(255,255,255,0.8); margin: 1.4rem 0 0.9rem; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1.02; max-width: 18ch;
}
.hero-sub { max-width: 42ch; margin-top: 1.1rem; color: rgba(255,255,255,0.78); font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.6rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: background 0.2s;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-glass { border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: #fff; backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,0.16); }

.hero-card {
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px); border-radius: var(--radius); padding: 1.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}
.hero-card .eyebrow { color: rgba(255,255,255,0.7); }
.hero-card dl { margin-top: 1.1rem; font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.hero-card dl div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.hero-card dl div:last-child { border-bottom: 0; }
.hero-card dd { font-weight: 600; text-align: right; }

/* ---------- Sections ---------- */
section { padding: 5rem 0; }
.section-alt { background: #fff; }
.section-dark { background: var(--dark); color: #fff; }
.eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
}
.section-dark .eyebrow { color: var(--gold); }
h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; margin-top: 0.6rem;
}
.section-desc { max-width: 62ch; margin-top: 0.9rem; color: var(--ink-soft); }
.section-dark .section-desc { color: rgba(255,255,255,0.7); }

/* ---------- Video / map embeds ---------- */
.embed {
  overflow: hidden; border-radius: 30px; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); aspect-ratio: 16 / 9;
}
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }
.gallery-grid figure {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); cursor: zoom-in;
}
.gallery-grid img { width: 100%; height: 320px; object-fit: cover; transition: transform 0.4s; }
.gallery-grid figure:hover img { transform: scale(1.03); }
.gallery-grid figcaption { padding: 0.9rem 1.2rem; font-size: 0.85rem; color: var(--ink-soft); }

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: rgba(12,10,9,0.92);
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(12,10,9,0.92); }
.lightbox img { max-width: 92vw; max-height: 84vh; margin: auto; object-fit: contain; border-radius: 12px; }
.lightbox-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 1rem; }
.lightbox p { color: rgba(255,255,255,0.8); font-size: 0.9rem; text-align: center; padding: 0 1rem; }
.lightbox-controls { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.5rem; }
.lightbox button {
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1);
  color: #fff; border-radius: 999px; width: 44px; height: 44px; font-size: 1.1rem; cursor: pointer;
}
.lightbox-nav { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 1rem; pointer-events: none; }
.lightbox-nav button { pointer-events: auto; }

/* ---------- Overview / parcel selector ---------- */
.parcel-tabs {
  display: inline-flex; gap: 0.4rem; margin-top: 2rem; padding: 0.35rem;
  border: 1px solid var(--line); border-radius: 24px; background: #fff;
}
.parcel-tabs button {
  border: 0; background: transparent; font: inherit; font-size: 0.85rem; font-weight: 600;
  color: var(--ink-soft); padding: 0.55rem 1.1rem; border-radius: 18px; cursor: pointer;
}
.parcel-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.overview-grid { display: grid; gap: 1.5rem; margin-top: 1.6rem; }
@media (min-width: 1024px) { .overview-grid { grid-template-columns: 1fr 1.1fr; } }
.facts-card, .docs-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); padding: 1.6rem;
}
.facts-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid #eee7dd; font-size: 0.92rem; }
.facts-card dl div:last-child { border-bottom: 0; }
.facts-card dt { color: var(--ink-soft); }
.facts-card dd { font-weight: 600; text-align: right; max-width: 60%; }
.facts-list { list-style: none; margin-top: 1rem; }
.facts-list li { padding: 0.5rem 0 0.5rem 1.4rem; position: relative; font-size: 0.92rem; color: var(--ink-soft); }
.facts-list li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.docs-card { background: var(--panel); }
.docs-grid { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 640px) { .docs-grid { grid-template-columns: 1fr 1fr; } }
.docs-grid button {
  border: 2px solid transparent; border-radius: 24px; overflow: hidden;
  padding: 0; cursor: zoom-in; background: #fff; transition: border-color 0.3s;
}
.docs-grid button.active { border-color: var(--gold); }
.docs-grid img { width: 100%; height: 300px; object-fit: cover; object-position: top; }
.docs-note { margin-top: 0.9rem; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500; }

/* ---------- Opportunity cards ---------- */
.opportunity-grid { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 1024px) { .opportunity-grid { grid-template-columns: repeat(3, 1fr); } }
.opportunity-grid article {
  border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius);
  background: rgba(255,255,255,0.05); padding: 1.6rem; font-size: 0.95rem;
  color: rgba(255,255,255,0.82);
}

/* ---------- Location: video | map | landmarks, portrait columns ---------- */
.location-grid { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 768px) { .location-grid { grid-template-columns: repeat(3, 1fr); } }
.embed-portrait { aspect-ratio: 9 / 16; max-height: 640px; width: 100%; }
@media (max-width: 767px) {
  /* On phones/small screens, keep portrait embeds a sane size, centered */
  .embed-portrait { max-width: 420px; margin-left: auto; margin-right: auto; }
}
.embed-light { background: #fff; }
.landmarks-card {
  border: 1px solid var(--line); border-radius: 30px; background: #fff;
  box-shadow: var(--shadow); padding: 1.5rem; display: flex; flex-direction: column;
  aspect-ratio: 9 / 16; max-height: 640px; overflow: hidden;
}
@media (max-width: 767px) { .landmarks-card { aspect-ratio: auto; max-height: 480px; } }
.coords-line { margin-top: 0.5rem; font-weight: 600; font-size: 0.95rem; }
.coords-sub { font-size: 0.85rem; margin-bottom: 0.8rem; }
.coords-sub a { color: var(--gold-dark); font-weight: 600; }
.landmarks { flex: 1; overflow-y: auto; margin: 0 -0.4rem; padding: 0 0.4rem; }
.landmarks button {
  display: flex; justify-content: space-between; gap: 0.8rem; width: 100%;
  border: 0; background: transparent; font: inherit; text-align: left;
  padding: 0.7rem 0.8rem; border-radius: 14px; cursor: pointer; font-size: 0.88rem;
}
.landmarks button:hover, .landmarks button.active { background: var(--panel); }
.landmarks .dist { color: var(--ink-faint); white-space: nowrap; }

/* ---------- Inquiry form ---------- */
.inquiry-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .inquiry-grid { grid-template-columns: 0.85fr 1.15fr; align-items: start; } }
.contact-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 1.5rem; margin-top: 1.4rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1rem; }
.contact-links a, .contact-links-disabled {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; flex: 1; min-width: 130px; padding: 0 1.2rem;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  font-size: 0.88rem; font-weight: 500; color: var(--ink-soft); transition: all 0.2s;
}
.contact-links a:hover { border-color: var(--ink); color: var(--ink); }
.brand-icon { width: 24px; height: 24px; flex-shrink: 0; }
.contact-links-disabled {
  color: var(--ink-faint); background: repeating-linear-gradient(135deg, #fff, #fff 8px, #f3ece3 8px, #f3ece3 16px);
  cursor: default; user-select: none;
}
form.inquiry {
  border: 1px solid var(--line); border-radius: 32px; background: #fff;
  box-shadow: var(--shadow); padding: 1.6rem;
}
@media (min-width: 640px) { form.inquiry { padding: 2rem; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; padding: 0.75rem 0.9rem; background: var(--paper);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.consent { font-size: 0.78rem; color: var(--ink-faint); margin: 0.4rem 0 1.2rem; }
form .btn-gold { width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 600; }

/* ---------- Footer ---------- */
footer { background: var(--dark); color: rgba(255,255,255,0.75); padding: 3.5rem 0 2.5rem; font-size: 0.88rem; }
footer .disclaimer { max-width: 70ch; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.6rem; }
.footer-meta a { color: rgba(255,255,255,0.6); text-decoration: none; }
.footer-meta a:hover { color: #fff; }

/* ---------- Motion & a11y ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1), transform 0.55s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .gallery-grid img { transition: none; }
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
