/* ==========================================================================
   Amelia · Bali — Private Rehabilitation
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* paper */
  --paper:        #efe7d6;
  --canvas:       #f5eeda;
  --canvas-warm:  #e6dcc1;

  /* ink (we keep dark sections clean) */
  --ink:          #0d1f1c;
  --ink-soft:     #1a2e2a;
  --ink-mute:     #6c7a72;

  /* accents */
  --emerald:      #234940;
  --emerald-deep: #112721;
  --sage:         #97a89a;
  --bronze:       #9c7a4e;
  --bronze-deep:  #7a5d36;
  --sand:         #d6c79f;
  --line:         #d3c8af;
  --line-soft:    rgba(13,31,28,.10);

  /* type */
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* shadow */
  --shadow-1: 0 1px 2px rgba(13,31,28,.06), 0 8px 24px -12px rgba(13,31,28,.18);
  --shadow-2: 0 30px 80px -30px rgba(13,31,28,.40);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-weight: 360;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color .25s ease, opacity .25s ease; }
a:hover { color: var(--bronze-deep); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--bronze); color: var(--paper); }

h1, h2, h3, h4, .serif {
  font-family: var(--serif);
  font-weight: 320;
  font-variation-settings: 'opsz' 144, 'SOFT' 60;
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 5.8vw, 5.4rem); font-weight: 280; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: var(--bronze-deep);
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--bronze);
  vertical-align: middle;
  margin-right: 14px;
  transform: translateY(-2px);
}
.eyebrow.on-dark { color: var(--sand); }
.eyebrow.on-dark::before { background: var(--bronze); }

.lead {
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.pull {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1.3;
  color: var(--emerald);
}
.small { font-size: 14px; line-height: 1.55; color: var(--ink-mute); }

.container       { max-width: 1280px; margin: 0 auto; padding: 0 36px; }
.container-narrow{ max-width: 880px;  margin: 0 auto; padding: 0 36px; }
@media (max-width: 720px) {
  .container, .container-narrow { padding: 0 22px; }
}

section { padding: clamp(80px, 9vw, 150px) 0; position: relative; }

/* ----- Header ----------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 22px 0;
  transition: background .35s ease, backdrop-filter .35s ease, padding .35s ease, box-shadow .35s ease;
}
.site-header.scrolled {
  background: rgba(239, 231, 214, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 14px; color: var(--ink); }
.brand-mark {
  font-family: var(--serif);
  font-weight: 320;
  font-size: 28px;
  letter-spacing: 0.01em;
  line-height: 1;
}
.brand-mark em {
  font-style: normal;
  color: var(--bronze-deep);
  font-weight: 360;
}
.brand-tagline {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.nav-links { display: flex; align-items: center; gap: 38px; list-style: none; }
.nav-links a {
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--bronze);
  transition: width .3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-cta:hover { background: var(--emerald-deep); color: var(--paper); transform: translateY(-1px); }

.nav-toggle { display: none; width: 44px; height: 44px; }
.nav-toggle span {
  display: block; width: 22px; height: 1px; background: var(--ink); margin: 6px auto;
}

@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; left: 22px; right: 22px; top: 80px;
    padding: 28px;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-2);
  }
  .nav.is-open .nav-cta { display: inline-block; align-self: flex-start; margin-top: 14px; }
}

/* ----- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 30px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--emerald-deep); transform: translateY(-2px); color: var(--paper); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn-on-dark { background: var(--paper); color: var(--ink); }
.btn-on-dark:hover { background: var(--bronze); color: var(--paper); }
.btn-ghost-dark { border-color: var(--paper); color: var(--paper); }
.btn-ghost-dark:hover { background: var(--paper); color: var(--ink); }

/* ----- Hero ------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 200px 0 120px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(0.96);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,31,28,0) 30%, rgba(13,31,28,0.55) 100%),
    linear-gradient(90deg, rgba(13,31,28,0.55) 0%, rgba(13,31,28,0.15) 50%, rgba(13,31,28,0) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  width: 100%;
  color: var(--paper);
}
.hero-inner h1 {
  margin-top: 28px;
  font-style: italic;
  font-weight: 280;
  color: var(--paper);
  max-width: 16ch;
}
.hero-inner h1 em {
  font-style: normal;
  font-weight: 380;
  color: var(--sand);
}
.hero-inner .lead {
  margin-top: 32px;
  max-width: 50ch;
  color: rgba(239,231,214,.92);
}
.hero-actions {
  margin-top: 48px;
  display: flex; gap: 16px; flex-wrap: wrap;
}
.hero-meta {
  margin-top: 80px;
  display: flex; flex-wrap: wrap; gap: 50px;
  padding-top: 28px;
  border-top: 1px solid rgba(239,231,214,.30);
  max-width: 720px;
}
.hero-meta div strong {
  display: block;
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  color: var(--paper);
  line-height: 1;
}
.hero-meta div span {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(239,231,214,.65);
}
.hero-eyebrow {
  color: var(--sand) !important;
}
.hero-eyebrow::before { background: var(--bronze); }

/* ----- Ethos ------------------------------------------------------------ */
.ethos {
  background: var(--paper);
}
.ethos-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.ethos-img {
  position: sticky; top: 100px;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--shadow-2);
}
.ethos-img img { width: 100%; height: 100%; object-fit: cover; }
.ethos-body p { margin-top: 22px; font-size: 17px; line-height: 1.75; }
.ethos-body .pull { margin: 36px 0; }
@media (max-width: 880px) {
  .ethos-grid { grid-template-columns: 1fr; }
  .ethos-img { position: static; aspect-ratio: 16/10; }
}

/* ----- Section title ---------------------------------------------------- */
.section-title {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
}
.section-title__heading h2 { max-width: 16ch; }
.section-title__heading p {
  margin-top: 26px;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.7;
}
@media (max-width: 800px) {
  .section-title { grid-template-columns: 1fr; gap: 24px; }
}

/* ----- Programmes ------------------------------------------------------- */
.programmes {
  background: var(--canvas);
}
.prog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.prog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .4s ease;
}
.prog:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2);
  border-color: var(--bronze);
}
.prog .frame {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--canvas-warm);
}
.prog .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.prog:hover .frame img { transform: scale(1.04); }
.prog .body {
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 16px;
  flex: 1;
}
.prog .tag {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--bronze-deep);
}
.prog h3 { font-size: 24px; line-height: 1.2; }
.prog p { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.prog ul {
  margin-top: 8px;
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13.5px;
  color: var(--ink-mute);
}
.prog ul li { padding-left: 16px; position: relative; }
.prog ul li::before {
  content: '';
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 1px; background: var(--bronze);
}
@media (max-width: 980px) { .prog-grid { grid-template-columns: 1fr; } }

/* ----- Approach (dark) -------------------------------------------------- */
.approach {
  background: var(--emerald-deep);
  color: var(--paper);
}
.approach h2, .approach h3, .approach h4 { color: var(--paper); }
.approach .lead { color: rgba(239,231,214,.92); }
.approach .section-title__heading p { color: rgba(239,231,214,.78); }

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(239,231,214,.12);
  border-top: 1px solid rgba(239,231,214,.12);
  border-bottom: 1px solid rgba(239,231,214,.12);
}
.app-cell {
  background: var(--emerald-deep);
  padding: 50px 40px 60px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
  transition: background .4s ease;
}
.app-cell:hover { background: #0a1d18; }
.app-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 280;
  font-size: 56px;
  line-height: 1;
  color: var(--bronze);
}
.app-num::after {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--bronze);
  margin-top: 18px;
}
.app-cell h4 { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.app-cell p { color: rgba(239,231,214,.78); font-size: 15px; line-height: 1.65; }

@media (max-width: 720px) { .app-grid { grid-template-columns: 1fr; } }

/* ----- Discretion / NDA ------------------------------------------------- */
.discretion {
  background: var(--paper);
}
.disc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.disc-img {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--shadow-2);
}
.disc-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.disc-body p { margin-top: 22px; font-size: 17px; line-height: 1.75; }
.disc-promises {
  margin-top: 40px;
  list-style: none;
  display: flex; flex-direction: column;
}
.disc-promises li {
  padding: 22px 0 20px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: start;
}
.disc-promises li:last-child { border-bottom: 1px solid var(--line); }
.disc-promises .icon {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  color: var(--bronze-deep);
}
.disc-promises .icon svg { width: 18px; height: 18px; }
.disc-promises strong {
  font-family: var(--serif);
  font-weight: 380;
  font-size: 17px;
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}
.disc-promises span { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }
@media (max-width: 880px) { .disc-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ----- Residency stats -------------------------------------------------- */
.residency {
  background: var(--canvas);
}
.resi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 60px;
}
.resi-cell {
  background: var(--paper);
  padding: 40px 28px;
  text-align: left;
}
.resi-cell strong {
  display: block;
  font-family: var(--serif);
  font-weight: 320;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.resi-cell span {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.resi-cell em {
  display: block;
  margin-top: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
@media (max-width: 880px) { .resi-grid { grid-template-columns: 1fr 1fr; } }

/* residency two-column include / approach combo */
.resi-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}
.resi-cols ul {
  list-style: none;
  display: flex; flex-direction: column;
}
.resi-cols ul li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 24px;
  font-size: 15px;
}
.resi-cols ul li:last-child { border-bottom: 1px solid var(--line); }
.resi-cols ul li span:first-child { color: var(--ink-mute); letter-spacing: 0.04em; }
.resi-cols ul li span:last-child { color: var(--ink); font-family: var(--serif); font-size: 17px; text-align: right; }
@media (max-width: 880px) { .resi-cols { grid-template-columns: 1fr; gap: 36px; } }

/* ----- Aftercare -------------------------------------------------------- */
.aftercare {
  background: var(--paper);
}
.after-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.after-body p { margin-top: 22px; font-size: 17px; line-height: 1.75; }
.after-points {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.after-points div {
  padding: 24px 22px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.after-points strong {
  display: block;
  font-family: var(--serif);
  font-weight: 380;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
}
.after-points span { font-size: 14px; line-height: 1.6; color: var(--ink-mute); }
.after-img {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--shadow-2);
}
.after-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 880px) { .after-grid { grid-template-columns: 1fr; gap: 40px; } .after-points { grid-template-columns: 1fr; } }

/* ----- CTA strip -------------------------------------------------------- */
.cta {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(80px, 9vw, 130px) 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 80% 30%, rgba(156,122,78,.20), transparent 60%),
    radial-gradient(50% 50% at 10% 80%, rgba(151,168,154,.10), transparent 60%);
}
.cta-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.cta-grid h2 { color: var(--paper); font-style: italic; font-weight: 280; }
.cta-grid h2 em { font-style: normal; font-weight: 380; color: var(--bronze); }
.cta-grid p { color: rgba(239,231,214,.78); margin-top: 24px; max-width: 50ch; font-size: 17px; }

.cta-channels {
  display: flex; flex-direction: column; gap: 16px;
}
.cta-channel {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 22px; align-items: center;
  padding: 26px 28px;
  background: rgba(239,231,214,.06);
  border: 1px solid rgba(239,231,214,.18);
  border-radius: 6px;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.cta-channel:hover {
  background: rgba(239,231,214,.10);
  border-color: var(--bronze);
  transform: translateY(-2px);
}
.cta-channel .icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: rgba(239,231,214,.06);
  border: 1px solid rgba(239,231,214,.16);
  border-radius: 50%;
  color: var(--bronze);
}
.cta-channel .icon svg { width: 22px; height: 22px; }
.cta-channel .label {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(239,231,214,.6);
}
.cta-channel .value {
  display: block;
  font-family: var(--serif);
  font-weight: 360;
  font-size: 22px;
  color: var(--paper);
  margin-top: 4px;
}
.cta-channel .arrow {
  font-size: 22px; color: var(--bronze);
  transition: transform .25s ease;
}
.cta-channel:hover .arrow { transform: translateX(6px); }

@media (max-width: 880px) {
  .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .cta-channel { grid-template-columns: 48px 1fr auto; padding: 20px 22px; }
}

/* ----- Footer ----------------------------------------------------------- */
.site-footer {
  background: var(--canvas);
  padding: 80px 0 32px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
  border-bottom: 1px solid var(--line);
}
.footer-top h5 {
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 22px;
}
.footer-top ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-top a { font-size: 14.5px; color: var(--ink-soft); }
.footer-top a:hover { color: var(--bronze-deep); }
.footer-brand-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 320;
  line-height: 1.4;
  color: var(--ink);
  max-width: 36ch;
  margin-top: 14px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom .pill {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px;
}
@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

/* ----- Reveal animation ------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
