/* ==========================================================================
   Godrej Barca — base: fonts, design tokens, reset, shared components
   ========================================================================== */

/* ---------- Fonts (single brand family, three weights) ---------- */
@font-face {
  font-family: "Cera Godrej";
  src: url("../fonts/CeraGodrejInterio-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cera Godrej";
  src: url("../fonts/CeraGodrejInterio-medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cera Godrej";
  src: url("../fonts/CeraGodrejInterio-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ----------
   Five colours, and only five. Everything else on the page is one of these,
   or a mix/opacity of two of them; never add a sixth.
     limestone   sun-washed stone: light grounds, text on dark
     sand        warm plaster: secondary surfaces, image placeholders
     sea         deep coastal ink: text on light, dark grounds, image scrims
     olive       botanical grey-green: secondary text on light
     terracotta  burnt clay: the single accent (CTAs, active markers) */
:root {
  --limestone: #f3eee6;
  --sand: #e6dbc9;
  --sea: #14233a;
  --olive: #5c6146;
  --terracotta: #a14d2e;

  /* Roles: the default context is dark (hero, header, location, footer).
     .theme-light below re-points them for the limestone sections. */
  --bg: var(--sea);
  --surface: color-mix(in srgb, var(--limestone) 6%, var(--sea));
  --ink: var(--limestone);
  --ink-muted: color-mix(in srgb, var(--limestone) 70%, var(--sea));
  --ink-soft: color-mix(
    in srgb,
    var(--limestone) 84%,
    var(--sea)
  ); /* muted text sitting on video */
  --hairline: color-mix(in srgb, var(--limestone) 22%, transparent);
  --accent: color-mix(
    in srgb,
    var(--terracotta) 62%,
    var(--limestone)
  ); /* sun-lit clay: marks and small text on sea (5.4:1) */
  --accent-hover: color-mix(in srgb, var(--terracotta) 80%, var(--sea));
  --focus: var(--ink);

  /* Type */
  --font-sans: "Cera Godrej", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Layout & motion */
  --gutter: clamp(20px, 5.5vw, 96px);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Light context: limestone ground, sea ink, olive secondary text. Custom
   properties resolve where they are declared, so every role that depends
   on --ink is restated here rather than inherited. */
.theme-light {
  --bg: var(--limestone);
  --surface: var(--sand);
  --ink: var(--sea);
  --ink-muted: var(--olive);
  --ink-soft: var(--olive);
  --hairline: color-mix(in srgb, var(--sea) 17%, transparent);
  --accent: var(--terracotta);
  --focus: var(--sea);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.35s var(--ease-out),
    color 0.35s var(--ease-out);
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover .btn__icon {
  transform: translateX(4px);
}

/* Terracotta primary (class name kept for the markup/JS hooks). Limestone on
   terracotta is 5:1; hover settles into a deeper, sea-shaded clay rather
   than flashing to a new colour. */
.btn-coral {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--terracotta);
  color: var(--limestone);
  box-shadow: 0 18px 36px -22px color-mix(in srgb, var(--sea) 85%, transparent);
}

/* Hover: deeper clay sweeps in from the left instead of a flat swap. */
.btn-coral::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--accent-hover);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.55s var(--ease-out);
}

.btn-coral:hover::before,
.btn-coral:focus-visible::before {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Fine inset frame — a quiet architectural double rule. */
.btn-coral::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid color-mix(in srgb, var(--limestone) 24%, transparent);
  border-radius: 1px;
  pointer-events: none;
  transition: border-color 0.35s var(--ease-out);
}

.btn-coral:hover::after {
  border-color: color-mix(in srgb, var(--limestone) 40%, transparent);
}

/* Arrow sits in its own ringed cell; the ring fills limestone on hover. */
.btn-coral:has(.btn__icon) {
  padding-right: 10px;
}

.btn-coral .btn__icon {
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--limestone) 45%, transparent);
  border-radius: 50%;
  transition:
    transform 0.35s var(--ease-out),
    background-color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    color 0.35s var(--ease-out);
}

.btn-coral:hover .btn__icon {
  transform: translateX(3px);
  background-color: var(--limestone);
  border-color: var(--limestone);
  color: var(--terracotta);
}

/* ==========================================================================
   Site header — fixed; clear over the hero, solid once the page scrolls,
   tucks away while scrolling down and returns on the way up.
   ========================================================================== */
#fixed-header {
  --header-pad: clamp(14px, 2.2vh, 22px);
  --logo-h: clamp(46px, 2.2rem + 0.9vw, 56px);

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: calc(var(--header-pad) + env(safe-area-inset-top, 0px)) var(--gutter)
    var(--header-pad);
  color: var(--ink);
  transition:
    transform 0.6s var(--ease-out),
    padding 0.5s var(--ease-out),
    background-color 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out);
  border-bottom: 1px solid transparent;
}

#fixed-header.scrolled,
#fixed-header.menu-open {
  --header-pad: 10px;
  --logo-h: 44px;
  background-color: color-mix(in srgb, var(--sea) 88%, transparent);
  border-bottom-color: color-mix(in srgb, var(--limestone) 10%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

/* A couple of extra pixels so no antialiased sliver of the sea bar shows
   over the limestone sections at fractional scroll positions. */
#fixed-header.is-hidden {
  transform: translateY(calc(-100% - 2px));
}

/* Logo. The supplied file is a white-on-black raster wrapped in SVG, so an
   inline SVG filter (#logo-knockout in index.html) turns its luminance into
   alpha: the mark is redrawn in limestone, black drops out, and it sits
   cleanly on video or sea. */
.brand-logo {
  flex: none;
  display: block;
  line-height: 0;
  margin-block: calc(
    var(--logo-h) * -0.14
  ); /* the artwork carries its own top/bottom margin */
}

.brand-logo img {
  width: auto;
  height: var(--logo-h);
  filter: url("#logo-knockout");
  transition: height 0.5s var(--ease-out);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Desktop nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.6vw, 44px);
  margin-left: auto;
}

.header-nav a {
  position: relative;
  padding: 12px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.35s var(--ease-out);
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}

.header-nav a:hover,
.header-nav a[aria-current] {
  color: var(--ink);
}

.header-nav a:hover::after,
.header-nav a[aria-current]::after {
  transform: scaleX(1);
}

.header-cta {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-enquire {
  min-height: 44px;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
  border-radius: 15px;
  transition:
    background-color 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out);
}

/* Over the hero the header CTA is a glass outline so the hero's solid CTA
   leads; once the page scrolls it settles into solid terracotta. */
#fixed-header:not(.scrolled):not(.menu-open) .header-enquire {
  background-color: color-mix(in srgb, var(--sea) 22%, transparent);
  box-shadow: inset 0 0 0 1px
    color-mix(in srgb, var(--limestone) 55%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#fixed-header:not(.scrolled):not(.menu-open) .header-enquire::after {
  border-color: transparent;
}

.header-enquire::after {
  inset: 3px;
}

.header-burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.header-burger span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1px;
  background-color: var(--ink);
  transition:
    transform 0.45s var(--ease-out),
    top 0.45s var(--ease-out);
}

.header-burger span:nth-child(1) {
  top: 18px;
}

.header-burger span:nth-child(2) {
  top: 24px;
}

#fixed-header.menu-open .header-burger span:nth-child(1),
#fixed-header.menu-open .header-burger span:nth-child(2) {
  top: 21px;
}

#fixed-header.menu-open .header-burger span:nth-child(1) {
  transform: rotate(45deg);
}

#fixed-header.menu-open .header-burger span:nth-child(2) {
  transform: rotate(-45deg);
}

/* Mobile menu — full-screen panel beneath the header bar */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: calc(96px + env(safe-area-inset-top, 0px)) var(--gutter)
    max(28px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background-color: var(--bg);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.45s var(--ease-out),
    visibility 0s linear 0.45s;
}

.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.45s var(--ease-out);
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
}

.mobile-menu__nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s var(--ease-out),
    transform 0.6s var(--ease-out);
}

.mobile-menu__num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}

.mobile-menu__nav a[aria-current] .mobile-menu__num {
  color: var(--accent);
}

.mobile-menu.open .mobile-menu__nav a {
  opacity: 1;
  transform: none;
}

.mobile-menu.open .mobile-menu__nav a:nth-child(2) {
  transition-delay: 0.06s;
}

.mobile-menu.open .mobile-menu__nav a:nth-child(3) {
  transition-delay: 0.12s;
}

.mobile-menu__foot {
  margin-top: auto;
  padding-top: 40px;
}

.mobile-menu__foot .btn {
  width: 100%;
}

html.menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  #fixed-header {
    animation: header-in 1s var(--ease-out) 0.1s both;
  }
}

@keyframes header-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #fixed-header,
  #fixed-header *,
  .mobile-menu,
  .mobile-menu * {
    transition: none !important;
  }
}

/* Tablet and below: nav moves into the menu panel */
@media (max-width: 899px) {
  .header-nav {
    display: none;
  }

  .header-cta {
    margin-left: auto;
  }

  .header-burger {
    display: block;
  }
}

@media (max-width: 767px) {
  #fixed-header {
    --header-pad: 10px;
    --logo-h: 40px;
    gap: 16px;
  }

  #fixed-header.scrolled,
  #fixed-header.menu-open {
    --header-pad: 8px;
    --logo-h: 38px;
  }

  .header-cta {
    gap: 8px;
  }

  .header-enquire {
    padding: 0 16px;
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .mobile-menu {
    padding-top: calc(84px + env(safe-area-inset-top, 0px));
  }
}

/* Only the menu belongs on screens wide enough for the full nav */
@media (min-width: 900px) {
  .mobile-menu {
    display: none;
  }
}
