/* =====================================================================
   MSSST Homepage — Master of Social Science in Sustainable Tourism
   Department of Geography and Resource Management, CUHK

   Palette sampled from the MSSST 20th Anniversary logo
   (blue / green / white) with supporting neutrals.
   ===================================================================== */

:root {
  /* Brand (from logo) */
  --teal:        #1FA99B;   /* "20" numeral teal          */
  --teal-deep:   #0F766C;
  --teal-ink:    #0B3F3C;
  --cyan:        #2BC7D6;   /* emblem ring blue/cyan      */
  --mint:        #48CCB4;
  --green:       #7AC77A;   /* leaf / emblem green        */
  --green-soft:  #A9DFA6;
  --green-deep:  #4FA86B;
  --sun:         #E6E68A;   /* emblem hills yellow-green  */
  --slate:       #4A6B7C;   /* logo wordmark grey-blue    */

  /* Neutrals */
  --ink:         #16302F;
  --body:        #3C5553;
  --muted:       #6F8A88;
  --line:        #DCE9E6;
  --paper:       #F6FAF8;
  --paper-2:     #EEF6F3;
  --white:       #FFFFFF;

  /* Gradients */
  --grad-brand:  linear-gradient(120deg, var(--cyan) 0%, var(--teal) 48%, var(--green) 100%);
  --grad-deep:   linear-gradient(135deg, #0E6F77 0%, var(--teal-deep) 45%, #3E8E5B 100%);

  /* Type */
  --font-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 22px;
  --shadow-sm: 0 6px 18px rgba(11, 63, 60, .08);
  --shadow-md: 0 18px 44px rgba(11, 63, 60, .14);
  --shadow-lg: 0 30px 70px rgba(11, 63, 60, .20);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 92px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: clamp(72px, 9vw, 128px); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 16px; background: var(--teal-ink); color: #fff; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Shared components ---------- */
.section-label {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-head); font-weight: 700; font-size: 12.5px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--teal);
  margin: 0 0 14px;
}
.section-label::before { content: ""; width: 42px; height: 2px; background: var(--grad-brand); border-radius: 2px; }
.section-label--center { justify-content: center; }
.section-label--center::after { content: ""; width: 42px; height: 2px; background: var(--grad-brand); border-radius: 2px; }
.section-label--light { color: #CFF4EC; }
.section-label--light::before, .section-label--light::after { background: rgba(255,255,255,.7); }

.section-title {
  font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; letter-spacing: -.01em;
}
.section-title em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title--light { color: #fff; }

.section-head {
  display: grid; grid-template-columns: 1.3fr .9fr; gap: 36px; align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head__note { color: var(--muted); margin: 0; font-size: 16.5px; }
.section-head--center { grid-template-columns: 1fr; text-align: center; max-width: 720px; margin-inline: auto; }
.section-head--center .section-head__note { margin-top: 14px; }

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease), background .35s var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { color: #fff; background: var(--grad-brand); box-shadow: 0 12px 28px rgba(31,169,155,.35); }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, var(--green) 0%, var(--teal) 50%, var(--cyan) 100%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(31,169,155,.42); }
.btn--primary:hover::after { opacity: 1; }
.btn--ghost { color: var(--teal-ink); background: rgba(255,255,255,.65); border: 1.5px solid rgba(15,118,108,.35); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: #fff; border-color: var(--teal); color: var(--teal-deep); transform: translateY(-3px); }
.btn--light { color: var(--teal-deep); background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.btn--light:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0,0,0,.24); }
.btn--light:hover svg { transform: translateY(3px); }
.btn--ghost-light { color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.btn--ghost-light:hover { background: rgba(255,255,255,.14); border-color: #fff; transform: translateY(-3px); }
.btn--small { padding: 11px 20px; font-size: 14px; color: #fff; background: var(--teal); }
.btn--small:hover { background: var(--teal-deep); transform: translateY(-2px); }

.link-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--teal-deep);
  padding: 6px 0; position: relative;
}
.link-btn::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad-brand); transform: scaleX(.35); transform-origin: left; transition: transform .4s var(--ease); }
.link-btn:hover::after { transform: scaleX(1); }
.link-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.link-btn--alt { color: var(--slate); }
.link-btn--alt:hover svg { transform: translateX(4px); }

/* Wave dividers */
.wave { position: absolute; left: 0; width: 100%; height: clamp(40px, 6vw, 90px); fill: var(--paper); pointer-events: none; }
.wave--hero { bottom: -1px; }
.wave--explore { bottom: -1px; z-index: 1; fill: var(--paper-2); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; }

.social-mini { display: flex; gap: 6px; }
.social-mini li { position: relative; }
.social-mini a {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.1); transition: background .3s, transform .3s var(--ease);
}
.social-mini svg { width: 15px; height: 15px; fill: currentColor; }
.social-mini a:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }

/* WeChat QR popover (hover/focus) */
.qr-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 50;
  width: 150px; padding: 10px; background: #fff; color: var(--ink); text-align: center;
  border-radius: 12px; box-shadow: var(--shadow-md); font-size: 12px; font-weight: 500;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.96); transform-origin: top right;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
}
.qr-pop::before { content: ""; position: absolute; top: -7px; right: 10px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.qr-pop img { width: 100%; border-radius: 6px; margin-bottom: 6px; }
.has-qr:hover .qr-pop, .has-qr:focus-within .qr-pop { opacity: 1; visibility: visible; transform: translateY(0) scale(1); transition-delay: 0s; }
.has-qr--up .qr-pop { top: auto; bottom: calc(100% + 10px); right: auto; left: 0; transform-origin: bottom left; }
.has-qr--up .qr-pop::before { top: auto; bottom: -7px; right: auto; left: 10px; }

/* The blur lives on a pseudo-element: a backdrop-filter on .main-bar itself would
   become the containing block of the position:fixed mobile menu panel. */
.main-bar {
  position: relative; isolation: isolate; z-index: 2; /* above the mobile-menu backdrop (.site-header::after) */
  border-bottom: 1px solid rgba(220,233,230,.8);
  transition: box-shadow .35s var(--ease);
}
.main-bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.main-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); transition: height .35s var(--ease); }
/* Logo is 747×163 (ratio 4.583). Both dimensions are set explicitly so nothing
   (flex shrinking, max-width, inline sizing) can distort it. */
.brand { flex: 0 0 auto; display: block; line-height: 0; }
.brand img { display: block; width: 238px; height: 52px; max-width: none; object-fit: contain; transition: width .35s var(--ease), height .35s var(--ease); }

.nav ul { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative; display: inline-block; padding: 10px 11px; white-space: nowrap;
  font-family: var(--font-head); font-weight: 600; font-size: 13.5px; letter-spacing: .01em; color: var(--ink);
  transition: color .3s;
}
.nav a::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 5px; height: 2px;
  background: var(--grad-brand); border-radius: 2px;
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--teal-deep); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; background: var(--paper-2); place-items: center; align-content: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 2.5px auto; border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }

/* Scrolled state */
.site-header.is-scrolled .main-bar { box-shadow: 0 10px 30px rgba(11,63,60,.08); }
.site-header.is-scrolled .main-bar__inner { height: 72px; }
.site-header.is-scrolled .brand img { width: 192px; height: 42px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(60px, 7vw, 100px) clamp(170px, 18vw, 240px);
  background: #fff; overflow: hidden;
}
.hero__slides { position: absolute; inset: 0; z-index: -2; background: #FBFCFB; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__video { width: 100%; height: 100%; object-fit: cover; object-position: center right; transform: scale(1.02); }
.hero__slide.is-active .hero__video { animation: heroZoom 14s linear both; }
@keyframes heroZoom { from { transform: scale(1.02); } to { transform: scale(1.09); } }

/* Pencil-paper fallback (shown behind video while loading / if blocked) */
.hero__slide::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 500px at 85% 40%, rgba(43,199,214,.12), transparent 60%),
    radial-gradient(900px 500px at 70% 90%, rgba(122,199,122,.14), transparent 60%),
    #FBFCFB;
}

/* Colour wash: keeps the left readable and tints the sketches with brand colour */
.hero__wash {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(246,250,248,.98) 0%, rgba(246,250,248,.94) 32%, rgba(246,250,248,.55) 52%, rgba(246,250,248,0) 70%),
    linear-gradient(180deg, rgba(246,250,248,0) 60%, rgba(246,250,248,.75) 100%),
    linear-gradient(135deg, rgba(43,199,214,.18) 0%, rgba(31,169,155,.06) 40%, rgba(122,199,122,.18) 100%);
}


.hero__content { position: relative; }
.hero__text { max-width: 640px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--slate);
  margin-bottom: 22px;
  animation: fadeUp .9s var(--ease) both;
}
.hero__eyebrow .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--grad-brand); box-shadow: 0 0 0 5px rgba(31,169,155,.15); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(31,169,155,.18);} 50% { box-shadow: 0 0 0 9px rgba(31,169,155,.05);} }

.hero__title { font-size: clamp(38px, 5.6vw, 68px); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; margin-bottom: 24px; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line:first-child { font-size: .5em; font-weight: 600; color: var(--slate); letter-spacing: .02em; margin-bottom: 8px; animation: fadeUp .9s var(--ease) .1s both; }
.hero__title .line--accent {
  background: var(--grad-brand); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .08em;
  animation: fadeUp .9s var(--ease) .2s both, shimmer 7s linear 1.2s infinite;
}
@keyframes shimmer { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.hero__intro { font-size: clamp(16.5px, 1.4vw, 19px); max-width: 560px; color: var(--body); margin-bottom: 32px; animation: fadeUp .9s var(--ease) .3s both; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; animation: fadeUp .9s var(--ease) .4s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }


/* Hero controls: label-less progress pills + pause, in one frosted capsule */
.hero__controls {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: clamp(70px, 9vw, 110px); z-index: 3;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.85); box-shadow: var(--shadow-sm);
}
.hero__dots { display: flex; align-items: center; gap: 8px; }
.hero__dot {
  position: relative; display: block; width: 22px; height: 6px; border-radius: 3px;
  background: rgba(11,63,60,.16); overflow: hidden;
  transition: width .45s var(--ease), background .3s;
}
.hero__dot::before { content: ""; position: absolute; inset: -12px -4px; } /* larger tap target */
.hero__dot span.bar { position: absolute; inset: 0; display: block; }
.hero__dot span.bar i { display: block; height: 100%; width: 100%; background: var(--grad-brand); transform: scaleX(0); transform-origin: left; }
.hero__dot:hover { background: rgba(11,63,60,.3); }
.hero__dot.is-active { width: 64px; }
.hero__dot.is-active span.bar i { animation: progress var(--slide-ms, 9000ms) linear forwards; }
.hero.is-paused .hero__dot.is-active span.bar i { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.hero__pause { width: 32px; height: 32px; border-radius: 50%; background: rgba(31,169,155,.1); display: grid; place-items: center; transition: transform .3s var(--ease), background .3s; }
.hero__pause svg { width: 13px; height: 13px; fill: none; stroke: var(--teal-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero__pause .ic-play { display: none; fill: var(--teal-ink); }
.hero.is-paused .hero__pause .ic-play { display: block; }
.hero.is-paused .hero__pause .ic-pause { display: none; }
.hero__pause:hover { transform: scale(1.08); background: rgba(31,169,155,.2); }



/* ---------- Welcome ---------- */
.welcome { position: relative; background: var(--paper); overflow: hidden; }
.welcome::before {
  content: ""; position: absolute; left: -140px; top: 10%; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(43,199,214,.16), transparent 65%); pointer-events: none;
}
.welcome__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }

.blob-frame { position: relative; width: min(100%, 440px); aspect-ratio: 1; margin-inline: auto; }
.blob { position: absolute; inset: 0; }
.blob--back {
  background: var(--grad-brand); opacity: .9;
  border-radius: 56% 44% 61% 39% / 44% 55% 45% 56%;
  transform: translate(22px, 18px) rotate(8deg);
  animation: morph 12s ease-in-out infinite;
}
.blob--photo {
  overflow: hidden; background: linear-gradient(180deg, #E7F5F1 0%, #CFEAE3 100%);
  border-radius: 61% 39% 54% 46% / 52% 47% 53% 48%;
  box-shadow: var(--shadow-lg);
  animation: morph 12s ease-in-out -4s infinite;
}
.blob--photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transform: scale(1.02); transition: transform .8s var(--ease); }
.blob-frame:hover .blob--photo img { transform: scale(1.06); }
@keyframes morph {
  0%,100% { border-radius: 61% 39% 54% 46% / 52% 47% 53% 48%; }
  33%     { border-radius: 45% 55% 40% 60% / 58% 42% 58% 42%; }
  66%     { border-radius: 55% 45% 60% 40% / 42% 60% 40% 58%; }
}
.leaf-deco { position: absolute; width: 84px; left: -6%; top: -4%; fill: none; stroke: var(--green-deep); stroke-width: 2; stroke-linecap: round; opacity: .9; transform: rotate(-20deg); }
.leaf-deco path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-visible .leaf-deco path { animation: draw 1.6s var(--ease) forwards; }
.is-visible .leaf-deco path:nth-child(2) { animation-delay: .6s; }
.is-visible .leaf-deco path:nth-child(3) { animation-delay: 1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.name-card {
  position: absolute; right: -4px; bottom: 14px; display: grid; gap: 2px;
  padding: 14px 20px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-md);
  border-left: 4px solid var(--teal);
  animation: float 7s ease-in-out -2s infinite;
}
.welcome__media { position: relative; }
.name-card strong { font-family: var(--font-head); font-size: 16px; color: var(--ink); }
.name-card span { font-size: 13px; color: var(--muted); letter-spacing: .04em; }

.welcome__text { position: relative; margin-top: 26px; }
.quote-mark { position: absolute; left: -14px; top: -58px; font-family: Georgia, serif; font-size: 140px; line-height: 1; color: rgba(31,169,155,.14); pointer-events: none; }
.welcome__text .lead { font-size: 20px; font-weight: 500; color: var(--ink); }
.welcome__text p { font-style: italic; font-weight: 300; }
.welcome__text .lead { font-style: normal; }
.welcome__more { overflow: hidden; }
.welcome__more[hidden] { display: none; }
.welcome__more.is-opening { animation: expand .6s var(--ease); }
@keyframes expand { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.welcome__footer { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin-top: 10px; }
#welcomeToggle .when-open { display: none; }
#welcomeToggle[aria-expanded="true"] .when-open { display: inline; }
#welcomeToggle[aria-expanded="true"] .when-closed { display: none; }
#welcomeToggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- Brochure ---------- */
.brochure { position: relative; overflow: hidden; background: var(--grad-deep); color: #D9F3EE; padding-block: clamp(72px, 9vw, 120px); }
/* Graphite pencil sketch of a sustainable-tourism landscape (hills, hikers, eco-lodges,
   wind turbines, hot-air balloon, junk boat) in the same hand-drawn style as the hero.
   scene-sketch.png holds only the pencil strokes (white, alpha = stroke darkness), so the
   drawing sits on the teal band like chalk/pencil on coloured paper. */
.brochure__scene {
  position: absolute; inset: 0; pointer-events: none;
  background: url("../images/scene-sketch.png") center 68% / cover no-repeat;
  opacity: .55;
  /* fade the drawing out under the copy on the left */
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.45) 38%, #000 62%);
          mask-image: linear-gradient(90deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.45) 38%, #000 62%);
  animation: sceneDrift 40s ease-in-out infinite alternate;
}
@keyframes sceneDrift { from { background-position: 48% 68%; } to { background-position: 52% 64%; } }
.brochure::after { content: ""; position: absolute; right: -200px; top: -200px; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(122,199,122,.35), transparent 65%); pointer-events: none; }
.brochure__grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.brochure__copy p { font-size: 17.5px; max-width: 540px; color: #D9F3EE; }
.brochure__copy .section-title { margin-bottom: 18px; }
.brochure__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.brochure__mock { position: relative; display: grid; place-items: center; padding: 30px 0; perspective: 1200px; }
/* A4 brochure: cover image rendered from page 1 of docs/MSSST-Programme-Brochure.pdf */
.book { position: relative; width: min(300px, 70%); aspect-ratio: 848 / 1200; transform-style: preserve-3d; transition: transform .6s var(--ease); }
.tilt .book { transform: rotateY(var(--ry, -14deg)) rotateX(var(--rx, 6deg)); }
/* single flat cover sheet (no book block behind it) */
.book__cover {
  position: absolute; inset: 0; overflow: hidden; border-radius: 6px; background: #fff;
  box-shadow: 0 40px 70px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.6);
}
.book__cover-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* soft paper sheen */
.book__cover::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.14) 100%); }
.brochure__hint { position: absolute; bottom: 0; font-family: var(--font-head); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.brochure__mock:hover .brochure__hint { color: #fff; }

/* ---------- Explore: the MSSST journey ---------- */
.explore { position: relative; overflow: hidden; background: var(--paper); }
.explore > .wrap { position: relative; z-index: 1; }

/* Calm background: two large, very soft colour washes in the brand tints.
   No pattern or line art, so the cards and text stay fully readable. */
.explore__glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(60px); animation: glowDrift 24s ease-in-out infinite alternate; }
.explore__glow--a { width: 720px; height: 720px; left: -260px; top: -200px; background: radial-gradient(circle, rgba(43,199,214,.16), rgba(43,199,214,0) 70%); }
.explore__glow--b { width: 820px; height: 820px; right: -300px; bottom: -260px; background: radial-gradient(circle, rgba(122,199,122,.16), rgba(122,199,122,0) 70%); animation-delay: -12s; }
@keyframes glowDrift { from { translate: 0 0; } to { translate: 40px 30px; } }

.journey { position: relative; padding-top: 40px; }
.journey__route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.journey__route-bg { fill: none; stroke: rgba(31,169,155,.35); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.journey__route-fg { fill: none; stroke: url(#routeGrad); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 4px 10px rgba(31,169,155,.25)); }

/* travelling map pin */
.journey__marker { position: absolute; left: 0; top: 0; width: 40px; height: 52px; z-index: 3; pointer-events: none; transform: translate(-50%, -100%); transition: transform .25s linear; will-change: transform; }
.journey__marker svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 14px rgba(11,63,60,.3)); animation: pinBob 1.6s ease-in-out infinite; }
.journey__marker .pin { fill: #fff; stroke: var(--teal-ink); stroke-width: 2.5; }
.journey__marker .pin-leaf { fill: none; stroke: var(--teal-deep); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pinBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* stops: 4 x 2 "board", second row runs right-to-left so the route snakes */
.journey__stops { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 72px 22px; counter-reset: stop; }
.stop:nth-child(5) { grid-row: 2; grid-column: 4; }
.stop:nth-child(6) { grid-row: 2; grid-column: 3; }
.stop:nth-child(7) { grid-row: 2; grid-column: 2; }
.stop:nth-child(8) { grid-row: 2; grid-column: 1; }

.stop__card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%;
  padding: 66px 22px 24px; margin-top: 56px; border-radius: 26px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease);
}
.stop__card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: linear-gradient(180deg, var(--tint) 0%, #fff 70%); opacity: 0; transition: opacity .5s var(--ease);
}
.stop__card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.stop__card:hover::before { opacity: 1; }

/* illustration badge (a map "stamp") */
.stop__badge {
  position: absolute; top: -56px; left: calc(50% - 56px);
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px dashed var(--accent); box-shadow: 0 10px 24px rgba(11,63,60,.12);
  transition: transform .6s var(--ease), background .5s var(--ease), border-style .3s;
}
.stop__badge::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--tint); transition: background .5s var(--ease); }
.stop__badge svg { position: relative; width: 60px; height: 60px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .5s; }
.stop__badge svg path, .stop__badge svg circle, .stop__badge svg rect { stroke-dasharray: 1; stroke-dashoffset: 0; }
.stop__badge b {
  position: absolute; right: -4px; bottom: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); box-shadow: 0 4px 10px rgba(11,63,60,.2);
}
.stop__card:hover .stop__badge { transform: rotate(-6deg) scale(1.06); border-style: solid; }
.stop__card:hover .stop__badge svg path, .stop__card:hover .stop__badge svg circle, .stop__card:hover .stop__badge svg rect { animation: redraw 1.3s var(--ease) forwards; }
@keyframes redraw { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

/* reached by the travelling pin → stamped */
.stop.is-reached .stop__badge { border-style: solid; }
.stop.is-reached .stop__badge::before { background: var(--accent); }
.stop.is-reached .stop__badge svg { stroke: #fff; }
.stop.is-reached .stop__badge b { background: var(--teal-ink); }

.stop__body { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.stop h3 { font-size: 19px; font-weight: 700; }
.stop p { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 0; }
.stop__cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-family: var(--font-head); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.stop__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.stop__card:hover .stop__cta svg { transform: translateX(5px); }

/* staggered entrance */
.stop { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.journey.is-visible .stop { opacity: 1; transform: none; }
.journey.is-visible .stop:nth-child(1) { transition-delay: .05s; } .journey.is-visible .stop:nth-child(2) { transition-delay: .15s; }
.journey.is-visible .stop:nth-child(3) { transition-delay: .25s; } .journey.is-visible .stop:nth-child(4) { transition-delay: .35s; }
.journey.is-visible .stop:nth-child(5) { transition-delay: .45s; } .journey.is-visible .stop:nth-child(6) { transition-delay: .55s; }
.journey.is-visible .stop:nth-child(7) { transition-delay: .65s; } .journey.is-visible .stop:nth-child(8) { transition-delay: .75s; }

.journey__end { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 96px; padding: 18px 26px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); width: fit-content; margin-inline: auto; }
.journey__end p { margin: 0; font-size: 16px; color: var(--body); }
.journey__end a { font-weight: 600; color: var(--teal-deep); text-decoration: underline; text-decoration-color: rgba(31,169,155,.4); text-underline-offset: 3px; }
.journey__end a:hover { text-decoration-color: var(--teal); }
.journey__flag { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); color: #fff; flex: none; }
.journey__flag svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Connect (flip cards) ---------- */
.connect { position: relative; background: var(--paper-2); }
.flip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1040px; margin-inline: auto; }
.flip { perspective: 1400px; height: 360px; outline-offset: 6px; border-radius: var(--radius); }
.flip__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s var(--ease); }
/* Flip on click / keyboard only (never on hover) so the follow link stays clickable */
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip:hover .flip__face { box-shadow: var(--shadow-lg); }
.flip__qr-hint {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; color: var(--teal-deep); background: var(--paper-2);
  transition: background .3s, color .3s, transform .4s var(--ease);
}
.flip__qr-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flip:hover .flip__qr-hint { background: var(--teal); color: #fff; transform: scale(1.08); }
.flip__back .flip__qr-hint { background: #fff; }
.flip__face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  padding: 30px 26px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-md);
}
.flip__front { background: linear-gradient(var(--teal), var(--teal)) top / 100% 5px no-repeat, #fff; }
.flip__back { transform: rotateY(180deg); background: linear-gradient(var(--green), var(--green)) top / 100% 5px no-repeat, linear-gradient(180deg, #fff, var(--paper-2)); }
.flip__back img { width: 170px; height: 170px; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; box-shadow: var(--shadow-sm); }
.flip__back span { font-family: var(--font-head); font-size: 13.5px; font-weight: 600; color: var(--teal-deep); }
.flip__icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: #fff; margin-bottom: 6px; box-shadow: var(--shadow-sm); transition: transform .5s var(--ease); }
.flip__icon svg { width: 36px; height: 36px; fill: currentColor; }
.flip__icon--fb { background: #1877F2; }
.flip__icon--ig { background: linear-gradient(45deg, #F9CE34, #EE2A7B 55%, #6228D7); }
.flip__icon--wc { background: #07C160; }
.flip:hover .flip__icon { transform: scale(1.08) rotate(-6deg); }
.flip h3 { font-size: 20px; }
.flip p { color: var(--muted); font-size: 14px; margin: 0 0 8px; word-break: break-all; }
.flip { cursor: pointer; }
.flip a { cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--teal-ink); color: #B9D8D2; padding-top: clamp(60px, 7vw, 90px); }
.site-footer__scene {
  position: absolute; inset: 0; pointer-events: none;
  background: url("../images/scene-sketch.png") center 60% / cover no-repeat;
  opacity: .26;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, #000 55%, #000 100%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, #000 55%, #000 100%);
}
.footer__grid { position: relative; display: grid; grid-template-columns: 1.4fr .8fr .8fr 1.1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__logo { width: 300px; max-width: 100%; height: auto; background: #fff; padding: 12px 16px; border-radius: 12px; margin-bottom: 22px; }
.footer__brand p { font-size: 14.5px; line-height: 1.7; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 18px; }
.footer__links li + li { margin-top: 10px; }
.footer__links a { position: relative; font-size: 15px; transition: color .3s; }
.footer__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.footer__links a:hover { color: #fff; }
.footer__links a:hover::after { transform: scaleX(1); }
.footer__details { margin: 0; display: grid; gap: 8px; }
.footer__details div { display: grid; grid-template-columns: 52px 1fr; align-items: baseline; gap: 10px; }
.footer__details dt { font-family: var(--font-head); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--green-soft); }
.footer__details dd { margin: 0; font-size: 15.5px; color: #fff; }
.footer__details a { color: #fff; transition: color .3s; }
.footer__details a:hover { color: var(--green-soft); }
.footer__parents { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.footer__parents a { display: grid; place-items: center; background: #fff; border-radius: 10px; padding: 8px; transition: transform .3s var(--ease); }
.footer__parents a:hover { transform: translateY(-3px); }
.footer__parents img { height: 44px; width: auto; }
.footer__grm img { height: 44px; }
.footer__bottom { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; font-size: 13px; }
.footer__bottom p { margin: 0; }
.footer__bottom ul { display: flex; gap: 22px; }
.footer__bottom a:hover { color: #fff; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 50px; height: 50px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.to-top:hover svg { transform: translateY(-3px); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
.reveal[data-reveal="up"] { transform: translateY(32px); }
.reveal[data-reveal="left"] { transform: translateX(-36px); }
.reveal[data-reveal="right"] { transform: translateX(36px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
  .nav a { padding: 10px 8px; font-size: 13px; }
}

/* Journey: 2-column snake on tablets (1-2 / 4-3 / 5-6 / 8-7) */
@media (max-width: 1100px) {
  .journey__stops { grid-template-columns: repeat(2, 1fr); gap: 64px 40px; }
  .stop:nth-child(1) { grid-row: 1; grid-column: 1; } .stop:nth-child(2) { grid-row: 1; grid-column: 2; }
  .stop:nth-child(3) { grid-row: 2; grid-column: 2; } .stop:nth-child(4) { grid-row: 2; grid-column: 1; }
  .stop:nth-child(5) { grid-row: 3; grid-column: 1; } .stop:nth-child(6) { grid-row: 3; grid-column: 2; }
  .stop:nth-child(7) { grid-row: 4; grid-column: 2; } .stop:nth-child(8) { grid-row: 4; grid-column: 1; }
}

/* Nine menu items need ~1000px: switch to the off-canvas menu early */
@media (max-width: 1220px) {
  :root { --header-h: 80px; }
  .nav-toggle { display: grid; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(360px, 86vw); z-index: 120;
    background: #fff; padding: 100px 28px 40px; box-shadow: var(--shadow-lg);
    transform: translateX(105%); visibility: hidden;
    transition: transform .5s var(--ease), visibility 0s .5s;
  }
  .nav.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav a { display: block; padding: 14px 6px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav-toggle { position: relative; z-index: 130; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* dimmed page behind the open panel */
  .site-header::after {
    content: ""; position: fixed; inset: 0; z-index: 1; background: rgba(11,63,60,.45);
    opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s;
  }
  .site-header.nav-open::after { opacity: 1; visibility: visible; transition-delay: 0s; }
}

@media (max-width: 960px) {
  :root { --header-h: 76px; }
  .brand img, .site-header.is-scrolled .brand img { width: 183px; height: 40px; }

  .hero { padding: 48px 0 190px; min-height: 0; }
  .hero__eyebrow { font-size: 11px; margin-bottom: 14px; }
  .hero__title { margin-top: 6px; }
  .hero__video { object-position: 60% center; }
  .hero__wash { background: linear-gradient(180deg, rgba(246,250,248,.96) 0%, rgba(246,250,248,.86) 55%, rgba(246,250,248,.6) 100%), linear-gradient(135deg, rgba(43,199,214,.18), rgba(122,199,122,.18)); }
  .hero__controls { bottom: 70px; }
  .hero__dot.is-active { width: 48px; }

  .welcome__grid, .brochure__grid { grid-template-columns: 1fr; }
  .welcome__media { width: 100%; max-width: 420px; margin-inline: auto; }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .flip-grid { grid-template-columns: 1fr; max-width: 420px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  /* Journey: single column, badge on the left, route runs down the left edge */
  .journey__stops { grid-template-columns: 1fr; gap: 22px; padding-left: 26px; }
  .stop:nth-child(n) { grid-row: auto; grid-column: 1; }
  .stop__card { flex-direction: row; align-items: center; text-align: left; margin-top: 0; padding: 18px 18px 18px 72px; min-height: 120px; }
  .stop__badge { top: calc(50% - 42px); left: -26px; width: 84px; height: 84px; }
  .stop__badge svg { width: 44px; height: 44px; }
  .stop__badge b { width: 26px; height: 26px; font-size: 10px; right: -2px; bottom: 2px; }
  .stop__body { align-items: flex-start; gap: 4px; }
  .stop h3 { font-size: 17px; }
  .stop p { font-size: 13.5px; }
  .journey__marker { width: 32px; height: 42px; }
  .journey__end { border-radius: 22px; text-align: center; flex-direction: column; gap: 10px; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .footer__logo { width: 240px; }
  .hero__title { font-size: 36px; }
  .quote-mark { display: none; }
  .name-card { right: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
