/*
Theme Name: CB44 Ivory Review
Version: 2.0.0
Text Domain: cb44-ivory-review
*/

:root {
  --ivory: #f5f0e7;
  --paper: #fffcf7;
  --soft: #ebe2d5;
  --ink: #252321;
  --muted: #6d6861;
  --brick: #9e3f35;
  --sage: #2f6f62;
  --gold: #c28b35;
  --line: #d7cdbf;
  --info: #eaf1ed;
  --warning: #fff1d0;
  --focus: #2f6f62;
  --shadow: 0 10px 28px rgba(60, 45, 30, .09);
  --frame: 1160px;
  --reading: 740px;
  --wide: 980px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-wrap: anywhere;
  background:
    radial-gradient(circle at 14% 0%, rgba(158, 63, 53, .035), transparent 26rem),
    var(--ivory);
  color: var(--ink);
  font-family: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }
a { color: var(--sage); text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
a:hover { color: var(--brick); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; height: auto; }
p, ul, ol { margin-top: 0; }
p:last-child { margin-bottom: 0; }

.frame { width: min(var(--frame), calc(100% - 40px)); margin-inline: auto; }
.reading { width: min(var(--reading), calc(100% - 40px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 100;
  left: 18px;
  top: 14px;
  padding: 10px 15px;
  transform: translateY(-180%);
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { transform: translateY(0); }

.masthead {
  position: relative;
  z-index: 30;
  background: rgba(255, 252, 247, .96);
  border-bottom: 1px solid var(--line);
}
.brandbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.brand {
  grid-column: 2;
  color: var(--ink);
  font-family: Georgia, "Noto Serif Bengali", serif;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1;
  text-decoration: none;
}
.brand-note {
  grid-column: 3;
  justify-self: end;
  margin: 0;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .05em;
}
.menu-toggle { display: none; }
.navbar { border-top: 1px solid var(--line); }
.menu {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu a {
  display: grid;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  font-size: .85rem;
  font-weight: 750;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.menu a:hover, .menu a:focus-visible { color: var(--brick); border-bottom-color: currentColor; }

.hero { padding-top: clamp(54px, 7vw, 86px); }
.hero-copy { max-width: 920px; }
.overline, .section-kicker {
  margin-bottom: 14px;
  color: var(--brick);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: Georgia, "Noto Serif Bengali", "Noto Sans Bengali", serif;
  text-wrap: balance;
}
h1 {
  margin: 0 0 24px;
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 1.1;
  letter-spacing: -.045em;
}
h2 {
  margin: 0 0 22px;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.22;
  letter-spacing: -.035em;
}
h3 { margin: 34px 0 12px; font-size: 1.28rem; line-height: 1.35; }
.hero-lead, .lead { color: #514b44; font-size: 1.17rem; line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 28px 0 0; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--brick);
  background: var(--brick);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.editorial-figure { width: min(var(--wide), calc(100% - 40px)); margin-inline: auto; }
.hero-figure { margin-top: 44px; }
.section-figure { margin-block: 34px; }
.editorial-image {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
}
.hero-image { aspect-ratio: 16 / 9; }
.section-figure .editorial-image { aspect-ratio: 14 / 9; }
figcaption { margin-top: 8px; color: var(--muted); font-size: .78rem; }

.section { padding-block: clamp(52px, 8vw, 92px); border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.hero + .section { margin-top: clamp(52px, 8vw, 88px); }
.intro { background: rgba(255, 252, 247, .62); }
.section-head::before {
  content: "";
  display: block;
  width: 68px;
  height: 3px;
  margin-bottom: 24px;
  background: var(--brick);
}
.relation, .note {
  margin: 28px 0 0;
  padding: 20px 23px;
  border-left: 4px solid var(--brick);
  background: var(--paper);
  box-shadow: 0 4px 18px rgba(60, 45, 30, .045);
}
.note { border-left-color: var(--gold); background: var(--warning); }

.table-wrap {
  margin-top: 30px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(60, 45, 30, .04);
}
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--soft); font-size: .86rem; }
tbody tr:last-child td { border-bottom: 0; }

.faq details { border-top: 1px solid var(--line); background: rgba(255, 252, 247, .78); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
}
.faq summary::after { content: "+"; color: var(--brick); font-size: 1.5rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 16px 18px; }

.page-main { min-height: 62vh; padding-block: clamp(58px, 9vw, 104px); }
.page-article { width: min(var(--reading), calc(100% - 40px)); }
.page-header { padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: clamp(40px, 5.2vw, 64px); }
.entry-content { padding-top: 38px; }
.entry-content h2 { margin-top: 52px; font-size: clamp(27px, 3.4vw, 38px); }
.entry-content h2::before { content: ""; display: block; width: 54px; height: 3px; margin-bottom: 18px; background: var(--brick); }

.footer { padding-top: 52px; background: var(--ink); color: #ddd4c8; }
.footer-top { display: grid; grid-template-columns: 1.5fr .7fr 1fr; gap: 48px; }
.foot-brand { margin: 0 0 14px; color: #fff; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 900; }
.footer-heading { margin: 0 0 13px; color: #fff; font-size: .78rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-nav li + li { margin-top: 8px; }
.footer a { color: #fff; }
.footer-bottom {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 40px;
  border-top: 1px solid #494642;
  color: #aaa198;
  font-size: .78rem;
}
.footer-bottom p { margin: 0; }

.error { min-height: 65vh; display: grid; place-items: center; text-align: center; }
.error h1 { font-size: 5rem; }

@media (max-width: 800px) {
  body { font-size: 16px; }
  .frame, .reading, .editorial-figure, .page-article { width: min(100% - 32px, var(--frame)); }
  .brandbar { min-height: 66px; display: flex; justify-content: space-between; }
  .brand { font-size: 1.7rem; }
  .brand-note { display: none; }
  .menu-toggle {
    min-width: 74px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: .85rem;
    font-weight: 800;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after { width: 16px; height: 2px; display: block; background: currentColor; }
  .menu-icon { position: relative; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; }
  .menu-icon::after { top: 5px; }
  .navbar {
    display: none;
    position: absolute;
    z-index: 40;
    top: 66px;
    left: 16px;
    right: 16px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  .navbar.is-open { display: block; }
  .navbar .frame { width: 100%; }
  .menu { display: block; padding: 8px; }
  .menu a { min-height: 48px; padding-inline: 12px; border: 0; }
  h1 { font-size: clamp(35px, 10vw, 44px); }
  .hero { padding-top: 46px; }
  .hero-lead, .lead { font-size: 1.08rem; }
  .hero-figure { margin-top: 32px; }
  .section-figure { margin-block: 28px; }
  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 18px; }
}

@media (max-width: 420px) {
  .actions { align-items: stretch; flex-direction: column; }
  .button { justify-content: center; width: 100%; }
  .editorial-image { border-radius: 4px; }
  .relation, .note { padding: 17px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
