/* ==========================================================================
   Mandara Bali — shared stylesheet (v1, October 2026)
   Used by every page built from _templates/page.html.
   Tokens match the existing landing pages so old and new pages sit together.
   ========================================================================== */

:root {
  --ink:        #1E2D3D;
  --ink-soft:   #4F5D69;
  --muted:      #6B7A86;
  --ground:     #FAFAF8;
  --paper:      #F0EDE6;
  --white:      #FFFFFF;
  --gold:       #C4A882;
  --gold-light: #D4BC9A;
  --gold-deep:  #86683F;   /* gold for text on light backgrounds (AA contrast) */
  --rule:       rgba(196,168,130,0.32);

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --mono:  'DM Mono', ui-monospace, Menlo, monospace;
  --sans:  'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --space-xl: clamp(4.5rem, 9vw, 7rem);
  --max: 1120px;
  --measure: 62ch;
  --col-pad: clamp(1.5rem, 5vw, 4rem);
  --nav-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-padding-top: calc(var(--nav-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 1.05vw, 1.075rem);
  font-weight: 300;
  line-height: 1.8;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: .75rem 1rem; z-index: 200; }
.skip:focus { left: 1rem; top: 1rem; }

/* ─── Nav ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: calc(1.2rem + env(safe-area-inset-top, 0px)) var(--col-pad) 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: rgba(250,250,248,0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-logo img { height: 36px; width: auto; }
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a, .nav-cta {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft); transition: color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { border-bottom: 1px solid var(--gold); }
.nav-cta { padding: .5rem 1.1rem; border: 1px solid var(--gold-deep); color: var(--gold-deep); white-space: nowrap; transition: background .2s, color .2s; }
.nav-cta:hover { background: var(--gold); color: var(--ink); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ─── Buttons ─── */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .85rem 1.6rem; border: 1px solid var(--gold); text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s;
}
.btn { background: var(--gold); color: var(--ink); }
.btn:hover { background: var(--gold-light); }
.btn-ghost { background: transparent; color: var(--gold-deep); border-color: var(--gold-deep); }
.btn-ghost:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* ─── Section shell ─── */
.section { padding: var(--space-xl) var(--col-pad); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: var(--white); }
.inner { max-width: var(--max); margin: 0 auto; }
.label {
  display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: var(--space-m);
}
.section--ink .label { color: var(--gold-light); }
h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.15; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: var(--space-m); max-width: 22ch; }
h2 em, h1 em { font-style: italic; color: var(--gold-deep); }
.section--ink h2 em, .hero h1 em { color: var(--gold); }
h3 { font-size: 1.3rem; font-weight: 400; line-height: 1.35; margin-bottom: .6rem; }
.prose p { color: var(--ink-soft); max-width: var(--measure); margin-bottom: var(--space-s); }
.prose p strong { font-weight: 500; color: var(--ink); }
.section--ink .prose p { color: rgba(255,255,255,.72); }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.2rem); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--space-m); } }

/* ─── Hero ─── */
.hero {
  min-height: min(92svh, 860px);
  padding: calc(var(--nav-h) + var(--space-l) + env(safe-area-inset-top, 0px)) var(--col-pad) var(--space-l);
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden; color: var(--white);
}
.hero-img { position: absolute; inset: 0; background: var(--ink) center / cover no-repeat; z-index: 0; }
.hero-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(30,45,61,.92) 0%, rgba(30,45,61,.72) 55%, rgba(30,45,61,.45) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; width: 100%; }
.hero .label { color: var(--gold-light); }
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); line-height: 1.05; letter-spacing: -.01em; max-width: 14ch; margin-bottom: var(--space-m); }
.hero-sub { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: rgba(255,255,255,.84); max-width: 54ch; margin-bottom: var(--space-l); }
.hero-actions { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; }
.hero-actions .btn-ghost { color: var(--gold-light); border-color: var(--gold-light); }

/* House signature: real coordinates + compass cross */
.coord {
  display: flex; align-items: center; gap: .8rem; margin-top: var(--space-l);
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: rgba(255,255,255,.62);
}
.coord .cross { position: relative; width: 22px; height: 22px; flex-shrink: 0; }
.coord .cross::before, .coord .cross::after { content: ''; position: absolute; background: var(--gold); }
.coord .cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.coord .cross::after { top: 50%; left: 0; right: 0; height: 1px; }

/* ─── Statement band ─── */
.statement { font-family: var(--serif); font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 300; line-height: 1.25; max-width: 26ch; }
.statement em { font-style: italic; color: var(--gold-deep); }

/* ─── Ruled cells (scope, audiences) ─── */
.cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.cells--2 { grid-template-columns: repeat(2, 1fr); }
.cell { background: var(--paper); padding: var(--space-m); }
.section:not(.section--paper):not(.section--ink) .cell { background: var(--ground); }
.cell p { font-size: .95rem; color: var(--ink-soft); line-height: 1.8; }
.cell .tag { display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: var(--space-s); }
.section--ink .cells { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.1); }
.section--ink .cell { background: var(--ink); }
.section--ink .cell p { color: rgba(255,255,255,.66); }
.section--ink .cell .tag { color: var(--gold-light); }
.section--ink .btn-ghost { color: var(--gold-light); border-color: var(--gold-light); }
.section--ink .btn-ghost:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
@media (max-width: 960px) { .cells { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cells, .cells--2 { grid-template-columns: 1fr; } }

/* ─── Q&A (written for people and AI search: question, then direct answer) ─── */
.qa { border-top: 1px solid var(--rule); }
.qa-item { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-s) var(--space-l); padding: var(--space-m) 0; border-bottom: 1px solid var(--rule); }
.qa-item h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); margin: 0; }
.qa-item .prose p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .qa-item { grid-template-columns: 1fr; } }

/* Rate table */
.rates { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .95rem; }
.rates th, .rates td { text-align: left; padding: .6rem 1rem .6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.rates th { font-weight: 500; color: var(--ink); }
.rates td.num { font-family: var(--mono); white-space: nowrap; color: var(--ink); }
.table-wrap { overflow-x: auto; }
.note { font-size: .85rem; color: var(--muted); }

/* ─── Steps (real sequence) ─── */
.steps { list-style: none; counter-reset: step; border-top: 1px solid var(--rule); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: var(--space-s); padding: var(--space-m) 0; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--mono); font-size: .75rem; color: var(--gold-deep); padding-top: .4rem; }
.steps p { color: var(--ink-soft); font-size: .95rem; }
.steps h3 { margin-bottom: .3rem; }

/* ─── Contact ─── */
.contact-list { list-style: none; border-top: 1px solid rgba(255,255,255,.14); }
.contact-list li { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.contact-list span { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); padding-top: .25rem; }
.contact-list a { color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(196,168,130,.4); }
.contact-list a:hover { border-color: var(--gold); }

/* ─── Byline / freshness ─── */
.byline { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; color: var(--muted); padding: var(--space-m) var(--col-pad); border-top: 1px solid var(--rule); }
.byline .inner { display: flex; flex-wrap: wrap; gap: .5rem 2rem; }

/* ─── Related links ─── */
.related { padding: var(--space-l) var(--col-pad); background: var(--paper); }
.related ul { list-style: none; display: flex; flex-wrap: wrap; gap: .8rem 2.4rem; }
.related a { font-family: var(--serif); font-size: 1.3rem; text-decoration: none; border-bottom: 1px solid var(--rule); }
.related a:hover { border-color: var(--gold); }

/* ─── Footer ─── */
.footer { background: var(--ink); color: rgba(255,255,255,.66); padding: var(--space-l) var(--col-pad) calc(var(--space-m) + env(safe-area-inset-bottom, 0px)); font-size: .9rem; }
.footer .inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-l); }
.footer h2 { font-size: 1.6rem; color: var(--white); margin-bottom: .6rem; }
.footer ul { list-style: none; }
.footer li { margin-bottom: .4rem; }
.footer a { text-decoration: none; color: rgba(255,255,255,.8); }
.footer a:hover { color: var(--gold-light); }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: var(--space-m); font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; }
@media (max-width: 760px) { .footer .inner { grid-template-columns: 1fr; gap: var(--space-m); } }

/* ─── Lists inside cells (comparisons, region highlights) ─── */
.cell ul { list-style: none; margin-top: .4rem; }
.cell li { padding: .55rem 0; border-bottom: 1px solid var(--rule); font-size: .95rem; color: var(--ink-soft); line-height: 1.6; }
.cell li:last-child { border-bottom: 0; }
.cell--muted h3, .cell--muted li { color: var(--muted); }
.callout { border-left: 2px solid var(--gold); padding: var(--space-s) 0 var(--space-s) var(--space-m); margin-top: var(--space-l); max-width: 70ch; }
.callout p { color: var(--ink-soft); }
.callout a { color: var(--gold-deep); }
