/*
 * global.css
 *  â Ecological Luxury Design System
 * Global stylesheet: tokens, reset, typography, nav, footer, animations
 * Version: 1.0 â April 2026
 *
 * Loaded site-wide via functions.php.
 * Page-specific styles are in separate files (serumpun-sarawak.css,
 * cuisine-philosophy.css, etc.) and load conditionally.
 * âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
 */


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   GOOGLE FONTS â loaded via functions.php wp_enqueue_style
   Playfair Display Â· Montserrat Â· Libre Baskerville
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   DESIGN TOKENS
   Ecological Luxury â Sarawak forest deep Â· peat earth
   Â· resin amber Â· wet lichen
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
:root {
  /* Palette */
  --black:    #080C08;
  --deep:     #0E140D;
  --surface:  #162014;
  --white:    #EDEAE0;
  --body:     #C8C9B8;
  --gold:     #B8934A;
  --gold-sub: #7D6135;
  --moss:     #4A5E3E;
  --lichen:   #6B7A5C;

  /* Spacing */
  --gutter:   clamp(1.5rem, 6vw, 7rem);
  --max-w:    1200px;
  --sec-pad:  clamp(4.5rem, 10vh, 8rem);
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   RESET
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, video, iframe {
  max-width: 100%;
  display: block;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   BASE â HTML / BODY
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
html {
  scroll-behavior: smooth;
  background: var(--black);
  min-height: 100%;
}

body {
  background: var(--black);
  color: var(--body);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.82;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   NEUTRALISE THEME OVERRIDES
   Prevents the active WordPress parent theme from
   injecting its own background, colour, font, or margin.
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
#page,
#content,
#primary,
.site,
.site-content,
.entry-content,
.page .entry-content,
main.site-main {
  background: transparent;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
  width: 100%;
}

/* Hide parent theme's header and footer â we use our own */
body.cjw-custom-page #masthead,
body.cjw-custom-page .site-header,
body.cjw-custom-page #colophon,
body.cjw-custom-page .site-footer,
body.cjw-custom-page .ast-above-header,
body.cjw-custom-page .ast-below-header,
body.cjw-custom-page .hfeed .ast-container,
body.cjw-custom-page .site-title-wrap {
  display: none !important;
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   TYPOGRAPHY â GLOBAL
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 1.05;
  color: var(--white);
}

h1 {
  font-size: clamp(3.2rem, 8vw, 9rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 4.5rem);
}

h3 {
  font-size: clamp(1rem, 1.4vw, 1.4rem);
  margin-bottom: 0.8rem;
}

h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--gold);
}

p {
  color: var(--body);
  margin-bottom: 1.3em;
}
p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
  color: var(--white);
}

em {
  font-style: italic;
  color: var(--gold);
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   NAVIGATION â SITE-WIDE
   Fixed nav bar with gradient fade. Brand left,
   section label right.
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.cjw-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(8,12,8,1) 60%, transparent);
  transition: background 0.4s ease;
}

.cjw-nav .nav-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.cjw-nav .nav-brand:hover {
  color: var(--gold);
}

.cjw-nav .nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.8rem);
}

.cjw-nav .nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.57rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--body);
  text-decoration: none;
  transition: color 0.3s ease;
}
.cjw-nav .nav-links a:hover,
.cjw-nav .nav-links a.active {
  color: var(--gold);
}

.cjw-nav .nav-section {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

/* WordPress admin bar clearfix */
.admin-bar .cjw-nav {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .cjw-nav {
    top: 46px;
  }
}

/* Mobile nav toggle */
.cjw-nav .nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.cjw-nav .nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--white);
  margin: 5px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .cjw-nav .nav-toggle {
    display: block;
  }
  .cjw-nav .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--deep);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    padding: 2rem;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(74,94,62,0.2);
  }
  .cjw-nav .nav-links.open {
    right: 0;
  }
  .cjw-nav .nav-links a {
    font-size: 0.65rem;
  }
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   SECTIONS â GLOBAL
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.sec {
  background: var(--black);
  padding: var(--sec-pad) var(--gutter);
}
.sec__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.sec--dark {
  background: var(--deep);
  padding: var(--sec-pad) var(--gutter);
}
.sec--dark .sec__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.sec--flush {
  padding-left: 0;
  padding-right: 0;
}
.sec-head {
  margin-bottom: clamp(2.5rem, 5vh, 4rem);
}
.sec-head .eyebrow {
  margin-bottom: 1rem;
}

/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   GRID â GLOBAL
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.col-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 8rem);
  align-items: start;
}
.col-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(74,94,62,0.2);
}
@media (max-width: 900px) {
  .col-2, .col-3 {
    grid-template-columns: 1fr;
  }
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   SHARED COMPONENTS
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */

/* Pullquote */
.pq {
  border-left: 2px solid var(--gold);
  padding-left: 1.8rem;
  margin: 2.5rem 0;
}
.pq p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.15rem, 1.8vw, 1.9rem);
  font-style: italic;
  line-height: 1.55;
  color: var(--white);
}
.pq cite {
  display: block;
  margin-top: 0.8rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-sub);
  font-style: normal;
}

/* Statement box */
.statement {
  border: 1px solid rgba(74,94,62,0.35);
  background: rgba(22,32,20,0.6);
  padding: clamp(2rem, 4vw, 3.5rem);
  margin: 3rem 0;
}
.statement p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 1.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.6;
  color: var(--white);
}
.statement cite {
  display: block;
  margin-top: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-sub);
  font-style: normal;
}

/* Text blocks */
.text-block p {
  font-size: clamp(0.95rem, 1.05vw, 1.08rem);
  line-height: 1.85;
  color: var(--body);
}
.text-block p + p {
  margin-top: 1.4em;
}

/* Technique cards */
.t-card {
  background: var(--black);
  padding: 2.4rem 2rem;
  transition: background 0.3s ease;
}
.t-card:hover { background: var(--surface); }
.t-card .card-num,
.t-card .t-card-num {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.53rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-sub);
  margin-bottom: 0.8rem;
}
.t-card h3 { margin-bottom: 0.6rem; }
.t-card p {
  font-size: 0.92em;
  color: var(--body);
  margin-bottom: 0;
}

/* Divider line */
.divider-line {
  border: none;
  border-top: 1px solid rgba(74,94,62,0.4);
  margin: 0;
}

/* Image placeholder / container */
.img-ph {
  background: var(--surface);
  width: 100%;
  aspect-ratio: 16/10;
  display: block;
  overflow: hidden;
  position: relative;
}
.img-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.7s ease;
}
.img-ph:hover img { transform: scale(1.03); }
.img-ph--tall { aspect-ratio: 3/4; }
.img-ph--wide { aspect-ratio: 16/7; width: 100%; }
.img-ph--sq   { aspect-ratio: 1/1; }
.img-ph span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.48rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Image strip â full-bleed */
.img-strip {
  width: 100%;
  aspect-ratio: 21/9;
  overflow: hidden;
  position: relative;
}
.img-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.img-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,12,8,0.3), rgba(8,12,8,0.5));
}
@media (max-width: 768px) {
  .img-strip { aspect-ratio: 16/9; }
}

/* Image caption */
.img-caption {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 0.57rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-sub);
  margin-top: 0.9rem;
  display: block;
}

/* Video embed */
.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--surface);
  overflow: hidden;
}
.video-wrap iframe,
.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Gratitude list */
.g-list { list-style: none; }
.g-list li {
  border-bottom: 1px solid rgba(74,94,62,0.2);
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}
.g-list li:first-child { border-top: 1px solid rgba(74,94,62,0.2); }
.g-list .g-term {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 0.1em;
}
.g-list .g-def { font-size: 0.9em; }
.g-list .role {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-sub);
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .g-list li { grid-template-columns: 1fr; gap: 0.5rem; }
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   HERO â GLOBAL
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) clamp(4rem, 10vh, 7rem);
  overflow: hidden;
  background: var(--black);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,12,8,0.96) 0%,
    rgba(8,12,8,0.6) 40%,
    rgba(8,12,8,0.2) 80%,
    rgba(8,12,8,0.35) 100%
  );
  z-index: 1;
}
.hero-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(to top, rgba(8,12,8,1) 0%, rgba(8,12,8,0.65) 50%, rgba(8,12,8,0.2) 100%),
    linear-gradient(160deg, #0d1a0b 0%, #080c08 60%);
}
.hero-photo[style] {
  background-image:
    linear-gradient(to top, rgba(8,12,8,1) 0%, rgba(8,12,8,0.65) 50%, rgba(8,12,8,0.2) 100%);
}
.hero-content,
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
}
.hero-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--body);
  max-width: 50ch;
  line-height: 1.9;
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   FOOTER â SITE-WIDE
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.cjw-footer {
  background: var(--deep);
  border-top: 1px solid rgba(74,94,62,0.1);
  padding: 1.8rem var(--gutter);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.cjw-footer span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(221,216,207,0.3);
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   SCROLL REVEAL â .rv / .rv.on
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.rv {
  opacity: 0.15;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
.rv.on {
  opacity: 1;
  transform: translateY(0);
}
.rv.d1 { transition-delay: 0.1s; }
.rv.d2 { transition-delay: 0.2s; }
.rv.d3 { transition-delay: 0.3s; }

/* Hero entrance animation */
.h-anim {
  opacity: 0;
  animation: cjwRiseIn 1s ease forwards;
}
.h-anim.a1 { animation-delay: 0.3s; }
.h-anim.a2 { animation-delay: 0.55s; }
.h-anim.a3 { animation-delay: 0.8s; }

@keyframes cjwRiseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   SIGNATURE BLOCK
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.sig {
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(74,94,62,0.3);
}
.sig-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--white);
}
.sig-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.53rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-sub);
  margin-top: 0.4rem;
  line-height: 1.8;
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   CLOSING SECTION
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
.closing {
  text-align: center;
  padding: var(--sec-pad) var(--gutter);
  background: var(--black);
  max-width: var(--max-w);
  margin: 0 auto;
}
.closing h2 { margin-bottom: 2rem; font-style: italic; }
.closing p { max-width: 640px; margin-left: auto; margin-right: auto; }
.closing-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-top: 4rem;
}
.closing-seal-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(74,94,62,0.6), transparent);
}
.closing-seal-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 0.54rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(184,147,74,0.5);
}


/* âââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   RESPONSIVE â MOBILE
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââ */
@media (max-width: 600px) {
  h1 {
    font-size: clamp(2.8rem, 14vw, 5rem);
  }
}
