/* ---------------------------------------
   ThaireFaruq – Privacy Page CSS
   File: /assets/css/privacy.css
   (Refined pink aesthetic + TOC modal fixes + link overflow fix
    + note modal visibility safety overrides)
---------------------------------------- */

:root{
  /* Page background */
  --bg-1:#fff7fb;
  --bg-2:#fdebf4;

  /* Text */
  --ink:#2f2430;
  --muted:#7b6b73;

  /* Surfaces */
  --card:#ffffff;
  --line:rgba(236,214,226,.95);

  /* Brand */
  --accent:#e39bb8;
  --accent-2:#cfa8ff;

  /* Shadows */
  --shadow:0 16px 34px rgba(148,112,136,0.14);
  --shadow-soft:0 10px 22px rgba(148,112,136,0.12);

  --r-lg:18px;

  /* Soft section style */
  --sec-top:#fffafd;
  --sec-btm:#fff1f7;
  --sec-border:rgba(227,155,184,.35);
  --sec-rail:rgba(227,155,184,.55);

  --chip-ink:#7a2f55;

  --focus:rgba(227,155,184,.45);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html, body{ min-height:100%; }

body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--ink);
  line-height:1.65;
  padding:16px;
  background:
    radial-gradient(circle at top, var(--bg-1) 0, var(--bg-2) 55%, #faf3ff 100%);
}

@media (min-width:768px){
  body{ padding:40px 24px; }
}

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

/* Skip link */
.skip-link{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px;
  width:auto; height:auto;
  padding:10px 12px;
  border-radius:12px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:0 14px 28px rgba(148,112,136,.18);
  z-index:999;
}

/* Layout */
.shell{ max-width:980px; margin:0 auto; }

.card{
  background:linear-gradient(180deg,#ffffff 0%, #fffefe 100%);
  border-radius:var(--r-lg);
  padding:22px 18px 24px;
  box-shadow:var(--shadow);
  border:1px solid var(--line);
  position:relative;
  overflow:hidden;
}

@media (min-width:768px){
  .card{ padding:32px 40px 38px; }
}

.site-strip{
  text-align:center;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.22em;
  color:var(--muted);
  margin-bottom:.9rem;
  padding-bottom:.45rem;
  border-bottom:1px dashed rgba(236,214,226,0.85);
}

/* Header */
.page-head{ margin-bottom:1.1rem; padding-right:56px; }
.page-eyebrow{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:var(--muted);
  margin-bottom:.25rem;
}
.page-head h1{
  font-size:1.35rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-bottom:.25rem;
}
@media (min-width:420px){
  .page-head h1{ font-size:1.55rem; }
}
.page-meta-line{
  font-size:.84rem;
  color:var(--muted);
  font-style:italic;
  margin-bottom:.35rem;
}

/* Body basics */
.page-body{ font-size:1rem; }
.page-body p{
  margin-bottom:.9rem;
  color:#3f3942;
}
.page-body a{
  color:#2563eb;
  text-decoration:underline;
  text-underline-offset:2px;
}
.page-body a:hover{ text-decoration:none; }

/* Hero note (About this page) */
.hero-note-wrapper{ margin:0 0 1rem; }
.hero-note{
  width:100%;
  border-radius:18px;
  border:1px solid rgba(227,155,184,.35);
  background:linear-gradient(180deg, #fffafd 0%, #fff1f7 100%);
  box-shadow:var(--shadow-soft);
  padding:12px 14px 12px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  cursor:pointer;
  text-align:left;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.hero-note:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(148,112,136,.16);
  filter:brightness(1.01);
}
.hero-note-icon{ font-size:1.15rem; margin-top:2px; }
.hero-note-main{ flex:1; }
.hero-note-title{
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.18em;
  color:#7a2f55;
  margin-bottom:2px;
}
.hero-note-text{ font-size:.92rem; color:#5a3a4c; }
.hero-note-action{
  display:inline-flex;
  align-items:center;
  margin-top:6px;
  font-size:.75rem;
  text-transform:uppercase;
  letter-spacing:.14em;
  color:#7a2f55;
}
.hero-note-action span{ margin-left:4px; }

/* On this page button */
.toc-open-wrap{ margin:0 0 1.05rem; }
.toc-open-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(236,214,226,.92);
  background:linear-gradient(135deg, rgba(255,255,255,.95), rgba(253,238,246,.92));
  box-shadow:0 12px 24px rgba(148,112,136,.10);
  cursor:pointer;
  text-align:left;
  transition:transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.toc-open-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(148,112,136,.14);
  filter:brightness(1.01);
}
.toc-open-left{ display:flex; align-items:center; gap:10px; }
.toc-open-icon{
  width:34px; height:34px;
  border-radius:12px;
  display:grid; place-items:center;
  background:rgba(227,155,184,.16);
  border:1px solid rgba(227,155,184,.26);
  color:#7a2f55;
  font-size:1rem;
}
.toc-open-title{
  font-size:.9rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#3f2e39;
}
.toc-open-right{ display:inline-flex; align-items:center; gap:10px; }
.toc-open-hint{ font-size:.84rem; color:#5f5560; }
.toc-open-chevron{ font-size:1.2rem; color:#6b5a63; line-height:1; }

/* Privacy sections */
.page-body.legal{ margin-top:.2rem; }

.legal-sec{
  scroll-margin-top:18px;
  margin-bottom:.95rem;
  background:linear-gradient(180deg,var(--sec-top) 0%, var(--sec-btm) 100%);
  border-radius:16px;
  border:1px solid var(--sec-border);
  border-left:5px solid var(--sec-rail);
  box-shadow:
    0 14px 28px rgba(148,112,136,.10),
    0 0 0 1px rgba(255,255,255,.72) inset;
  padding:1rem 1rem 1.05rem;
  position:relative;
}

.legal-sec::after{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:14px;
  pointer-events:none;
  border:1px solid rgba(255,255,255,.38);
}

@media (min-width:768px){
  .legal-sec{ padding:1.05rem 1.2rem 1.15rem; }
}

.legal-sec-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:.55rem;
  flex-wrap:wrap;
}

.legal-sec h2{
  display:flex;
  align-items:center;
  gap:.6rem;
  font-size:.96rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  margin:0;
  color:#2d1f28;
  flex:1 1 260px;
  min-width:240px;
}

.legal-num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.8rem;
  height:1.8rem;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(227,155,184,.30), rgba(227,155,184,.18));
  border:1px solid rgba(227,155,184,.35);
  color:var(--chip-ink);
  font-weight:800;
  font-size:.95rem;
  box-shadow:0 10px 18px rgba(148,112,136,.12);
  flex-shrink:0;
}

.legal-anchor{
  text-decoration:none;
  color:rgba(75,85,99,.85);
  border:1px solid rgba(236,214,226,.92);
  background:rgba(255,255,255,.8);
  border-radius:999px;
  width:30px;
  height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  line-height:1;
  flex:0 0 auto;
}
.legal-anchor:hover{ background:#fff; color:#4b5563; }

.legal-note{
  margin-top:.8rem;
  padding:.75rem .85rem;
  border-radius:14px;
  background:rgba(255,255,255,.72);
  border:1px dashed rgba(227,155,184,.35);
  color:#5a3a4c;
}

/* Bullets */
.legal-list{
  list-style:none;
  margin:.6rem 0 .95rem;
  padding:0;
}
.legal-list li{
  position:relative;
  padding-left:1.55rem;
  margin-bottom:.42rem;
  line-height:1.6;
  color:#3f3942;
}
.legal-list li::before{
  content:"";
  position:absolute;
  left:0;
  top:0.58em;
  width:0.48rem;
  height:0.48rem;
  border-radius:999px;
  background:rgba(255,255,255,.95);
  border:2px solid rgba(227,155,184,.40);
  box-shadow:0 2px 8px rgba(148,112,136,.10);
}

/* Small card inside legal sections */
.legal-card{
  margin-top:.85rem;
  border-radius:16px;
  border:1px solid rgba(236,214,226,.92);
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 20px rgba(148,112,136,.08);
  padding:.85rem .9rem;
  max-width:100%;
}

/* IMPORTANT: prevents long email from pushing outside card */
.legal-kv{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:10px;
  padding:.45rem 0;
  border-bottom:1px dashed rgba(236,214,226,.75);
}
.legal-kv:last-child{ border-bottom:none; }
.legal-kv .k{
  font-size:.78rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--muted);
}
.legal-kv .v{
  color:#3f3942;
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.legal-kv .v a{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Fineprint */
.legal-fineprint{
  margin-top:1.1rem;
  padding:.85rem .95rem;
  border-radius:16px;
  border:1px dashed rgba(236,214,226,.85);
  background:rgba(255,255,255,.72);
  color:var(--muted);
  font-size:.88rem;
}

/* Footer */
.page-foot{
  margin-top:1.4rem;
  padding-top:1rem;
  border-top:1px dashed var(--line);
  font-size:.82rem;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}
.page-foot .label{
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:.75rem;
}

/* -------------------------------------------------
   TOC MODAL FIXES
-------------------------------------------------- */
#tocModal .menu-list-ul,
#tocModal ul{
  list-style:none !important;
  margin:0;
  padding:0;
}
#tocModal .menu-list{ margin-top:.35rem; }
#tocModal .toc-item{ margin-bottom:.5rem; }

#tocModal .toc-item a.menu-link{
  display:block;
  text-decoration:none;
  border-radius:999px;
  padding:.7rem .85rem;
  border:1px solid rgba(236,214,226,.92);
  background:rgba(255,255,255,.85);
  box-shadow:0 10px 18px rgba(148,112,136,.08);
  transition:transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  color:#2f2430;
}
#tocModal .toc-item a.menu-link:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 22px rgba(148,112,136,.12);
  filter:brightness(1.01);
}

#tocModal .toc-n{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.65rem;
  height:1.65rem;
  border-radius:999px;
  margin-right:.5rem;
  background:rgba(227,155,184,.18);
  border:1px solid rgba(227,155,184,.28);
  color:#7a2f55;
  font-weight:800;
  font-size:.9rem;
}
#tocModal .menu-search-wrap{ margin-top:.8rem; }
#tocModal .menu-search{ border-radius:999px; }

/* Floating MENU button behind modals */
body.modal-open #floatingMenuBtn{
  opacity:.15;
  pointer-events:none;
}

/* -------------------------------------------------
   NOTE MODAL VISIBILITY SAFETY OVERRIDES
   Fixes: “page locks but modal not visible”
-------------------------------------------------- */
#noteModal.note-modal-backdrop{
  position:fixed;
  inset:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  background:rgba(15,23,42,.55);
  padding:0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  z-index:9999;
  opacity:0;
  pointer-events:none;
  transition:opacity 180ms ease;
}
#noteModal.note-modal-backdrop:not([hidden]){
  opacity:1 !important;
  pointer-events:auto !important;
}
#noteModal.note-modal-backdrop.is-open{
  opacity:1 !important;
  pointer-events:auto !important;
}
#noteModal .note-modal-dialog{
  width:min(560px, 96vw);
  max-height:min(560px, 82vh);
  transform:translateY(0) !important;
}
#noteModal.note-modal-backdrop.is-open .note-modal-dialog{
  transform:translateY(0) !important;
}
