/* ============================================================
   THE COASTAL CITY  — page-specific styles (uses shared tokens
   from style.css: --rhythm/--alive/--ripple/--black/--white,
   --font-display/--font-body, .btn-pill).
   Fluid/flow layout (no Figma canvas to trace).
   ============================================================ */
.cc-wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

.cc-eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 400;
  font-size: 14px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--alive); margin-bottom: 18px;
}
.cc-rule { width: 44px; height: 3px; background: var(--alive); }

/* ---------- HERO ---------- */
.cc-hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  background: var(--rhythm); color: var(--ripple);
  padding: 200px 0 120px; overflow: hidden;
}
/* Wide monitors: head.php zooms the whole page up by w/1440, which would also
   multiply 100svh past the viewport. --hero-vh (set by that script as
   viewportHeight*1440/w) cancels the zoom so the hero fills the viewport exactly.
   Only >1440, since the root zoom only applies there. The .legal-hero / .art-hero
   modifiers load later and keep their own (deliberately shorter) min-heights. */
@media (min-width: 1441px) {
  .cc-hero { min-height: var(--hero-vh, 100svh); }
}
.cc-hero .cc-hero-bg { position: absolute; inset: 0; z-index: 0; }
.cc-hero .cc-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
/* Hero copy hugs the left edge rather than sitting in the centred wrap. */
.cc-hero .cc-wrap { position: relative; z-index: 1; margin: 0; }
.cc-hero h1 {
  font-family: var(--font-display); font-weight: 300; font-size: 60px; line-height: 1.08;
  color: var(--white); margin: 0 0 24px; max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.cc-lead {
  font-family: var(--font-body); font-size: 19px; line-height: 1.6;
  color: var(--white); max-width: 760px; margin: 0;
  text-shadow: 0 1px 16px rgba(0,0,0,.45);
}

/* ---------- PILLARS ---------- */
.cc-pillars { padding: 96px 0; background: var(--rhythm); position: relative; overflow: visible; }
/* The decorative rings bleed past the right edge (e.g. .cc-ring at
   right:-150px). Clip that horizontal overflow so they don't widen the
   document — otherwise the page gains ~150px of horizontal scroll, which
   stretches the full-width fixed .nav and pushes the right-anchored Sibaya
   logo off-screen on mobile. overflow-x:clip leaves the vertical bleed (the
   ring pulled up into the hero) intact. Must come after the `overflow:visible`
   shorthand above so it wins for the x-axis. */
.cc-pillars, .cc-landscape, .cc-phased { overflow-x: clip; }
/* Ring decoration, top-right of the section — pulled up over the hero above. */
.cc-pillars .cc-ring { top: -180px; right: -150px; left: auto; z-index: 2; }
.cc-pillars .cc-ring circle { stroke: #fff; stroke-opacity: .3; stroke-width: 2; }
/* Inline pillars: three equal columns side by side. */
.cc-pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; z-index: 1; }
.cc-pillar .cc-rule { display: block; margin-bottom: 18px; }
.cc-pillar h3 {
  font-family: var(--font-display); font-weight: 400; font-size: 24px;
  color: var(--white); margin: 0 0 14px;
}
.cc-pillar p {
  font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ripple); margin: 0;
}

/* ---------- AERIAL BANNER (full-bleed, between pillars and stats) ---------- */
.cc-banner { background: var(--black); line-height: 0; }
.cc-banner img { width: 100%; height: 340px; object-fit: cover; display: block; }

/* Desktop: pin the image to the viewport (background-attachment: fixed) so it stays
   still while the banner scrolls over it — same effect as the home page panorama.
   The <img> is swapped for a CSS background here; it still serves the mobile layout. */
@media (min-width: 1024px) {
  .cc-banner {
    height: 340px;
    background-image: url("../images/menu-hotel-2.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
  }
  .cc-banner img {
    display: none;
  }
}

/* ---------- LANDSCAPE (Explore-style image collage) ---------- */
.cc-landscape { padding: 96px 0; background: var(--ripple); overflow: hidden; }
.cc-section-head { max-width: 760px; margin: 0 0 56px; }
.cc-section-head h2 {
  font-family: var(--font-display); font-weight: 300; font-size: 42px; line-height: 1.15;
  color: var(--black); margin: 0 0 20px;
}
.cc-section-head p { font-family: var(--font-body); font-size: 17px; line-height: 1.6; color: #333; margin: 0 0 1em; }
.cc-section-head p:last-child { margin-bottom: 0; }

/* Title left / body right, like the home page "Explore The City". */
.cc-explore { position: relative; }
.cc-explore-head {
  display: grid; grid-template-columns: 38% 1fr; gap: 48px; align-items: start;
  margin-top: 22px;
  position: relative; z-index: 5;   /* keep copy above the pulled-up panorama */
}
.cc-explore > .cc-eyebrow { position: relative; z-index: 5; }
.cc-explore-title {
  font-family: var(--font-display); font-weight: 300; font-size: 42px; line-height: 1.1;
  color: var(--black); margin: 0;
}
.cc-explore-body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: #333; }
.cc-explore-body p { margin: 0 0 1.3em; }
.cc-explore-body p:last-child { margin-bottom: 0; }

/* Staggered overlapping collage: a wide landscape image with two tall
   portraits offset down-and-across, a decorative ring behind them. */
.cc-explore-collage { position: relative; height: 820px; margin-top: 40px; }
.cc-explore-collage > div { position: absolute; overflow: hidden; }
.cc-explore-collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Caption overlay sits above the (scaled/drifting) image, pinned to the frame. */
.cc-img-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 28px 18px 14px;
  font-size: .85rem; font-weight: 500; letter-spacing: .01em; line-height: 1.3;
  color: #fff; text-align: left;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events: none;
}
/* Panorama sits highest in the stack and is pulled up above the others. */
.cc-img-wide {
  left: 0; top: -80px; width: 56%; height: 400px;
  border-radius: 14px; z-index: 4;
}
.cc-img-tall-right {
  right: 0; top: 150px; width: 32%; height: 460px;
  border-radius: 14px; z-index: 1;
}
.cc-img-tall-left {
  left: 16%; top: 360px; width: 32%; height: 460px;
  border-radius: 14px; z-index: 2;
}
/* Ring renders in front of both tall images (z 1/2) but behind the
   panorama (z 4), so it overlays everything except lifestyle-panorama. */
.cc-explore-ring {
  position: absolute; left: 36%; top: 200px; width: 420px; height: auto; z-index: 3;
}
.cc-explore-ring circle { stroke: #fff; stroke-opacity: .8; stroke-width: 2.5; }
/* Ring is drawn as filled paths (default fill-opacity .1) — boost the fill
   so the ring reads clearly, same approach as the home page rings. */
.cc-explore-ring .ring path { fill-opacity: .5; }

/* ---------- GREEN BELTS COLLAGE — scroll-linked entrance + parallax (desktop) ----------
   Same effect as the home page "Explore the City" gallery: each image slides in
   from its edge as it rises into view (and back out on scroll up) while its inner
   <img> drifts for a parallax depth effect. The container carries the entrance
   (transform + opacity set inline by main.js); the <img> is scaled up a touch so its
   drift (--par, also from main.js) never exposes an edge inside the overflow:hidden
   frame. The ring is an <svg>, not a <div>, so it's left untouched. */
@media (min-width: 1024px) {
  .cc-explore-collage > div {
    opacity: 0; /* JS sets the real value immediately on load */
    will-change: transform, opacity;
  }
  .cc-explore-collage > div img {
    transform: translateY(var(--par, 0px)) scale(1.14);
    will-change: transform;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cc-explore-collage > div {
    opacity: 1 !important;
    transform: none !important;
  }
  .cc-explore-collage > div img {
    transform: none;
  }
}

/* ---------- PHASED GROWTH ---------- */
.cc-phased { padding: 96px 0; background: var(--rhythm); color: var(--ripple); overflow: hidden; }
.cc-phased .cc-wrap { position: relative; z-index: 1; }   /* copy above the ring */
/* Decorative ring straddling the seam with the CTA below. */
.cc-phased .cc-ring-phased { bottom: -300px; right: 60px; left: auto; top: auto; z-index: 0; }
.cc-phased .cc-ring-phased circle { stroke: #fff; stroke-opacity: .4; stroke-width: 2; }
.cc-phased .cc-section-head h2 { color: var(--white); }
.cc-phased .cc-section-head p { color: var(--ripple); }
.cc-sub {
  font-family: var(--font-display); font-weight: 400; font-size: 14px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--alive);
  margin: 56px 0 24px;
}
/* Section head left, the delivered logos to its right. */
.cc-phased-top {
  display: grid; grid-template-columns: 1fr 440px; gap: 64px; align-items: center;
}
.cc-phased-top .cc-section-head { margin: 0; max-width: none; }
.cc-delivered .cc-sub { margin-top: 0; }

/* Two vertical infinite logo banners: left scrolls up, right scrolls down. */
.cc-marquee {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  height: 420px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.cc-marquee-col { overflow: hidden; }
.cc-marquee-track { will-change: transform; }
.cc-marquee-up   .cc-marquee-track { animation: ccMarqueeUp   26s linear infinite; }
.cc-marquee-down .cc-marquee-track { animation: ccMarqueeDown 26s linear infinite; }
.cc-marquee:hover .cc-marquee-track { animation-play-state: paused; }
@keyframes ccMarqueeUp   { from { transform: translateY(0); }    to { transform: translateY(-50%); } }
@keyframes ccMarqueeDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }

.cc-chip {
  background: rgba(255,255,255,.06); border: 1px solid rgba(239,239,239,.18);
  border-radius: 10px; padding: 24px 26px;
  display: flex; align-items: center; justify-content: center;
  height: 124px; margin-bottom: 16px;   /* set height: 3 × (124+16) = 420 = one loop */
}
.cc-chip img {
  max-height: 52px; max-width: 80%; width: auto; height: auto; object-fit: contain;
  filter: brightness(0) invert(1); opacity: .92;
}
/* These logos read small at the shared cap (wide marks / fine lettering),
   so give OceanDune, Pebble Beach, Gold Coast and Marine Walk more room. */
.cc-chip img[src$="logo-2.webp"],      /* OceanDune  */
.cc-chip img[src$="logo-1.webp"],      /* Pebble Beach */
.cc-chip img[src$="gce.webp"],         /* Gold Coast */
.cc-chip img[src$="marine-walk.webp"] {/* Marine Walk */
  max-height: 76px; max-width: 92%;
}
.cc-underway { list-style: none; margin: 0; padding: 0; }
.cc-underway li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 18px 0; border-bottom: 1px solid rgba(239,239,239,.16);
  font-family: var(--font-body); font-size: 17px; color: var(--ripple);
}
.cc-underway li:first-child { border-top: 1px solid rgba(239,239,239,.16); }
.cc-underway .cc-year { font-family: var(--font-display); color: var(--alive); font-size: 16px; white-space: nowrap; }

/* ---------- CTA ---------- */
.cc-cta { padding: 88px 0; background: var(--ripple); text-align: center; }
.cc-cta h2 { font-family: var(--font-display); font-weight: 300; font-size: 38px; color: var(--black); margin: 0 0 30px; }
.cc-cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- ROUNDED SECTION OVERLAPS ----------
   Echoes the home page: each section has a rounded top and is pulled up a
   touch over the previous one, so the previous section's colour shows in the
   corner notches (banner→pillars, landscape→stats, phased→landscape,
   cta→phased, footer→cta). Scoped to this page's stylesheet, so the shared
   footer's home-page styling is untouched. */
.cc-banner,
.cc-landscape,
.cc-phased,
.cc-cta,
.sec-footer {
  position: relative; z-index: 1;
  border-radius: 18px 18px 0 0;
  margin-top: -28px;
}
.cc-banner,
.sec-footer { overflow: hidden; }   /* clip the image bg to the rounded top */
/* Green belt section keeps its overlap but with square top corners. */
.cc-landscape { border-radius: 0; }

/* Respect reduced-motion: hold the banners still. */
@media (prefers-reduced-motion: reduce) {
  .cc-marquee-up .cc-marquee-track,
  .cc-marquee-down .cc-marquee-track { animation: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  /* Phased: stack the section head over the logos, drop the marquee for a
     simple grid (duplicate chips hidden). */
  .cc-phased-top { display: block; }
  .cc-phased-top .cc-section-head { margin-bottom: 40px; }
  .cc-marquee {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    height: auto; overflow: visible;
    -webkit-mask-image: none; mask-image: none;
  }
  .cc-marquee-col { display: contents; }
  .cc-marquee-track { display: contents; animation: none !important; transform: none !important; }
  .cc-marquee-track .cc-chip[aria-hidden] { display: none; }
  .cc-chip { height: auto; min-height: 96px; margin-bottom: 0; }
  .cc-pillars-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Collage becomes a vertical image accordion: collapsed panels show a
     thin strip; the open panel expands. Tap to switch (wired in main.js). */
  .cc-explore-head { grid-template-columns: 1fr; gap: 18px; }
  .cc-explore-collage {
    position: static; height: auto; display: flex; flex-direction: column;
    gap: 10px; margin-top: 28px;
  }
  .cc-explore-collage > div {
    position: static; width: 100% !important; height: 70px !important;
    border-radius: 14px; cursor: pointer;
    transition: height .45s cubic-bezier(.22,1,.36,1);
  }
  .cc-explore-collage > div.acc-open { height: 300px !important; }
  .cc-explore-collage > div:focus-visible { outline: 2px solid var(--alive); outline-offset: 3px; }
  .cc-explore-collage img { object-position: center; }
  .cc-explore-ring { display: none; }
  .cc-banner img { height: 340px; }
}
@media (max-width: 640px) {
  .cc-wrap { padding: 0 24px; }
  .cc-banner img { height: 220px; }
  .cc-hero { min-height: 720px; padding: 130px 0 64px; }
  .cc-hero h1 { font-size: 40px; }
  .cc-pillars, .cc-landscape, .cc-phased { padding: 64px 0; }
  .cc-explore-title { font-size: 32px; }
  .cc-marquee { grid-template-columns: repeat(2, 1fr); }
}
