/* ==========================================================================
   WBPMR — IAPMR West Bengal Branch
   core.css — design tokens, base, typography, buttons, header, footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   Palette derives from the official seal: brick terracotta #A25641 and aqua
   #56C5D0. The deep teal below is that aqua taken down in value — it gives the
   site weight without going black, and stays inside the logo's own family.
   -------------------------------------------------------------------------- */
:root {
  /* Deep — the dark end of the scale, built around the client's #015f6b.
     Top bar, banner overlay, Why Join Us, stats band, CTA and footer use these. */
  --deep: #015f6b;             /* client brand teal */
  --deep-2: #01454e;           /* footer / gradient mid */
  --deep-3: #013138;           /* deepest, gradient end */
  --deep-4: #037e8d;           /* lighter teal for gradient highlights */
  --deep-line: rgba(255, 255, 255, 0.16);
  --on-deep: #f2fbfc;
  --on-deep-soft: #b9d7dd;
  --on-deep-bright: #d3eaee;   /* text over the lighter end of gradients */

  /* Brand */
  --brand: #a25641;
  --brand-deep: #7e3f2e;
  --brand-light: #c47a63;
  --brand-tint: #f7efec;
  --brand-line: #e6d2cb;

  --aqua: #56c5d0;
  --aqua-bright: #8fe0e8;      /* aqua lifted for small text on deep surfaces */
  --aqua-deep: #24737e;
  --aqua-tint: #eaf7f9;
  --aqua-line: #cfe8ec;

  /* Light surfaces */
  --paper: #ffffff;
  --paper-cool: #f2f8fa;
  --paper-warm: #fbf5f2;
  --line: #dfeaed;
  --line-soft: #ecf3f5;

  /* Ink */
  --ink: #16333c;
  --ink-mid: #40575f;
  --ink-soft: #6a828a;

  /* Type */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --step-xs: 0.78rem;
  --step-sm: 0.9rem;
  --step-md: 1rem;
  --step-lg: clamp(1.1rem, 0.9rem + 0.6vw, 1.3rem);
  --h3: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
  --h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.85rem);
  --h1: clamp(2rem, 1.1rem + 3.4vw, 3.85rem);

  /* Rhythm */
  --section-y: clamp(58px, 6vw, 104px);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 10px rgba(15, 71, 83, 0.07);
  --shadow: 0 10px 30px rgba(15, 71, 83, 0.1);
  --shadow-lg: 0 20px 50px rgba(15, 71, 83, 0.14);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Letter-spacing optical correction. Centred text with wide tracking sits
     left of true centre because the last letter carries trailing space. */
  --track-wide: 0.3em;
  --track-mid: 0.15em;
}

/* --------------------------------------------------------------------------
   2. 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: var(--step-md);
  line-height: 1.72;
  color: var(--ink-mid);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--brand-deep); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1.05rem; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--aqua-tint); color: var(--brand-deep); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 2000;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--step-sm);
  font-weight: 600;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 16px; color: #fff; }

/* --------------------------------------------------------------------------
   3. LAYOUT HELPERS
   -------------------------------------------------------------------------- */
.section { padding: 60px 0; position: relative; }
.section--cool { background: var(--paper-cool); }
.section--warm { background: var(--paper-warm); }

.shell { width: min(1240px, 100% - 40px); margin-inline: auto; }

.sec-head { max-width: 760px; margin-bottom: clamp(34px, 4vw, 56px); }
.sec-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--step-xs);
  font-weight: 700;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
.eyebrow::before,
.eyebrow::after { content: ""; width: 26px; height: 1px; background: var(--brand-line); }
.sec-head:not(.sec-head--center) .eyebrow::after { display: none; }

.sec-title { font-size: var(--h2); margin-bottom: 14px; }
.sec-title em { font-style: normal; color: var(--brand); }

.sec-lede { font-size: var(--step-lg); color: var(--ink-soft); margin-bottom: 0; }

/* The same section head, set on a deep background */
.sec-head--on-deep .sec-title { color: var(--on-deep); }
.sec-head--on-deep .sec-title em { color: var(--aqua-bright); }
.sec-head--on-deep .sec-lede { color: var(--on-deep-soft); }
.sec-head--on-deep .eyebrow { color: var(--aqua-bright); }
.sec-head--on-deep .eyebrow::before,
.sec-head--on-deep .eyebrow::after { background: var(--deep-line); }

/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */
.btn-wb,
.btn-wb-ghost,
.btn-wb-line {
  --btn-py: 13px;
  --btn-px: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--btn-py) var(--btn-px);
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: var(--step-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
    background-color 0.28s var(--ease), color 0.28s var(--ease), border-color 0.28s var(--ease);
}
.btn-wb i, .btn-wb-ghost i, .btn-wb-line i { font-size: 1.05em; transition: transform 0.28s var(--ease); }
.btn-wb:hover i, .btn-wb-ghost:hover i, .btn-wb-line:hover i { transform: translateX(3px); }

.btn-wb {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(162, 86, 65, 0.28);
}
.btn-wb:hover {
  background: var(--brand-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(126, 63, 46, 0.36);
}

.btn-wb-ghost {
  background: var(--paper);
  color: var(--brand);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-sm);
}
.btn-wb-ghost:hover {
  color: var(--brand-deep);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Outline button, for use on deep backgrounds */
.btn-wb-line {
  background: transparent;
  color: var(--on-deep);
  border-color: var(--deep-line);
}
.btn-wb-line:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.btn-sm { --btn-py: 10px; --btn-px: 22px; font-size: var(--step-xs); }

/* --------------------------------------------------------------------------
   5. TOP BAR — deep teal. Official mail left, social right.
   -------------------------------------------------------------------------- */
.topbar { background: var(--deep); color: var(--on-deep-soft); font-size: var(--step-xs); }
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}
.topbar__mail { display: inline-flex; align-items: center; gap: 9px; color: var(--on-deep); font-weight: 600; }
.topbar__mail i { color: var(--aqua); font-size: 1rem; }
.topbar__mail:hover { color: var(--aqua); }

.social { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.social a {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--deep-line);
  color: var(--on-deep);
  font-size: 0.85rem;
  transition: all 0.25s var(--ease);
}
.social a:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   6. HEADER / NAV
   The logo is placed exactly as supplied — no wordmark, lockup or recolouring.
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow); background: #fff; }
.site-header .navbar { padding: 0; }

.brand { display: inline-flex; align-items: center; padding-block: 9px; }
.brand img { width: auto; height: 68px; transition: transform 0.4s var(--ease); }
.brand:hover img { transform: scale(1.04); }

.nav-toggle {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--brand);
  font-size: 1.35rem;
  line-height: 1;
}
.nav-toggle:focus { box-shadow: none; }

.main-nav { gap: 1px; align-items: center; /*margin-left: 100px !important;*/}
.main-nav .nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  padding: 12px 13px !important;
  border-radius: 8px;
  position: relative;
  transition: color 0.25s var(--ease);
}
.main-nav .nav-link:hover,
.main-nav .nav-item.active > .nav-link,
.main-nav .nav-link.show { color: var(--brand); }

.main-nav > .nav-item > .nav-link::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav > .nav-item > .nav-link:hover::after,
.main-nav > .nav-item.active > .nav-link::after { transform: scaleX(1); }

.main-nav .dropdown-toggle::after {
  border: 0;
  content: "\F282";
  font-family: "bootstrap-icons";
  font-size: 0.68em;
  vertical-align: 1px;
  margin-left: 5px;
  transition: transform 0.25s var(--ease);
}
.main-nav .nav-item.show .dropdown-toggle::after { transform: rotate(-180deg); }

.main-nav .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  margin-top: 6px;
  min-width: 244px;
  background: var(--paper);
}
.main-nav .dropdown-item {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-mid);
}
.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus { background: var(--aqua-tint); color: var(--brand); }

/* --------------------------------------------------------------------------
   7. PAGE HERO — inner pages
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--deep);
  padding-block: clamp(56px, 7vw, 96px);
  text-align: center;
  color: var(--on-deep);
}
.page-hero__bg { position: absolute; inset: 0; z-index: -2; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Light enough that the photograph reads clearly, dark enough to hold the
     title. Breadcrumbs get their own pill below, which is what allows this
     wash to stay this light. */
  background:
    radial-gradient(ellipse 48% 160% at 50% 50%,
      rgba(1, 69, 78, 0.68) 0%,
      rgba(1, 69, 78, 0.58) 52%,
      rgba(1, 95, 107, 0.14) 100%);
}
.page-hero__title {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.5rem);
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 2px 18px rgba(1, 49, 56, 0.5);
}
.page-hero__title em { font-style: normal; color: var(--aqua-bright); }

.crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 20px;
  border-radius: 999px;
  background: rgba(1, 49, 56, 0.55);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  list-style: none;
  font-size: var(--step-sm);
  color: var(--on-deep-bright);
}
.crumbs a { color: #fff; }
.crumbs a:hover { color: var(--aqua-bright); }
.crumbs li + li::before { content: "\F285"; font-family: "bootstrap-icons"; margin-right: 10px; opacity: 0.5; }

/* --------------------------------------------------------------------------
   8. FOOTER — deep teal
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 8% 0%, rgba(3, 126, 141, 0.5) 0%, transparent 62%),
    linear-gradient(160deg, var(--deep-2) 0%, var(--deep-3) 68%, #01262c 100%);
  border-top: 4px solid var(--brand);
  padding-top: clamp(52px, 5vw, 80px);
  color: var(--on-deep-soft);
}
/* the seal, blown up as a quiet watermark */
.site-footer::before,
.site-footer::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.site-footer::before {
  width: 520px;
  height: 520px;
  right: -160px;
  top: -200px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 52px rgba(255, 255, 255, 0.035);
}
.site-footer::after {
  width: 300px;
  height: 300px;
  left: -130px;
  bottom: -120px;
  border: 1px solid rgba(196, 122, 99, 0.28);
  box-shadow: 0 0 0 34px rgba(162, 86, 65, 0.1);
}
.footer__brand { margin-bottom: 20px; }
.footer__brand img { height: 84px; width: auto; background: #fff; border-radius: 50%; padding: 3px; }
.footer__about { font-size: var(--step-sm); max-width: 340px; }

.footer__title {
  font-family: var(--font-body);
  font-size: var(--step-xs);
  font-weight: 800;
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--deep-line);
}
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li + li { margin-top: 11px; }
.footer__list a {
  color: var(--on-deep-soft);
  font-size: var(--step-sm);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: color 0.22s var(--ease), transform 0.22s var(--ease);
}
.footer__list a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--aqua);
  flex: none;
  transition: background-color 0.22s var(--ease);
}
.footer__list a:hover { color: #fff; transform: translateX(4px); }
.footer__list a:hover::before { background: var(--brand-light); }

.footer__contact { list-style: none; margin: 0; padding: 0; font-size: var(--step-sm); }
.footer__contact li { display: flex; gap: 12px; margin-bottom: 15px; }
.footer__contact i { color: var(--aqua); font-size: 1.05rem; margin-top: 3px; }
.footer__contact a { color: var(--on-deep-soft); word-break: break-word; }
.footer__contact a:hover { color: #fff; }

.footer__bar {
  margin-top: clamp(34px, 4vw, 52px);
  border-top: 1px solid var(--deep-line);
  padding-block: 22px;
  position: relative;
  font-size: var(--step-xs);
  color: var(--on-deep-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
}
.footer__bar a { color: #fff; font-weight: 600; }
.footer__bar a:hover { color: var(--aqua-bright); }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1040;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 10px 24px rgba(126, 63, 46, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.32s var(--ease);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-deep); transform: translateY(-3px); }

/* --------------------------------------------------------------------------
   9. REVEAL + MOTION
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none;   }

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