/* ==========================================================================
   Sanatana — main stylesheet
   Layout, sizes and colours follow the reference design (hregroup.co.uk).
   Edit the :root variables to re-brand.
   ========================================================================== */
:root {
  /* Colours */
  --c-white: #ffffff;
  --c-black: #000000;
  --c-stone: #d0cfcd;          /* slide-out menu + footer background */
  --c-grey: #9d9d9c;           /* project titles, link hover */
  --c-header-light: rgba(255, 255, 255, 0.9);  /* fixed header after scroll (light pages) */
  --c-header-dark: rgba(0, 0, 0, 0.9);         /* fixed header after scroll (dark pages) */

  /* Fonts */
  --f-sans: "Arimo", Arial, sans-serif;        /* copy, utility links */
  --f-serif: "Gelasio", Georgia, serif;        /* headings, menu */
  --ls-serif: 0.0625rem;

  /* Logo: shown as-is (gold on black). To recolour a transparent logo instead,
     use e.g. "brightness(0) invert(1)" (white) / "brightness(0)" (black). */
  --logo-on-dark: none;
  --logo-on-light: none;

  /* WhatsApp button */
  --c-whatsapp: #25d366;

  /* Layout */
  --wrap: 1300px;
  --wrap-pad: 9%;
  --logo-h: 52px;          /* inner pages (the black box includes its own padding) */
  --logo-h-home: 76px;     /* homepage */
  --menu-w: calc((100vw - 440px) / 2);
}

/* ---------- Reset / base ---------- */
html, body, h1, h2, h3, h4, h5, h6, p, ul, li, form, figure { margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--f-sans);
  font-size: 100%;
  line-height: 1;
  color: var(--c-black);
  background: var(--c-stone);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: opacity .3s ease, color .3s ease; }
a:hover { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
body.is-locked { overflow: hidden; }

h1, h2, .main-nav, .footer-nav { font-family: var(--f-serif); letter-spacing: var(--ls-serif); text-align: center; font-weight: 400; }
p { font-size: 14px; line-height: 1.6; margin-bottom: 1.6em; }

/* Skip link */
.skip-link {
  position: fixed; top: -400px; left: 40px; z-index: 20000;
  background: var(--c-white); color: var(--c-black); border: 2px solid var(--c-black);
  padding: 10px 20px; text-transform: uppercase;
}
.skip-link:focus { top: 40px; color: var(--c-black); }

/* content-box so the 9% side padding sits outside the 1300px max width (Bootstrap defaults to border-box) */
.inner { box-sizing: content-box; max-width: var(--wrap); padding: 0 var(--wrap-pad); margin: 0 auto; }

/* ==========================================================================
   Header — fixed bar: social links (left), centred logo, menu icon (right)
   ========================================================================== */
.site-header { padding-top: 30px; padding-bottom: 6.8%; min-height: 45px; }
.topfix {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 10000;
  padding: 30px 0 20px;
  transition: background .5s ease-in-out;
}
.mhwrap { position: relative; }

/* Header colour schemes */
.theme-dark .site-header, .theme-dark .topfix { color: var(--c-white); }
.theme-light .site-header, .theme-light .topfix { color: var(--c-black); }
.theme-dark .site-branding img { filter: var(--logo-on-dark); }
.theme-light .site-branding img { filter: var(--logo-on-light); }
.theme-light .site-header { background: var(--c-white); }
body.scrolled.theme-light .topfix { background: var(--c-header-light); }
body.scrolled.theme-dark .topfix { background: var(--c-header-dark); }
/* About: white-on-image at the top, flips to black-on-white after scrolling */
body.scrolled.page-about .topfix { background: var(--c-header-light); color: var(--c-black); }
body.scrolled.page-about .site-branding img { filter: var(--logo-on-light); }

/* Social / utility links (top-left) */
.top-social { position: absolute; left: 0; top: 0; display: flex; align-items: center; font-size: 13px; font-weight: 500; text-transform: uppercase; }
.top-social li { margin-right: .8em; line-height: 1; }
.top-social li.contactlink { margin-right: 2em; }
.top-social a { display: inline-flex; align-items: center; }
.top-social a:hover { opacity: .6; }
.top-social svg { width: 11px; height: 11px; fill: currentColor; display: block; }

/* Logo (centred) */
.site-branding { text-align: center; line-height: 1; }
.site-branding a { display: inline-block; }
.site-branding img { height: var(--logo-h); width: auto; transition: filter .5s ease-in-out; }
.home .site-branding img { height: var(--logo-h-home); }

/* Menu icon (top-right) */
.menu-toggle {
  position: absolute; right: 0; top: 0; z-index: 10001;
  width: 44px; height: 25px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer;
}
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  position: absolute; right: 0; width: 44px; height: 1px; background: currentColor;
  transition: transform .4s ease, top .4s ease, background-color .3s ease;
}
.menu-toggle .bars { top: 12px; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; }
.menu-toggle .bars::before { top: -12px; }
.menu-toggle .bars::after { top: 12px; }
.menu-open .menu-toggle { color: var(--c-white); }
.menu-open .menu-toggle .bars { background: transparent; }
.menu-open .menu-toggle .bars::before, .menu-open .menu-toggle .bars::after { width: 32px; right: 6px; }
.menu-open .menu-toggle .bars::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-toggle .bars::after { top: 0; transform: rotate(-45deg); }

/* ==========================================================================
   Slide-out menu panel (all screen sizes, as on the reference)
   ========================================================================== */
.navpanel {
  position: fixed; top: 0; right: -50vw; z-index: 10000;
  width: var(--menu-w); min-width: 9em; height: 100vh; height: 100dvh;
  padding: 100px 20px 50px; box-sizing: border-box;
  background: var(--c-stone); color: var(--c-white);
  font-size: 24px; visibility: hidden;
  transition: right 1s ease-in-out, visibility 0s linear 1s;
}
.menu-open .navpanel { right: 0; visibility: visible; transition: right 1s ease-in-out; }
.insidepanel { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.main-nav { font-size: inherit; line-height: 2.7; margin-bottom: 4em; }
.main-nav li { transform: translateX(100vw); transition: transform .6s ease-in-out 1s; }
.main-nav li:nth-child(1) { transition-delay: .5s; }
.main-nav li:nth-child(2) { transition-delay: .6s; }
.main-nav li:nth-child(3) { transition-delay: .7s; }
.main-nav li:nth-child(4) { transition-delay: .8s; }
.main-nav li:nth-child(5) { transition-delay: .9s; }
.menu-open .main-nav li { transform: translateX(0); }
.main-nav a:hover, .main-nav a[aria-current="page"] { opacity: .7; }
.panel-logo img { height: 48px; width: auto; filter: var(--logo-on-dark); }

/* ==========================================================================
   Homepage — full-screen video
   ========================================================================== */
body.home { overflow: hidden; height: 100vh; height: 100dvh; background: var(--c-black); }
.home .site-header { padding: 0; min-height: 0; }
.bg-video {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; overflow: hidden;
  background: var(--c-black) url("../assets/img/hero-fallback-landscape.jpg") center / cover no-repeat;
}
.bg-video video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
}
.bg-video.no-video video, .bg-video.no-video .pauseplay { display: none; }

/* Pause / play (bottom-right, just left of the WhatsApp button) */
.pauseplay {
  position: fixed; right: 96px; bottom: 36px; z-index: 2;
  width: 2rem; height: 2rem; padding: 0; border: 0; background: transparent; color: var(--c-white); cursor: pointer;
}
.pauseplay svg { width: 100%; height: 100%; display: block; }
.pauseplay .i-play { display: none; }
.pauseplay.is-paused .i-play { display: block; }
.pauseplay.is-paused .i-pause { display: none; }
.pauseplay:hover { opacity: .7; }

/* ==========================================================================
   Inner pages — shared
   ========================================================================== */
.site-content { background: var(--c-white); color: var(--c-black); }
.page-header { margin-bottom: 5.5%; }
.page-title, .section-title {
  font-size: 25px; line-height: 1.5; padding-bottom: .3em; position: relative;
}
/* small centred rule under headings */
.page-title::after, .section-title::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 40px; height: 1px;
  margin-left: -20px; background: currentColor;
}
.entry-content, .blocks { max-width: 975px; margin: 0 auto; padding-bottom: 5.5%; }
.colwide { max-width: 600px; margin: 0 auto; text-align: center; }
.intro { font-size: 16px; }
.content-title { font-size: 24px; line-height: 1.6; padding-top: .6em; margin-bottom: .6em; }

/* Text + image side by side (About, Land, Bespoke) */
.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 5.5%; }
.split__text, .split__media { width: 46.2%; }
.split__text { text-align: left; }
.split__text .content-title { text-align: left; }
.split__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.split--reverse { flex-direction: row-reverse; }

/* Bulleted criteria list (Land) */
.ticks { margin: 0 0 1.6em; padding: 0; list-style: none; text-align: left; }
.ticks li { position: relative; padding-left: 1.4em; font-size: 14px; line-height: 1.6; margin-bottom: .4em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .7em; width: .7em; height: 1px; background: currentColor; }

/* Numbered process steps (Bespoke) */
.steps { display: flex; flex-wrap: wrap; justify-content: space-between; counter-reset: step; margin: 0 0 5.5%; padding: 0; list-style: none; }
.step { width: 22%; text-align: center; counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero); display: block;
  font: 400 32px/1 var(--f-serif); color: var(--c-grey); margin-bottom: .5em;
}
.step h3 { font: 400 13px/1.4 var(--f-sans); text-transform: uppercase; letter-spacing: 1px; margin-bottom: .8em; }

/* Call-to-action button */
.btn-line {
  display: inline-block; padding: 12px 40px;
  background: transparent; color: var(--c-black); border: 1px solid var(--c-black); border-radius: 0;
  font: 500 13px var(--f-sans); letter-spacing: 1px; text-transform: uppercase; transition: .3s ease;
}
.btn-line:hover { background: var(--c-black); color: var(--c-white); }
.cta { text-align: center; padding-bottom: 5.5%; }

/* ---------- Upcoming (project grid) ---------- */
.blocks { display: flex; flex-wrap: wrap; justify-content: space-between; }
.preview { width: 46.2%; max-width: 600px; text-align: center; margin-bottom: 2.3em; }
.preview a { display: block; width: 100%; color: inherit; }
.thumb {
  position: relative; width: 100%; padding-top: 66.667%;
  background: var(--c-white) center / cover no-repeat;
}
.thumb::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease;
  background: rgba(255,255,255,.9);
}
.thumb::before {   /* "open" plus sign shown on hover */
  content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; z-index: 1; opacity: 0;
  background:
    linear-gradient(var(--c-grey), var(--c-grey)) center / 100% 1px no-repeat,
    linear-gradient(var(--c-grey), var(--c-grey)) center / 1px 100% no-repeat;
  transition: opacity .3s ease;
}
.preview a:hover .thumb::after, .preview a:focus-visible .thumb::after,
.preview a:hover .thumb::before, .preview a:focus-visible .thumb::before { opacity: 1; }
.preview h2 {
  font-family: var(--f-sans); letter-spacing: 0; font-size: 24px; text-transform: uppercase;
  line-height: 1.2; padding-top: 1em; margin-bottom: .25em; color: var(--c-grey);
}
.preview p { margin-bottom: 0; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 11000; background: rgba(255,255,255,.96);
  display: none; align-items: center; justify-content: center; padding: 70px 16px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; }
.lightbox figcaption { margin-top: 18px; font-size: 18px; text-transform: uppercase; color: var(--c-grey); text-align: center; }
.lightbox__close {
  position: absolute; top: 30px; right: 5vw; width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer;
}
.lightbox__close::before, .lightbox__close::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 30px; height: 2px; background: var(--c-black);
}
.lightbox__close::before { transform: rotate(45deg); }
.lightbox__close::after { transform: rotate(-45deg); }

/* ---------- Contact (plain white page) ---------- */
.contact-details { text-align: center; margin-bottom: 1em; }
.contact-details p { font-size: 18px; }
.contact-details a:hover { color: var(--c-grey); }

.contact-form { max-width: 600px; margin: 0 auto; text-align: left; }
.contact-form .form-control {
  background: transparent; border: 0; border-bottom: 1px solid rgba(0,0,0,.35); border-radius: 0;
  color: var(--c-black); padding: 12px 0; font-size: 14px; box-shadow: none;
}
.contact-form .form-control:focus { border-color: var(--c-black); background: transparent; }
.contact-form .form-control::placeholder { font-family: var(--f-sans); font-size: 11px; letter-spacing: 1px; color: var(--c-black); text-transform: uppercase; opacity: 1; }
.contact-form .invalid-feedback { font-size: 12px; }
.contact-form .form-control.is-invalid { background-image: none; }
.contact-form .form-control.is-valid { border-color: var(--c-black); background-image: none; }
.contact-form .btn-line { display: block; margin: 1.5em auto 0; }
.form-success { display: none; text-align: center; }
.form-success p { font-size: 18px; }

/* ==========================================================================
   WhatsApp button (every page, bottom-right)
   ========================================================================== */
.whatsapp {
  position: fixed; right: 24px; bottom: 24px; z-index: 9000;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-whatsapp); color: var(--c-white);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: transform .3s ease, box-shadow .3s ease;
}
.whatsapp svg { width: 30px; height: 30px; fill: currentColor; }
.whatsapp:hover, .whatsapp:focus-visible { color: var(--c-white); transform: scale(1.08); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.menu-open .whatsapp { opacity: 0; pointer-events: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer-main { background: var(--c-stone); color: var(--c-white); padding: 40px 0; }
.fwrap { position: relative; }
.footer-logo { position: absolute; left: 0; top: 0; }
.footer-logo img { height: 48px; width: auto; filter: var(--logo-on-dark); }
.footer-social { position: absolute; right: 0; top: 0; padding-top: .65em; display: flex; font-size: 13px; font-weight: 500; text-transform: uppercase; }
.footer-social li { margin-left: .8em; }
.footer-social svg { width: 11px; height: 11px; fill: currentColor; display: block; }
.footer-nav { padding-top: .5em; margin-bottom: 2em; font-size: 16px; line-height: 2; }
.footer-nav li { display: inline-block; padding: 0 .7em; }
.footer-nav a:hover, .footer-social a:hover { opacity: .6; }
.site-info p { font-size: 12px; text-align: center; margin: 0; }
.site-info .pp { display: inline-block; line-height: 1; border: solid var(--c-white); border-width: 0 1px; padding: 0 1em; margin: 0 1em; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1600px) { .site-header { padding-bottom: max(6.8%, 60px); } }

@media (max-width: 980px) {
  .footer-logo, .footer-social { position: static; justify-content: center; text-align: center; margin: 0 auto; }
  .footer-logo { margin-bottom: 1em; }
  .footer-logo img { margin: 0 auto; }
  .footer-social { margin-bottom: 2em; }
  .footer-social li { margin: 0 .3em; }
  .site-info .pp { display: block; line-height: 3; border-width: 0; }
}

/* Portrait video + portrait fallback image */
@media (max-width: 900px) {
  .bg-video { background-image: url("../assets/img/hero-fallback-portrait.jpg"); }
}

@media (max-width: 800px) {
  .blocks { display: block; }
  .preview { width: 100%; margin-left: auto; margin-right: auto; }
  .contact-details p { font-size: 14px; }
  .split, .split--reverse { flex-direction: column-reverse; }
  .split__text, .split__media { width: 100%; }
  .split__media { margin-bottom: 1.6em; }
  .split__text, .split__text .content-title { text-align: center; }
  .step { width: 46%; margin-bottom: 2em; }
}

/* Menu panel: the calc() width gets too narrow below ~900px */
@media (max-width: 900px) { :root { --menu-w: 50vw; } }

@media (max-width: 600px) {
  .top-social li:not(.contactlink) { display: none; }
  .navpanel { width: 100vw; right: -100vw; }
}

@media (max-width: 560px) {
  .footer-nav li { display: block; }
  .whatsapp { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .whatsapp svg { width: 28px; height: 28px; }
  .pauseplay { right: 84px; bottom: 26px; }
}

@media (max-width: 480px), (max-height: 360px) {
  .site-branding img, .home .site-branding img { height: 44px; }
  .panel-logo { display: none; }
  .step { width: 100%; }
}
/* Logo must never collide with the corner links on small phones */
@media (max-width: 400px) {
  .site-branding img, .home .site-branding img { height: 38px; }
  .inner { padding: 0 6%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
