/* ============================================================
   Thailand Cost of Living — Brand Design System
   thailandcostofliving.com
   A lead-generation site for Thailand relocation, retirement
   & expat living. Cost-of-living is the top-of-funnel hook.
   ============================================================ */

:root {
  /* Brand palette — premium tropical */
  --jade:        #0f6e63;   /* primary  */
  --jade-deep:   #0a4f47;   /* hover / dark */
  --gold:        #e8b84b;   /* warm accent / CTA highlight */
  --coral:       #ef6f53;   /* action / buttons */
  --coral-deep:  #d8543a;
  --sand:        #faf6ef;   /* page background */
  --sand-2:      #f1e9da;   /* alt sections */
  --ink:         #1f2a28;   /* body text */
  --ink-soft:    #4d5a57;
  --line:        #e3dccd;
  --white:       #ffffff;

  --max:    1160px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15,110,99,.10);
  --shadow-lg: 0 18px 50px rgba(15,110,99,.16);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; color: var(--ink); font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 0 0 .5em; }
h3 { font-size: 1.3rem; margin: 0 0 .4em; }
p  { margin: 0 0 1rem; }
a  { color: var(--jade); text-decoration: none; }
a:hover { color: var(--jade-deep); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--alt { background: var(--sand-2); }
.section--jade { background: var(--jade); color: #eafaf6; }
.section--jade h2, .section--jade h3 { color: #fff; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 640px; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem;
  font-weight: 700; color: var(--coral); margin: 0 0 .6rem;
}
.section--jade .eyebrow { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  border: 2px solid transparent; transition: .18s ease; font-size: 1rem;
  text-align: center;
}
.btn--primary { background: var(--coral); color: #fff; }
.btn--primary:hover { background: var(--coral-deep); color: #fff; transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #3a2c00; }
.btn--gold:hover { background: #f0c869; color: #3a2c00; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--jade); border-color: var(--jade); }
.btn--ghost:hover { background: var(--jade); color: #fff; }
.btn--light { background: #fff; color: var(--jade-deep); }
.btn--light:hover { background: var(--sand); color: var(--jade-deep); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,239,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 22px; max-width: var(--max); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.brand .mark {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--sans);
}
.brand small { display: block; font-family: var(--sans); font-weight: 500; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .96rem; }
.nav-links a:hover { color: var(--jade); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: flex-start; gap: 0; background: var(--white);
    border-bottom: 1px solid var(--line); padding: 8px 22px 18px;
    box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav-cta .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; text-align: center;
  /* INTERIM hero shot: one of the site's own Jomtien photos, used so nothing fake ships.
     Replace with a purpose-shot wide hero when one exists (see SITE_NOTES, images needed). */
  background:
    linear-gradient(180deg, rgba(10,79,71,.74), rgba(10,79,71,.88)),
    url("../img/local/jomtien-beach-sunset.webp") center/cover no-repeat, var(--jade-deep);
  padding: 96px 0 104px;
}
/* .page-head is plain jade. The rule further down (search "page-head") is the one
   that applies; this block previously pulled in the placeholder graphic and was
   already being overridden, so the image reference has been removed. */
.page-head {
  background: var(--jade);
}
.hero h1 { color: #fff; max-width: 16ch; margin-left: auto; margin-right: auto; }
.hero p { font-size: 1.2rem; color: #e7f3f0; max-width: 620px; margin: 0 auto 1.6rem; }
.hero .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 38px; color: #d7ece7; font-size: .92rem; }
.hero-badges span b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--gold); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: .2s ease; display: block; color: var(--ink);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.card .ico { font-size: 1.9rem; margin-bottom: 10px; }
.card h3 { margin-bottom: .3em; }
.card p { color: var(--ink-soft); font-size: .98rem; margin: 0; }
.card .more { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--coral); font-size: .92rem; }

/* ---------- Funnel / lead boxes ---------- */
.funnel {
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  color: #eafaf6; border-radius: 20px; padding: 44px; box-shadow: var(--shadow-lg);
}
.funnel h2 { color: #fff; }
.funnel p { color: #d4ece7; }

.lead-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.lead-form input[type=email] {
  flex: 1 1 240px; padding: 14px 16px; border-radius: 999px; border: 0; font-size: 1rem;
  font-family: var(--sans);
}
.lead-form .note { width: 100%; font-size: .8rem; color: #bfe0d9; margin: 4px 0 0; }

/* book / product cards */
.book { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.book .cover { aspect-ratio: 3/4; background: linear-gradient(135deg,var(--jade),var(--coral)); color: #fff; display: grid; place-content: center; text-align: center; padding: 22px; font-family: var(--serif); font-size: 1.3rem; }
.book .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book .price { font-weight: 700; font-size: 1.3rem; color: var(--jade); }
.book .body .btn { margin-top: auto; }

/* property cards */
.prop { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.prop .photo { aspect-ratio: 16/10; background: linear-gradient(135deg,#9ed0c8,#0f6e63); position: relative; }
.prop .tag { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #3a2c00; font-size: .76rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.prop .body { padding: 20px; }
.prop .rate { font-weight: 700; color: var(--coral); }
.prop .meta { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Steps ---------- */
.steps { counter-reset: s; display: grid; gap: 18px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .n { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 700; display: grid; place-items: center; font-family: var(--serif); }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--jade); color: #eafaf6; padding: 64px 0 54px; text-align: center; }
.page-head h1 { color: #fff; }
.page-head p { color: #cfe9e3; max-width: 640px; margin: 0 auto; }
.breadcrumb { font-size: .85rem; color: #bfe0d9; margin-bottom: 12px; }
.breadcrumb a { color: #eafaf6; text-decoration: underline; }

/* prose */
.prose { max-width: 760px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose h2 { margin-top: 1.6em; }

/* table */
.costtable { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.costtable th, .costtable td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.costtable th { background: var(--jade); color: #fff; font-family: var(--sans); font-weight: 600; }
.costtable tr:last-child td { border-bottom: 0; }
.costtable td:last-child { font-weight: 600; color: var(--jade); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c7d2cf; padding: 56px 0 28px; font-size: .94rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-footer a { color: #c7d2cf; display: block; padding: 5px 0; }
.site-footer a:hover { color: var(--gold); }
.foot-bottom { border-top: 1px solid #33403d; margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: #8a9794; font-size: .85rem; }

/* utility */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }
.pill { display:inline-block; background: var(--sand-2); border:1px solid var(--line); color: var(--ink-soft); padding: 5px 14px; border-radius: 999px; font-size: .82rem; margin: 0 6px 6px 0; }

/* ============================================================
   MARKETING & CONVERSION COMPONENTS (added round 2)
   ============================================================ */

/* Announcement / urgency bar (top of page) */
.announce { background: var(--gold); color: #3a2c00; text-align: center; font-size: .9rem; font-weight: 600; padding: 9px 16px; }
.announce a { color: #3a2c00; text-decoration: underline; }

/* Trust bar (just under hero) */
.trustbar { background: var(--white); border-bottom: 1px solid var(--line); }
.trustbar .row { display: flex; gap: 34px; justify-content: center; flex-wrap: wrap; padding: 18px 22px; align-items: center; }
.trustbar .item { display: flex; align-items: center; gap: 9px; font-size: .92rem; color: var(--ink-soft); font-weight: 500; }
.trustbar .item b { color: var(--ink); }

/* Star ratings */
.stars { color: var(--gold); letter-spacing: 2px; font-size: 1.05rem; }

/* Stat counters */
.stat { text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 2.6rem; color: var(--jade); line-height: 1; margin-bottom: 4px; }
.stat span { color: var(--ink-soft); font-size: .95rem; }
.section--jade .stat b { color: var(--gold); }
.section--jade .stat span { color: #cfe9e3; }

/* Testimonial cards */
.tmonial { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; height: 100%; }
.tmonial .quote { font-size: 1.02rem; color: var(--ink); margin: 0; }
.tmonial .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.tmonial .avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; background: var(--sand-2); }
.tmonial .who b { display: block; font-size: .95rem; line-height: 1.2; }
.tmonial .who small { color: var(--coral); font-weight: 700; font-size: .76rem; } /* placeholder marker */

/* Money-back guarantee */
.guarantee { display: flex; align-items: center; gap: 20px; background: var(--sand-2); border: 1px dashed var(--jade); border-radius: var(--radius); padding: 22px 26px; }
.guarantee .seal { flex: none; width: 70px; height: 70px; border-radius: 50%; background: var(--jade); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; text-align: center; font-size: .68rem; line-height: 1.15; }
.guarantee p { margin: 0; }


.ph { position: relative; display: block; }

/* Scarcity note */
.scarcity { display: inline-block; background: #fdecea; color: var(--coral-deep); font-size: .82rem; font-weight: 600; padding: 5px 14px; border-radius: 999px; margin-bottom: 10px; }


/* ============================================================
   DEMO CHECKOUT MODAL (placeholder — simulates the buying flow,
   takes NO real payment. Replace with Gumroad/Lemon Squeezy/Stripe later.)
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,30,28,.62); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-overlay.open { display: flex; }
.checkout { background: #fff; border-radius: 16px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.checkout-head { background: var(--jade); color: #fff; padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.checkout-head h3 { color: #fff; margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 9px; }
.checkout-demo { background: var(--gold); color: #3a2c00; font-size: .62rem; font-weight: 700; padding: 3px 7px; border-radius: 5px; letter-spacing: .05em; }
.checkout-close { background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.checkout-body { padding: 22px 24px 24px; }
.checkout-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.checkout-line span { font-weight: 600; max-width: 72%; }
.checkout-line b { color: var(--jade); font-size: 1.3rem; }
.checkout-body label { display: block; font-size: .78rem; font-weight: 600; margin: 12px 0 4px; color: var(--ink-soft); }
.checkout-body input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: .95rem; font-family: var(--sans); }
.checkout-row { display: flex; gap: 10px; }
.checkout-row > div { flex: 1; }
.checkout .btn { width: 100%; margin-top: 18px; }
.checkout-note { font-size: .74rem; color: var(--ink-soft); text-align: center; margin: 12px 0 0; }
.pay-trust { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-soft); font-size: .76rem; margin-top: 10px; }
.checkout-success { text-align: center; padding: 10px 0 6px; }
.checkout-success .big { font-size: 2.6rem; line-height: 1; }
.checkout-success h4 { font-size: 1.3rem; margin: 12px 0 6px; }


/* ============================================================
   QUICK ANSWER + FAQ  (added 2026-08-16)
   Used by the blocks that add_qa_faq.py inserts into every guide
   page. The Quick Answer sits under the page title, the FAQ sits
   above the closing call to action.
   ============================================================ */

.wrap--narrow { max-width: 860px; }

/* ---- Quick answer box ---- */
.qa-section { padding: 44px 0 6px; }
.qa {
  max-width: 820px; margin: 0 auto; text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 26px 30px;
  box-shadow: var(--shadow);
}
.qa-label {
  text-transform: uppercase; letter-spacing: .16em; font-size: .74rem;
  font-weight: 700; color: var(--jade); margin: 0 0 .55rem;
}
.qa-q { font-size: clamp(1.2rem, 2.4vw, 1.55rem); margin: 0 0 .5rem; }
.qa-a { font-size: 1.08rem; line-height: 1.68; color: var(--ink); margin: 0; }

/* ---- FAQ accordion ---- */
.faq-h { text-align: center; margin-bottom: 1.1em; }
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 18px 46px 18px 2px;
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--ink);
  transition: color .15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--jade); }
.faq-item summary:focus-visible { outline: 2px solid var(--jade); outline-offset: 3px; border-radius: 4px; }
.faq-item summary::after {
  content: ""; position: absolute; right: 12px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--jade); border-bottom: 2px solid var(--jade);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq-item[open] summary { color: var(--jade); }
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-a { padding: 0 46px 20px 2px; }
.faq-a p { margin: 0; color: var(--ink-soft); line-height: 1.7; }

@media (max-width: 640px) {
  .qa-section { padding: 30px 0 4px; }
  .qa { padding: 22px 20px; }
  .faq-item summary { font-size: 1.02rem; padding-right: 40px; }
}
