/* ============================================================
   Mock - Privacy Policy and Terms of Service (privacy.html, terms.html)
   Loaded after landing.css. Emerald hero with an animated illustration,
   key-point cards, a sticky "On this page" tab list and section cards.
   ============================================================ */

.legal-page {
  --paper: #F6F4EE;        /* warm page background behind the cards */
  --card-line: #E9E4D6;
  --gold-soft: #FBF5E1;    /* icon tiles, callouts */
  --emerald-2: #145040;
  background: var(--paper);
}

/* Thin gold reading-progress bar at the very top */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- Hero ---------- */
.legal-hero {
  color: var(--cream);
  padding-bottom: 104px;
  overflow: hidden;
}
.lh-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
  padding-top: 32px;
}
.lh-badge {
  display: inline-grid;
  place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
}
.lh-badge svg { width: 30px; height: 30px; }
.lh-eyebrow {
  margin: 20px 0 0;
  color: var(--sage);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lh-title {
  margin: 10px 0 0;
  color: var(--cream);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(40px, 3vw + 24px, 64px);
  line-height: 1.05;
}
.lh-title small {
  display: block;
  margin-top: 8px;
  color: var(--gold);
  font-size: 0.42em;
  line-height: 1.2;
}
.lh-sub {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--sage);
  font-size: 18px;
  line-height: 1.6;
}
.lh-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(245, 241, 232, 0.08);
  border: 1px solid rgba(245, 241, 232, 0.14);
  color: var(--cream);
  font-size: 14px;
}
.lh-meta svg { width: 16px; height: 16px; color: var(--gold); flex: none; }
.lh-meta { max-width: 560px; flex-wrap: nowrap; align-items: flex-start; text-align: left; }
.lh-meta svg { margin-top: 3px; }
.lh-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.lh-art { position: relative; max-width: 460px; width: 100%; justify-self: center; }
.lh-svg { width: 100%; height: auto; overflow: visible; }

@media (max-width: 899px) {
  .legal-hero { padding-bottom: 88px; }
  .lh-inner { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .lh-sub { margin-left: auto; margin-right: auto; }
  .lh-actions { justify-content: center; }
  .lh-art { max-width: 320px; order: -1; }
}
@media (max-width: 480px) {
  .lh-sub { font-size: 16px; }
  .lh-actions .btn { width: 100%; }
  .lh-art { max-width: 260px; }
}

/* ---------- Illustration motion ---------- */
.layer {
  transform: translate(calc(var(--px, 0) * var(--d, 0) * 1px), calc(var(--py, 0) * var(--d, 0) * 1px));
  transition: transform 0.35s ease-out;
}
@keyframes lg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes lg-spin { to { transform: rotate(360deg); } }
@keyframes lg-twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1); } }
@keyframes lg-bar { 0%, 100% { transform: scaleX(0.5); } 50% { transform: scaleX(1); } }
@keyframes lg-draw {
  0%, 8% { stroke-dashoffset: 20; }
  20%, 86% { stroke-dashoffset: 0; }
  96%, 100% { stroke-dashoffset: 20; }
}
@keyframes lg-sign {
  0%, 30% { stroke-dashoffset: 100; }
  60%, 86% { stroke-dashoffset: 0; }
  96%, 100% { stroke-dashoffset: 100; }
}
.float-a { animation: lg-float 7s ease-in-out infinite; }
.float-b { animation: lg-float 5s ease-in-out 0.8s infinite; }
.float-c { animation: lg-float 6s ease-in-out 1.6s infinite; }
.float-d { animation: lg-float 6.5s ease-in-out 2.4s infinite; }
.orbit { transform-origin: 230px 200px; animation: lg-spin 70s linear infinite; }
.twinkle { transform-box: fill-box; transform-origin: center; animation: lg-twinkle 3.2s ease-in-out infinite; }
.twinkle.t2 { animation-delay: 1.1s; }
.twinkle.t3 { animation-delay: 2.2s; }
.bar { transform-box: fill-box; transform-origin: left center; animation: lg-bar 4s ease-in-out infinite; }
.bar.b2 { animation-delay: 0.7s; }
.bar.b3 { animation-delay: 1.4s; }
.bar.b4 { animation-delay: 2.1s; }
.tick { stroke-dasharray: 20; animation: lg-draw 8s ease-in-out infinite; }
.tick.tk2 { animation-delay: 0.5s; }
.tick.tk3 { animation-delay: 1s; }
.tick.tk4 { animation-delay: 1.5s; }
.sign { stroke-dasharray: 100; animation: lg-sign 8s ease-in-out infinite; }
.seal-ring { transform-origin: 336px 286px; animation: lg-spin 24s linear infinite; }

/* Hover: the padlock opens, the shield / seal glows, chips grow */
.shackle { transition: transform 0.35s ease; }
.lh-art:hover .shackle { transform: translateY(-8px); }
.glow-target { transition: filter 0.35s ease; }
.lh-art:hover .glow-target { filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.6)); }
.chip { transform-box: fill-box; transform-origin: center; transition: transform 0.25s ease; }
.chip:hover { transform: scale(1.14); }

/* ---------- Key points ---------- */
.glance { position: relative; z-index: 2; margin-top: -64px; scroll-margin-top: 24px; }
.glance-head { margin: 0 0 16px; color: var(--cream); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.glance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.gcard {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--card-line);
  box-shadow: 0 10px 30px rgba(14, 59, 46, 0.08);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.gcard:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 18px 40px rgba(14, 59, 46, 0.14); }
.gcard-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--emerald);
  color: var(--gold);
}
.gcard-icon svg { width: 22px; height: 22px; }
.gcard h3 { margin: 16px 0 6px; color: var(--charcoal); font-size: 17px; line-height: 1.35; }
.gcard p { margin: 0; font-size: 15px; line-height: 1.6; color: #4B5563; }
.gcard-more {
  margin-top: auto;
  padding-top: 14px;
  color: var(--emerald);
  font-size: 14px;
  font-weight: 600;
}
.gcard-more span { display: inline-block; transition: transform 0.2s ease; }
.gcard:hover .gcard-more span { transform: translateX(4px); }

@media (max-width: 1023px) { .glance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .glance { margin-top: -56px; }
  .glance-grid { grid-template-columns: 1fr; gap: 12px; }
  .gcard { padding: 20px; }
}

/* ---------- Tabs + sections ---------- */
.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 96px;
}

.lnav {
  position: sticky;
  top: 20px;
  padding: 22px 16px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--card-line);
}
.lnav-title { margin: 0 8px 12px; color: var(--charcoal); font-size: 15px; font-weight: 700; }
.lnav ul { position: relative; margin: 0; padding: 0; list-style: none; }
.lnav li { margin: 2px 0; }
.lnav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lnav a svg { width: 18px; height: 18px; flex: none; color: var(--emerald); }
.lnav a:hover { background: #F3F0E6; color: var(--charcoal); }
.lnav a.is-active { background: var(--gold); color: var(--charcoal); font-weight: 600; }
.lnav a.is-active svg { color: var(--charcoal); }
.lnav-help {
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 12px;
  background: var(--emerald);
  color: var(--sage);
  font-size: 14px;
  line-height: 1.5;
}
.lnav-help strong { display: block; color: var(--cream); font-size: 15px; }
.lnav-help a { display: block; margin-top: 4px; color: var(--cream); font-size: 13.5px; font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.lnav-help a:focus-visible { outline-color: var(--gold); }

/* Section cards */
.ldoc { min-width: 0; }
.lsec {
  margin: 0 0 18px;
  padding: 30px 34px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--card-line);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  scroll-margin-top: 20px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.lsec.is-active { border-color: rgba(212, 175, 55, 0.7); box-shadow: 0 8px 24px rgba(14, 59, 46, 0.07); }
.lsec h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--charcoal);
  font-size: 21px;
  line-height: 1.3;
}
.lsec-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--emerald);
}
.lsec-icon svg { width: 22px; height: 22px; }
.lsec p { margin: 12px 0; }
.lsec ul, .lsec ol { margin: 12px 0; padding-left: 22px; }
.lsec li { margin: 8px 0; padding-left: 4px; }
.lsec ul li::marker { color: var(--gold); font-size: 1.15em; }
.lsec ol li::marker { color: var(--emerald); font-weight: 700; }
.lsec strong { color: var(--charcoal); }
.lsec a { color: var(--emerald); font-weight: 600; text-underline-offset: 3px; }
.lsec a:hover { color: var(--emerald-2); }
.lsec > :last-child { margin-bottom: 0; }
.lsec-meta { color: var(--muted); font-size: 14px; }

/* A key sentence that must stand out */
.callout {
  padding: 14px 18px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--gold-soft);
  color: var(--charcoal);
  font-weight: 600;
}

@media (max-width: 1023px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .lnav { min-width: 0; }
  /* The tabs become a sticky, sideways-scrolling chip bar */
  .lnav {
    top: 0;
    z-index: 20;
    margin: 0 calc(var(--gutter) * -1) 16px;
    padding: 10px var(--gutter);
    border: 0;
    border-bottom: 1px solid var(--card-line);
    border-radius: 0;
    background: rgba(246, 244, 238, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .lnav-title, .lnav-help { display: none; }
  .lnav ul {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .lnav ul::-webkit-scrollbar { display: none; }
  .lnav li { margin: 0; flex: none; }
  .lnav a {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--card-line);
    font-size: 14px;
    white-space: nowrap;
  }
  .lnav a svg { width: 16px; height: 16px; }
  .lnav a.is-active { border-color: var(--gold); }
  .lsec { scroll-margin-top: 76px; }
}
@media (max-width: 639px) {
  .lsec { padding: 22px 20px; font-size: 16px; }
  .lsec h2 { font-size: 19px; gap: 12px; }
  .lsec-icon { width: 38px; height: 38px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .tick, .sign { animation: none !important; stroke-dashoffset: 0; }
  .layer { transform: none !important; }
}

@media print {
  .read-progress, .lnav, .lh-art, .lh-actions, .glance, .contours { display: none !important; }
  .legal-hero { color: #000; padding-bottom: 16px; }
  .legal-hero::before { display: none; }
  .lh-title, .lh-sub, .lh-meta, .lh-eyebrow { color: #000; }
  .legal-layout { display: block; padding: 0; }
  .lsec { border: 0; padding: 0; margin-bottom: 20px; }
}
