/* =========================================================
   VIPANAN+  —  Calcutta Business School digital newsletter
   Flipbook-style reader, themed in CBS navy / brick / gold
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&family=Lora:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');

:root{
  /* ---- design tokens ---- */
  --navy:        #0b4a8e;   /* primary brand navy, sampled from the cover  */
  --navy-deep:   #062745;   /* backdrop / footer                           */
  --navy-mid:    #1d3f6e;   /* tab bar / secondary surfaces                */
  --brick:       #7c4b44;   /* headline accent, sampled from article heads*/
  --gold:        #c9a227;   /* signature accent: active states, progress  */
  --paper:       #fdfcf9;   /* page sheet colour                          */
  --ink:         #1c2430;   /* body text on light surfaces                */
  --ink-soft:    #5b6472;   /* secondary text                             */
  --line:        rgba(255,255,255,.16);

  --display: 'Playfair Display', 'Georgia', serif;
  --serif:   'Lora', Georgia, serif;
  --sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 14px;
  --shadow-page: 0 18px 50px -12px rgba(2,12,28,.55), 0 4px 14px rgba(2,12,28,.25);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: var(--sans);
  color: var(--ink);
  background: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
button{ font-family: inherit; cursor:pointer; }
a{ color: inherit; }

.skip-link{
  position:absolute; left:-9999px;
}
.skip-link:focus{
  left:8px; top:8px; z-index:999;
  background:var(--gold); color:#1c2430; padding:8px 14px; border-radius:8px;
}

/* visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* =========================== HEADER =========================== */
.masthead{
  background: linear-gradient(180deg, var(--navy) 0%, #0a3f7a 100%);
  color:#fff;
  padding: 16px clamp(16px, 4vw, 48px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}
.masthead__brand{
  display:flex;
  align-items:center;
  gap:14px;
}
.masthead__crest{
  width:54px; height:54px;
  border-radius:50%;
  background:#fff;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  flex:none;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.masthead__crest img{
  width:88%; height:88%; object-fit:cover; border-radius:50%;
}
.masthead__wordmark{
  font-family: var(--display);
  font-weight:700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .02em;
  line-height:1;
}
.masthead__wordmark span{ color: var(--gold); }
.masthead__tagline{
  font-family: var(--serif);
  font-style:italic;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  margin-top:4px;
}
.masthead__meta{
  text-align:right;
  font-family: var(--sans);
}
.masthead__meta .vol{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: var(--gold);
  font-weight:600;
}
.masthead__meta .theme{
  font-family: var(--display);
  font-style:italic;
  font-size:15px;
  color:#fff;
  max-width: 320px;
}

/* torn-paper divider — echoes the cover art's torn sky/navy edge */
.torn-divider{
  height: 26px;
  background: var(--navy);
  clip-path: polygon(
    0% 0%, 4% 100%, 9% 10%, 14% 95%, 19% 5%, 24% 100%, 29% 12%, 34% 92%,
    39% 8%, 44% 100%, 49% 14%, 54% 90%, 59% 6%, 64% 100%, 69% 16%, 74% 88%,
    79% 4%, 84% 100%, 89% 18%, 94% 86%, 100% 0%, 100% 100%, 0% 100%
  );
}

/* =========================== TABS =========================== */
.issues{
  background: var(--navy-deep);
  padding: 18px clamp(16px,4vw,48px) 8px;
}
.issues__label{
  font-family: var(--sans);
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color: rgba(255,255,255,.55);
  margin:0 0 10px;
}
.issues__list{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding-bottom: 14px;
  scrollbar-width: thin;
}
.issues__list::-webkit-scrollbar{ height:6px; }
.issues__list::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.25); border-radius:6px; }

.issue-tab{
  flex: 0 0 auto;
  width: 200px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px;
  display:flex;
  gap:10px;
  align-items:center;
  text-align:left;
  color:#fff;
  transition: border-color .2s, background .2s, transform .15s;
}
.issue-tab:hover{ background: rgba(255,255,255,.08); transform: translateY(-2px); }
.issue-tab.is-active{
  border-color: var(--gold);
  background: rgba(201,162,39,.12);
}
.issue-tab__thumb{
  width: 38px; height: 54px;
  border-radius: 4px;
  overflow:hidden;
  flex:none;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
  background-size:cover;
  background-position: center top;
}
.issue-tab__meta .vol{
  font-size:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: var(--gold);
  display:block;
}
.issue-tab__meta .theme{
  font-family: var(--display);
  font-size:13px;
  line-height:1.25;
  margin-top:2px;
}

/* =========================== STAGE / VIEWER =========================== */
.stage-wrap{
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(180deg, var(--navy-deep), #03182c 90%);
  padding: 28px clamp(12px,4vw,48px) 50px;
}

.toolbar{
  max-width: 1180px;
  margin: 0 auto 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.toolbar__group{
  display:flex;
  gap:6px;
  align-items:center;
}
.tool-btn{
  width:38px; height:38px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-size:16px;
  transition: background .15s, transform .15s;
}
.tool-btn:hover{ background: rgba(255,255,255,.16); }
.tool-btn:active{ transform: scale(.92); }
.tool-btn[disabled]{ opacity:.35; cursor:not-allowed; }
.tool-btn svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; }

.zoom-readout{
  font-size:12px;
  color: rgba(255,255,255,.7);
  width:42px;
  text-align:center;
}

.download-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:600;
  color:#fff;
  background: var(--navy);
  border:1px solid rgba(255,255,255,.2);
  padding:8px 14px;
  border-radius:10px;
  text-decoration:none;
  transition: background .15s;
}
.download-link:hover{ background:#0d59ab; }

.stage{
  max-width: 1180px;
  margin: 0 auto;
  position:relative;
}

.stage-viewport{
  position:relative;
  overflow:auto;
  border-radius: 18px;
  padding: 36px clamp(8px,4vw,60px);
  display:flex;
  justify-content:center;
}

.nav-arrow{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:46px; height:46px;
  border-radius:50%;
  background: rgba(255,255,255,.92);
  color: var(--navy);
  border:none;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
  z-index:5;
  transition: transform .15s, background .15s;
}
.nav-arrow svg{ width:22px; height:22px; stroke: var(--navy); stroke-width:2.4; fill:none; }
.nav-arrow:hover{ background:#fff; transform: translateY(-50%) scale(1.08); }
.nav-arrow:active{ transform: translateY(-50%) scale(.95); }
.nav-arrow[disabled]{ opacity:.25; pointer-events:none; }
.nav-arrow--prev{ left:6px; }
.nav-arrow--next{ right:6px; }

.book{
  display:flex;
  gap: 2px;
  perspective: 2200px;
  transform: scale(var(--zoom, 1));
  transform-origin: top center;
  transition: transform .2s ease;
  touch-action: pan-y;
}
.book.is-single{ justify-content:center; }

.page-slot{
  position:relative;
  width: clamp(190px, 32vw, 380px);
  aspect-ratio: 1241 / 1755;
  background: var(--paper);
  box-shadow: var(--shadow-page);
  flex: none;
}
.book.is-single .page-slot{ width:min(420px, 86vw); }
.page-slot:first-child:not(:only-child){ border-radius: 8px 2px 2px 8px; }
.page-slot:last-child:not(:only-child){ border-radius: 2px 8px 8px 2px; }
.page-slot:only-child{ border-radius: 8px; }
.page-slot img{ width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.page-slot .page-num{
  position:absolute; bottom:8px; right:12px;
  font-family: var(--sans);
  font-size:10px;
  color: rgba(0,0,0,.35);
}
/* the book's centre fold shadow when two pages are shown */
.book:not(.is-single)::before{
  content:"";
  position:absolute;
  left:50%; top:0; bottom:0;
  width:18px;
  margin-left:-9px;
  background: linear-gradient(90deg, rgba(0,0,0,.18), transparent 40%, transparent 60%, rgba(0,0,0,.18));
  pointer-events:none;
  z-index:2;
}

/* page-turn motion */
@media (prefers-reduced-motion: no-preference){
  .book.flipping-next{ animation: flipOutNext .26s ease forwards; }
  .book.flipping-prev{ animation: flipOutPrev .26s ease forwards; }
  .book.flipping-in{ animation: flipIn .28s ease forwards; }
}
@keyframes flipOutNext{ to{ transform: scale(var(--zoom,1)) rotateY(-10deg) translateX(-2%); opacity:.35; filter:brightness(.8); } }
@keyframes flipOutPrev{ to{ transform: scale(var(--zoom,1)) rotateY(10deg) translateX(2%); opacity:.35; filter:brightness(.8); } }
@keyframes flipIn{
  from{ transform: scale(var(--zoom,1)) rotateY(0deg); opacity:.35; filter:brightness(.8); }
  to{ transform: scale(var(--zoom,1)); opacity:1; filter:none; }
}

.progress-row{
  max-width:1180px;
  margin: 18px auto 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.page-indicator{
  font-family: var(--sans);
  font-size:13px;
  font-weight:600;
  color:#fff;
  background: var(--navy);
  padding:6px 16px;
  border-radius:999px;
  letter-spacing:.02em;
}
.progress-track{
  width: 220px;
  height:4px;
  border-radius:4px;
  background: rgba(255,255,255,.16);
  overflow:hidden;
}
.progress-fill{
  height:100%;
  background: var(--gold);
  border-radius:4px;
  transition: width .25s ease;
}

.hint{
  text-align:center;
  font-family: var(--serif);
  font-style:italic;
  font-size:12px;
  color: rgba(255,255,255,.45);
  margin-top:10px;
}

/* fullscreen mode */
.stage-wrap:fullscreen{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding: 24px;
}
.stage-wrap:fullscreen .stage-viewport{ max-height:80vh; }

/* =========================== ABOUT STRIP =========================== */
.about{
  background:#fdfcf9;
  padding: 46px clamp(16px,4vw,48px);
}
.about__inner{
  max-width:1180px;
  margin:0 auto;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:40px;
  align-items:start;
}
.about h2{
  font-family: var(--display);
  color: var(--brick);
  font-size: clamp(24px,3vw,32px);
  margin:0 0 12px;
}
.about p{
  font-family: var(--serif);
  color: var(--ink-soft);
  line-height:1.7;
  margin:0 0 14px;
  font-size:15px;
}
.sections-list{
  display:flex; flex-wrap:wrap; gap:10px;
  margin-top:14px;
  padding:0; list-style:none;
}
.sections-list li{
  font-family: var(--sans);
  font-size:12px;
  font-weight:600;
  letter-spacing:.03em;
  color: var(--navy);
  background: rgba(11,74,142,.08);
  border: 1px solid rgba(11,74,142,.18);
  padding:7px 12px;
  border-radius:999px;
}
.team-card{
  background:#fff;
  border:1px solid #eee2cf;
  border-radius: var(--radius);
  padding:22px;
}
.team-card h3{
  font-family: var(--display);
  font-size:17px;
  margin:0 0 12px;
  color: var(--navy);
}
.team-card ul{
  list-style:none; margin:0; padding:0;
  display:grid; gap:8px;
  font-family: var(--serif);
  font-style:italic;
  font-size:14px;
  color: var(--ink);
}
.team-card ul li span{
  display:block;
  font-style:normal;
  font-family: var(--sans);
  font-size:11px;
  color: var(--ink-soft);
}

/* =========================== FOOTER =========================== */
.site-footer{
  background: var(--navy-deep);
  color: rgba(255,255,255,.75);
  padding: 26px clamp(16px,4vw,48px);
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  border-top: 1px solid var(--line);
  font-size:13px;
}
.site-footer a{ color:#fff; text-decoration:none; }
.site-footer a:hover{ text-decoration:underline; }
.site-footer__links{ display:flex; gap:18px; flex-wrap:wrap; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 980px){
  .about__inner{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .masthead{ flex-direction:column; align-items:flex-start; gap:10px; }
  .masthead__meta{ text-align:left; }
  .masthead__meta .theme{ max-width:none; }
  .page-slot{ width:min(420px, 78vw); }
  .nav-arrow{ width:38px; height:38px; }
  .nav-arrow--prev{ left:2px; }
  .nav-arrow--next{ right:2px; }
  .stage-viewport{ padding: 26px 38px; }
  .progress-track{ width:160px; }
}

@media (max-width: 460px){
  .toolbar{ justify-content:center; }
  .download-link{ order:3; width:100%; justify-content:center; }
}
