/* Alaya — shared design system. Migrated verbatim from the flat-HTML site's inline <style> blocks
   (identical across index.html / story.html / enquire.html / location.html / investment.html /
   residences.html / privacy.html / 404.html), consolidated into one file per the Astro rebuild plan.

   NOTE: this file is the canonical editable source. Astro's `public/` directory is served verbatim
   and PageLayout.astro links to it as `/styles.css`, so public/styles.css must be kept identical to
   this file — copy this file over public/styles.css whenever you edit it (there is no build step
   that does this automatically, since Astro does not process files placed directly in public/). */

:root{
  --espresso:#1E1813; --clove:#26201A; --ink:#2A2520; --stone:#B9AB95;
  --sand:#DDCDB2; --bone:#EAE1D2; --chalk:#F5F0E8; --mist:#FBF8F2;
  --gold:#C6A052; --deep-gold:#A97E33; --pale-gold:#EBD49A;
  --cream:#F0E6CE; --champagne:#E7D7B6; --lagoon:#7BAEB0; --deep-lagoon:#4E8385;
  --font-display:"Cormorant Garamond", Georgia, serif;
  --font-body:"Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --font-thai-serif:"Noto Serif Thai", serif;
  --font-thai-sans:"Noto Sans Thai", sans-serif;
  --container:1240px;
  --ease:cubic-bezier(.22,.61,.36,1);
}

/* ---------- Bilingual toggle (EN default / TH placeholder) ---------- */
/* Pattern: <span class="t-en">English copy</span><span class="t-th">[TH-TODO: ...]</span>
   Visibility is keyed off html[data-lang] and mirrored by a MutationObserver in PageLayout.astro
   so it also works correctly if data-lang is set before hydration or changed at runtime. */
.t-en{ display:inline; }
.t-th{ display:none; }
html[data-lang="th"] .t-en{ display:none; }
html[data-lang="th"] .t-th{ display:inline; }

/* Thai language state — swap type families, drop Latin tracking/case conventions */
html[data-lang="th"] body{ font-family:var(--font-thai-sans), var(--font-body); }
html[data-lang="th"] h1, html[data-lang="th"] h2, html[data-lang="th"] h3, html[data-lang="th"] h4,
html[data-lang="th"] .tagline, html[data-lang="th"] .lead-para{ font-family:var(--font-thai-serif), var(--font-display); font-style:normal; }
html[data-lang="th"] .eyebrow, html[data-lang="th"] .btn, html[data-lang="th"] nav.primary a,
html[data-lang="th"] .caption, html[data-lang="th"] .pill, html[data-lang="th"] .locator-tag,
html[data-lang="th"] .lang-toggle button{ letter-spacing:0; text-transform:none; }

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{animation-duration:0.01ms!important;animation-iteration-count:1!important;transition-duration:0.01ms!important;scroll-behavior:auto!important;}
}
body{
  margin:0; background:var(--chalk); color:var(--ink);
  font-family:var(--font-body); font-size:16px; line-height:1.7;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
img{max-width:100%; display:block;}
a{color:inherit; text-decoration:none;}
h1,h2,h3,h4{font-family:var(--font-display); font-weight:600; margin:0; line-height:1.15; letter-spacing:.01em;}
p{margin:0;}
.container{max-width:var(--container); margin:0 auto; padding:0 32px;}
@media (max-width:640px){ .container{padding:0 22px;} }

.eyebrow{
  font-family:var(--font-body); font-size:12.5px; letter-spacing:.22em; text-transform:uppercase;
  color:var(--deep-gold); font-weight:600;
}
section.dark .eyebrow, .on-dark .eyebrow{ color:var(--gold); }

.hairline{width:64px; height:1px; background:var(--gold); border:0; margin:22px 0;}
.hairline.center{margin-left:auto; margin-right:auto;}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:10px; justify-content:center;
  font-family:var(--font-body); font-size:12.5px; letter-spacing:.16em; text-transform:uppercase; font-weight:600;
  padding:16px 34px; border-radius:2px; cursor:pointer; white-space:nowrap;
  transition:background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
  border:1px solid transparent;
}
.btn-outline-dark{ border-color:var(--gold); color:var(--cream); background:transparent; }
.btn-outline-dark:hover{ background:var(--gold); color:var(--espresso); }
.btn-solid-light{ background:var(--deep-gold); color:var(--mist); border-color:var(--deep-gold); }
.btn-solid-light:hover{ background:var(--ink); border-color:var(--ink); }
.btn-ghost-light{ border-color:var(--deep-gold); color:var(--ink); background:transparent; }
.btn-ghost-light:hover{ background:var(--ink); color:var(--mist); border-color:var(--ink); }

/* ---------- Header ---------- */
header.site{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  background:rgba(30,24,19,.72); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(198,160,82,0);
  transition:background .5s var(--ease), border-color .5s var(--ease), padding .4s var(--ease);
  padding:22px 0;
}
header.site.scrolled{ background:rgba(30,24,19,.94); border-bottom-color:rgba(198,160,82,.22); padding:14px 0; }
.nav-row{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
.brand-mark{ display:flex; align-items:center; gap:12px; }
.brand-mark img{ height:34px; width:auto; transition:height .4s var(--ease); }
header.site.scrolled .brand-mark img{ height:28px; }
.brand-mark .locator{ font-family:var(--font-display); font-style:italic; font-size:14px; color:var(--stone); display:none; }
nav.primary{ display:flex; align-items:center; gap:34px; }
nav.primary a{
  font-size:12.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--champagne); font-weight:600;
  position:relative; padding:6px 0;
}
nav.primary a::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:1px; background:var(--gold);
  transform:scaleX(0); transform-origin:left; transition:transform .35s var(--ease);
}
nav.primary a:hover::after, nav.primary a.active::after{ transform:scaleX(1); }
nav.primary a.active{ color:var(--gold); }
nav.primary a.enquire-link{
  border:1px solid var(--gold); padding:10px 22px; letter-spacing:.16em;
}
nav.primary a.enquire-link::after{ display:none; }
nav.primary a.enquire-link:hover{ background:var(--gold); color:var(--espresso); }

.lang-toggle{ display:flex; align-items:center; gap:6px; margin-left:6px; font-size:11px; letter-spacing:.1em; }
.lang-toggle button{
  background:none; border:none; color:var(--stone); font-family:var(--font-body); font-size:11px;
  letter-spacing:.12em; cursor:pointer; padding:4px 2px; font-weight:600;
}
.lang-toggle button.is-active{ color:var(--gold); text-decoration:underline; text-underline-offset:4px; }
.lang-toggle button[disabled]{ cursor:not-allowed; opacity:.55; text-decoration:none; }
.lang-toggle .sep{ color:var(--stone); opacity:.4; }

.menu-btn{ display:none; background:none; border:0; padding:8px; cursor:pointer; }
.menu-btn span{ display:block; width:24px; height:1px; background:var(--cream); margin:6px 0; transition:transform .3s, opacity .3s; }

@media (max-width:920px){
  nav.primary{
    position:fixed; inset:0; top:0; background:var(--espresso); flex-direction:column; justify-content:center;
    gap:30px; transform:translateY(-100%); opacity:0; transition:transform .45s var(--ease), opacity .3s;
    pointer-events:none;
  }
  nav.primary.open{ transform:translateY(0); opacity:1; pointer-events:auto; }
  nav.primary a{ font-size:16px; }
  .menu-btn{ display:block; z-index:1100; }
  body.nav-open .menu-btn span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
  body.nav-open .menu-btn span:nth-child(2){ opacity:0; }
  body.nav-open .menu-btn span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }
  body.nav-open{ overflow:hidden; }
}

/* ---------- Hero ---------- */
.hero{
  position:relative; min-height:100svh; display:flex; align-items:flex-end;
  background-size:cover; background-position:center; overflow:hidden;
}
.hero::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,16,12,.55) 0%, rgba(20,16,12,.30) 32%, rgba(20,16,12,.55) 68%, rgba(15,12,9,.92) 100%);
}
.hero-inner{ position:relative; z-index:2; width:100%; padding-bottom:96px; }
.hero .locator-tag{ color:var(--gold); font-size:12.5px; letter-spacing:.24em; text-transform:uppercase; font-weight:600; }
.hero h1{ color:var(--mist); font-size:clamp(34px,6vw,68px); font-weight:500; margin-top:18px; max-width:16ch; }
.hero .tagline{ font-family:var(--font-display); font-style:italic; color:var(--champagne); font-size:clamp(17px,2vw,22px); margin-top:20px; max-width:46ch; }
.hero .cta-row{ margin-top:38px; display:flex; gap:18px; flex-wrap:wrap; }
.scroll-cue{ position:absolute; bottom:28px; left:0; right:0; display:flex; justify-content:center; z-index:2; }
.scroll-cue span{ width:1px; height:46px; background:linear-gradient(var(--gold), transparent); display:block; animation:cuemove 2.6s ease-in-out infinite; }
@keyframes cuemove{ 0%,100%{ opacity:.25; } 50%{ opacity:1; } }

.page-hero{ min-height:64svh; }
.page-hero .hero-inner{ padding-bottom:76px; }
.page-hero h1{ font-size:clamp(32px,5.4vw,54px); }

/* ---------- Sections ---------- */
section{ padding:120px 0; position:relative; }
section.tight{ padding:88px 0; }
section.dark{ background:var(--espresso); color:var(--cream); }
section.clove{ background:var(--clove); color:var(--cream); }
section.light{ background:var(--chalk); color:var(--ink); }
section.mist{ background:var(--mist); color:var(--ink); }
@media (max-width:640px){ section{ padding:76px 0; } }

.statement{ max-width:820px; margin:0 auto; text-align:center; }
.statement h2{ font-size:clamp(24px,3.6vw,40px); font-weight:500; }
.statement .eyebrow{ display:block; margin-bottom:18px; }
.statement p.lede{ font-family:var(--font-display); font-style:italic; font-size:clamp(19px,2.4vw,25px); margin-top:22px; color:var(--stone); }
section.dark .statement p.lede, section.clove .statement p.lede{ color:var(--stone); }

.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:64px; align-items:center; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; }
@media (max-width:920px){ .grid-2{ grid-template-columns:1fr; gap:40px; } .grid-3{ grid-template-columns:1fr; } .grid-4{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .grid-4{ grid-template-columns:1fr; } }

.frame{ overflow:hidden; position:relative; background:var(--clove); }
.frame img{ width:100%; height:100%; object-fit:cover; transition:transform 1.1s var(--ease); }
.frame:hover img{ transform:scale(1.045); }
.ratio-16-10{ aspect-ratio:16/10; }
.ratio-4-5{ aspect-ratio:4/5; }
.ratio-1-1{ aspect-ratio:1/1; }
.ratio-16-9{ aspect-ratio:16/9; }
.caption{ font-size:12.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--stone); margin-top:14px; }
/* AA fix: --stone/--lagoon fail contrast on light grounds — never used for readable text there (masterfile rule). */
section.light .caption, section.mist .caption{ color:var(--ink); opacity:.68; }

.reveal{ opacity:0; transform:translateY(26px); transition:opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in{ opacity:1; transform:none; }

.editorial-band{ display:grid; grid-template-columns:1.2fr 1fr 1fr; gap:24px; }
@media (max-width:920px){ .editorial-band{ grid-template-columns:1fr; } }

.teaser-card{ display:flex; flex-direction:column; gap:0; }
.teaser-card .frame{ margin-bottom:28px; }
.teaser-card h3{ font-size:clamp(22px,2.6vw,28px); }
.teaser-card p{ margin-top:16px; color:var(--stone); max-width:44ch; }
section.light .teaser-card p, section.mist .teaser-card p{ color:var(--ink); opacity:.75; }
.teaser-card a.link{ margin-top:20px; display:inline-flex; align-items:center; gap:8px; font-size:12.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--gold); font-weight:600; }
section.light .teaser-card a.link, section.mist .teaser-card a.link{ color:var(--deep-gold); }
.teaser-card a.link .arrow{ transition:transform .3s var(--ease); }
.teaser-card a.link:hover .arrow{ transform:translateX(5px); }

/* ---------- Spec list ---------- */
.spec-list{ list-style:none; margin:0; padding:0; }
.spec-list li{ display:flex; justify-content:space-between; gap:24px; padding:20px 0; border-bottom:1px solid rgba(198,160,82,.22); }
.spec-list li span:first-child{ color:var(--stone); font-size:13px; letter-spacing:.08em; text-transform:uppercase; }
section.light .spec-list li, section.mist .spec-list li{ border-bottom-color:rgba(169,126,51,.28); }
section.light .spec-list li span:first-child, section.mist .spec-list li span:first-child{ color:var(--ink); opacity:.68; }
.spec-list li span:last-child{ font-family:var(--font-display); font-size:18px; text-align:right; }

/* ---------- Endorsement strip ---------- */
.endorse{ display:flex; align-items:center; gap:22px; justify-content:center; flex-wrap:wrap; text-align:center; }
.endorse img{ height:46px; width:auto; opacity:.92; }
.endorse p{ font-size:13.5px; letter-spacing:.04em; color:var(--stone); max-width:52ch; }

/* ---------- Forms ---------- */
.field{ margin-bottom:24px; }
.field label{ display:block; font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--deep-gold); margin-bottom:9px; font-weight:600; }
.field input, .field select, .field textarea{
  width:100%; background:var(--mist); border:1px solid var(--sand); color:var(--ink);
  font-family:var(--font-body); font-size:15.5px; padding:14px 16px; border-radius:2px; transition:border-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--deep-gold); }
.field textarea{ resize:vertical; min-height:110px; }
.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width:640px){ .field-row{ grid-template-columns:1fr; } }
.check-row{ display:flex; align-items:flex-start; gap:12px; }
.check-row input{ width:auto; margin-top:4px; }
.check-row label{ text-transform:none; letter-spacing:0; font-size:14.5px; color:var(--ink); font-weight:400; }
.hp-field{ position:absolute; left:-9999px; opacity:0; height:0; width:0; }
.form-note{ font-size:13px; color:var(--deep-lagoon); margin-top:16px; }

/* Web3Forms inline status (replaces the old Netlify #form-success block/hide toggle) */
.form__status{ display:none; margin-top:20px; padding:16px 18px; border-radius:2px; font-size:14.5px; line-height:1.6; }
.form__status.ok{ display:block; background:rgba(123,174,176,.12); border:1px solid var(--deep-lagoon); color:var(--ink); }
.form__status.err{ display:block; background:rgba(169,60,45,.08); border:1px solid #9c3b2c; color:#7a2e22; }
#enquire-form.is-submitted{ opacity:.6; pointer-events:none; }

/* ---------- Footer ---------- */
footer.site{ background:var(--espresso); color:var(--stone); padding:88px 0 34px; }
.footer-top{ display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:56px; padding-bottom:56px; border-bottom:1px solid rgba(198,160,82,.18); }
@media (max-width:820px){ .footer-top{ grid-template-columns:1fr; gap:40px; } }
footer.site .brand-mark img{ height:44px; }
footer.site .tagline-line{ font-family:var(--font-display); font-style:italic; color:var(--champagne); margin-top:18px; font-size:16px; }
footer.site h4{ font-family:var(--font-body); font-size:12px; letter-spacing:.16em; text-transform:uppercase; color:var(--gold); margin-bottom:18px; font-weight:600; }
footer.site ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:13px; }
footer.site a:hover{ color:var(--cream); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; gap:20px; padding-top:30px; flex-wrap:wrap; }
.footer-endorse{ display:flex; align-items:center; gap:12px; }
.footer-endorse img{ height:30px; width:auto; }
.footer-endorse span{ font-size:12.5px; letter-spacing:.03em; }
.footer-legal{ font-size:12px; opacity:.7; display:flex; gap:18px; flex-wrap:wrap; }
.footer-fine{ font-size:11.5px; opacity:.55; margin-top:22px; max-width:70ch; line-height:1.6; }

/* ---------- Map ---------- */
.map-frame{ border:1px solid rgba(198,160,82,.35); filter:sepia(.35) saturate(.6) brightness(.92) contrast(1.05); }
.map-frame iframe{ width:100%; height:420px; border:0; display:block; }

/* ---------- Misc ---------- */
.pill{ display:inline-block; border:1px solid var(--gold); color:var(--gold); font-size:11px; letter-spacing:.14em; text-transform:uppercase; padding:6px 14px; border-radius:20px; }
section.light .pill, section.mist .pill{ border-color:var(--deep-gold); color:var(--deep-gold); }
.two-col-text{ display:grid; grid-template-columns:1fr 1.4fr; gap:60px; }
@media (max-width:860px){ .two-col-text{ grid-template-columns:1fr; gap:30px; } }
.lead-para{ font-family:var(--font-display); font-size:clamp(20px,2.4vw,26px); font-style:italic; color:var(--stone); }
section.light .lead-para, section.mist .lead-para{ color:var(--ink); }
