/* ==========================================================================
   Coozie legal pages stylesheet
   KnowNest Innovations LLP
   Brand system: Cream #F6F2ED, Cherry #420A20, Orange #EC703F,
                 Blue #2C4FDB, Blush #ECCFFB
   ========================================================================== */

:root {
  --cream:   #F6F2ED;
  --cherry:  #420A20;
  --orange:  #EC703F;
  --blue:    #2C4FDB;
  --blush:   #ECCFFB;
  --white:   #FFFFFF;

  --ink-70:  rgba(66, 10, 32, 0.70);
  --ink-55:  rgba(66, 10, 32, 0.55);
  --ink-40:  rgba(66, 10, 32, 0.40);
  --ink-12:  rgba(66, 10, 32, 0.12);
  --ink-07:  rgba(66, 10, 32, 0.07);

  --cream-75: rgba(246, 242, 237, 0.75);
  --cream-50: rgba(246, 242, 237, 0.50);
  --cream-15: rgba(246, 242, 237, 0.15);

  --display: 'Baloo 2', system-ui, sans-serif;
  --body:    'Nunito', system-ui, -apple-system, sans-serif;

  --wrap: 1200px;
  --measure: 760px;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--cherry);
  font-family: var(--body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ----------------------------------------------------------- header ----- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--cream-75);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--ink-12);
}

.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: flex; align-items: center; }
.brand img { height: 28px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 26px; }

.nav a {
  font-size: 15px; font-weight: 700; color: var(--ink-70);
  text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.nav a:hover { color: var(--cherry); }
.nav a[aria-current="page"] { color: var(--cherry); border-bottom-color: var(--orange); }

.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-family: var(--body); font-weight: 900; font-size: 15px;
  padding: 12px 22px; border-radius: 16px; border: 2px solid transparent;
  cursor: pointer; transition: transform .25s ease, background .25s ease, color .25s ease;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { transform: translateY(-1px); background: #e05f2c; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px;
  color: var(--cherry); cursor: pointer;
}
.nav-toggle svg { display: block; }

/* ------------------------------------------------------- title block ----- */

.page-head { padding: 72px 0 40px; }

.eyebrow {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--orange); margin: 0 0 14px;
}

.page-head h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(38px, 6vw, 62px); line-height: 1.03; letter-spacing: -0.03em;
  margin: 0 0 18px; max-width: 15ch;
}

.page-head .standfirst {
  font-size: 19px; color: var(--ink-55); max-width: 60ch; margin: 0;
}

.meta-line {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px;
}
.pill {
  display: inline-block; background: var(--blush); color: var(--cherry);
  font-size: 12px; font-weight: 800; letter-spacing: 0.02em;
  padding: 7px 15px; border-radius: 999px;
}

/* ------------------------------------------------------------ layout ----- */

.legal-layout {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px; align-items: start; padding-bottom: 96px;
}

/* --------------------------------------------------------------- toc ----- */

.toc {
  position: sticky; top: calc(var(--header-h) + 32px);
  max-height: calc(100vh - var(--header-h) - 64px);
  overflow-y: auto; padding-right: 8px;
}
.toc h2 {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--ink-40);
  margin: 0 0 14px; font-family: var(--body);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: 2px; }
.toc a {
  display: block; font-size: 13.5px; font-weight: 700; line-height: 1.35;
  color: var(--ink-55); text-decoration: none;
  padding: 7px 10px 7px 30px; border-radius: 10px; position: relative;
  transition: background .2s ease, color .2s ease;
}
.toc a::before {
  content: counter(toc); position: absolute; left: 10px; top: 7px;
  font-size: 11px; font-weight: 800; color: var(--ink-40);
}
.toc a:hover { background: var(--ink-07); color: var(--cherry); }
.toc a.active { background: var(--blush); color: var(--cherry); }
.toc a.active::before { color: var(--orange); }

.toc-mobile { display: none; }

/* ------------------------------------------------------------- card ----- */

.legal-card {
  background: var(--white);
  border: 1.5px solid var(--ink-07);
  border-radius: 28px;
  padding: 56px 60px;
  max-width: var(--measure);
}

.legal-card > *:first-child { margin-top: 0; }
.legal-card > *:last-child  { margin-bottom: 0; }

.legal-card h2 {
  font-family: var(--display); font-weight: 800;
  font-size: 30px; line-height: 1.12; letter-spacing: -0.02em;
  margin: 56px 0 18px; scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal-card h2:first-child { margin-top: 0; }

.legal-card h2 .num {
  display: block; font-family: var(--body); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--orange); margin-bottom: 8px;
}

.legal-card h3 {
  font-family: var(--body); font-weight: 900;
  font-size: 18px; line-height: 1.35; margin: 34px 0 12px;
}

.legal-card p { margin: 0 0 18px; }

.legal-card ul { margin: 0 0 22px; padding: 0; list-style: none; }
.legal-card ul li {
  position: relative; padding-left: 26px; margin-bottom: 11px;
}
.legal-card ul li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--orange);
}

.legal-card strong { font-weight: 900; }

.legal-card a { color: var(--blue); text-decoration: none; border-bottom: 1.5px solid rgba(44,79,219,.28); }
.legal-card a:hover { border-bottom-color: var(--blue); }

.rule { height: 1px; background: var(--ink-12); border: 0; margin: 48px 0; }

/* --------------------------------------------------------- info table --- */

.info-table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 15.5px; }
.info-table th, .info-table td {
  text-align: left; vertical-align: top; padding: 13px 16px;
  border-bottom: 1px solid var(--ink-07);
}
.info-table th { font-weight: 900; width: 38%; color: var(--cherry); }
.info-table td { color: var(--ink-70); }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------- callout ------ */

.callout {
  background: var(--blush); border-radius: 22px;
  padding: 28px 32px; margin: 0 0 26px;
}
.callout > *:last-child { margin-bottom: 0; }
.callout p { color: var(--cherry); }

.contact-block {
  background: var(--cream); border-radius: 22px;
  padding: 28px 32px; margin: 0 0 26px; font-size: 16px;
}
.contact-block p { margin: 0 0 7px; }
.contact-block p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------- footer ----- */

.site-footer {
  background: var(--cherry); color: var(--cream);
  border-radius: 36px 36px 0 0; padding: 68px 0 32px; margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 44px; padding-bottom: 44px;
}
.footer-brand img { height: 32px; width: auto; display: block; margin-bottom: 16px; }
.footer-brand p { color: var(--cream-75); font-size: 15px; margin: 0; max-width: 24ch; }

.site-footer h3 {
  font-family: var(--body); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--cream-50); margin: 0 0 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a {
  color: var(--cream-75); text-decoration: none; font-size: 15px; font-weight: 600;
  transition: color .2s ease;
}
.site-footer a:hover { color: var(--cream); }
.site-footer address { font-style: normal; color: var(--cream-75); font-size: 15px; }

.socials { display: flex; gap: 14px; margin-top: 16px; }
.socials a { display: inline-flex; color: var(--cream-75); }
.socials a:hover { color: var(--cream); }
.socials svg { display: block; }

.footer-bottom {
  border-top: 1px solid var(--cream-15); padding-top: 26px;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--cream-50);
}

/* ------------------------------------------------------------ focus ----- */

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px;
}

/* --------------------------------------------------------- responsive --- */

@media (max-width: 1040px) {
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .toc-mobile { display: block; margin-bottom: 32px; }
  .toc-mobile details {
    background: var(--white); border: 1.5px solid var(--ink-07);
    border-radius: 20px; padding: 4px 8px;
  }
  .toc-mobile summary {
    cursor: pointer; list-style: none; padding: 16px 14px;
    font-size: 13px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.09em; color: var(--ink-55);
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after { content: " +"; color: var(--orange); }
  .toc-mobile details[open] summary::after { content: " -"; }
  .toc-mobile ol { padding: 0 14px 14px; }
  .legal-card { max-width: none; }
}

/* six header links since Curious Corner (22 Oct 2026): they fold at 900px, like the rest of the site */
@media (max-width: 900px) {
  .nav, .site-header .btn { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .page-head { padding: 44px 0 28px; }
  .legal-card { padding: 32px 24px; border-radius: 22px; }
  .legal-card h2 { font-size: 25px; margin-top: 44px; }
  .info-table th, .info-table td { display: block; width: 100%; padding: 4px 0; border: 0; }
  .info-table th { padding-top: 14px; }
  .info-table tr { display: block; border-bottom: 1px solid var(--ink-07); padding-bottom: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { border-radius: 28px 28px 0 0; }
}

/* --------------------------------------------------- mobile nav panel --- */

.mobile-nav {
  position: fixed; inset: 0; z-index: 200; background: var(--cream);
  display: none; flex-direction: column; padding: 24px;
}
.mobile-nav.open { display: flex; }
.mobile-nav-top { display: flex; justify-content: space-between; align-items: center; }
.mobile-nav-top img { height: 26px; }
.mobile-nav-close { background: none; border: 0; color: var(--cherry); cursor: pointer; padding: 8px; }
.mobile-nav ul { list-style: none; margin: 44px 0 0; padding: 0; flex: 1; }
.mobile-nav li { margin-bottom: 22px; }
.mobile-nav a {
  font-family: var(--display); font-weight: 800; font-size: 32px;
  letter-spacing: -0.02em; color: var(--cherry); text-decoration: none;
}
.mobile-nav .btn { width: 100%; padding: 17px; font-size: 17px; }

/* -------------------------------------------------- reduced motion ------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --------------------------------------------------------------- print -- */

@media print {
  .site-header, .site-footer, .toc, .toc-mobile, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .legal-card { border: 0; padding: 0; max-width: none; }
  .legal-layout { display: block; padding-bottom: 0; }
  .legal-card h2 { break-after: avoid; }
}
