/* ==========================================================================
   Medzee · Legal pages (Privacy Policy, Terms of Use, Data Deletion)
   Self-contained stylesheet — no build step, matches the landing page tokens.
   ========================================================================== */

:root {
  --bg:        #0A0808;
  --bg-soft:   #0E0B0A;
  --ink:       #F2EEEC;
  --ink-2:     #D9D4D2;
  --ink-3:     #A5A0A0;
  --ink-4:     #7E7877;
  --ink-5:     #5A5453;
  --accent:    #FF6C15;
  --accent-hi: #FF8A45;
  --accent-lo: #FFC6A2;
  --line:      rgba(255, 255, 255, .06);
  --line-2:    rgba(255, 255, 255, .10);
  --surface:   rgba(255, 255, 255, .035);
  --header-h:  70px;
  --pad-x:     clamp(16px, 5vw, 32px);
  --max:       1320px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Red Hat Text', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hi); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(255, 122, 26, .75);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--accent); color: #0A0809; }

img { max-width: 100%; }

/* ---------- shared bits ------------------------------------------------- */

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6F6968;
}

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad-x); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: var(--surface);
  font-size: 13px;
  color: #BFB9B7;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(255, 108, 21, .7);
  animation: mz-pulse 2.6s ease-in-out infinite;
}
@keyframes mz-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* ---------- ambient background ------------------------------------------ */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .28;
}
.ambient svg { position: absolute; width: 130%; height: 100%; left: -15%; display: block; }
.ambient .a { top: -14%; animation: mz-flow-a 34s ease-in-out infinite; }
.ambient .b { top: 22%;  animation: mz-flow-b 41s ease-in-out infinite; }

@keyframes mz-flow-a {
  0%, 100% { transform: translate3d(0, 0, 0) scaleY(1); }
  50%      { transform: translate3d(-5.5%, 34px, 0) scaleY(1.09); }
}
@keyframes mz-flow-b {
  0%, 100% { transform: translate3d(-3.5%, 0, 0) scaleY(1.06); }
  50%      { transform: translate3d(3%, -40px, 0) scaleY(.94); }
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 8, 8, .82);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border-bottom: 1px solid var(--line);
}
.site-header > .wrap {
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 40px);
  padding-block: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
}
.site-header img { height: 24px; width: auto; display: block; }

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.header-nav::-webkit-scrollbar { display: none; }
@media (max-width: 620px) {
  /* the row scrolls sideways — fade the trailing edge so that reads as a hint */
  .header-nav {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  }
}
.header-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--ink); }
.header-nav a[aria-current="page"] { color: var(--ink); }
.header-nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px rgba(255, 108, 21, .6);
  vertical-align: middle;
}

/* ---------- hero -------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px));
  padding-bottom: clamp(32px, 5vw, 56px);
}
.hero h1 {
  margin: 18px 0 0;
  font-family: 'Red Hat Display', sans-serif;
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  text-wrap: balance;
}
.hero .lede {
  margin: 18px 0 0;
  max-width: 62ch;
  font-size: clamp(15.5px, 1.5vw, 18px);
  line-height: 1.65;
  color: var(--ink-3);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-meta div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta span:last-child { font-size: 13.5px; color: var(--ink-2); }

/* ---------- layout: toc + content --------------------------------------- */

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-bottom: clamp(64px, 9vw, 120px);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  max-height: calc(100vh - var(--header-h) - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 8px;
}
.toc ol {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc a {
  display: block;
  padding: 6px 12px;
  border-left: 1px solid var(--line-2);
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-4);
  transition: color .2s, border-color .2s, background .2s;
}
.toc a:hover { color: var(--ink-2); border-left-color: rgba(255, 255, 255, .28); }
.toc a.is-active {
  color: var(--ink);
  border-left-color: var(--accent);
  background: rgba(255, 108, 21, .05);
}

/* ---------- prose ------------------------------------------------------- */

.prose { max-width: 74ch; }

.prose section { scroll-margin-top: calc(var(--header-h) + 24px); }
.prose section + section { margin-top: clamp(38px, 5vw, 54px); }

.prose h2 {
  margin: 0 0 14px;
  font-family: 'Red Hat Display', sans-serif;
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.25;
  color: #FBF8F7;
  text-wrap: balance;
}
.prose h2 .num {
  display: block;
  margin-bottom: 6px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  color: var(--accent);
}

.prose h3 {
  margin: 30px 0 10px;
  font-family: 'Red Hat Display', sans-serif;
  font-size: clamp(16px, 1.7vw, 18.5px);
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink-2);
}

.prose p { margin: 0 0 14px; color: var(--ink-3); }
.prose p.strong-note { color: var(--ink-2); }
.prose > section > p:last-child { margin-bottom: 0; }

.prose ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.prose ul li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-3);
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px rgba(255, 108, 21, .45);
}
.prose ul li strong { color: var(--ink-2); font-weight: 600; }

.prose ol.steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prose ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  color: var(--ink-3);
}
.prose ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 108, 21, .35);
  background: rgba(255, 108, 21, .07);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--accent);
}
.prose ol.steps > li strong {
  display: block;
  margin-bottom: 3px;
  font-family: 'Red Hat Display', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
}

/* callout card */
.card {
  margin: 20px 0;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}
.card.accent {
  border-color: rgba(255, 108, 21, .28);
  background: linear-gradient(180deg, rgba(255, 108, 21, .07), rgba(255, 108, 21, .02));
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-top: 0; color: var(--ink); }

/* definition grid — used for "what gets deleted / what is kept" */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.grid-2 .card { margin: 0; }

/* contact block */
.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-bottom-color: rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: linear-gradient(155deg, rgba(255, 148, 72, .92), rgba(232, 106, 14, .88) 62%, rgba(212, 92, 10, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45),
              inset 0 -8px 16px -8px rgba(120, 45, 0, .35),
              0 10px 26px -12px rgba(255, 108, 21, .6);
  font-size: 14.5px;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  transition: transform .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-1px); color: #FFFFFF; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, .28); color: var(--ink); }

/* ---------- request form (data deletion) -------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6F6968;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  transition: border-color .2s, background .2s;
}
.field textarea { min-height: 108px; resize: vertical; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8C8785 50%), linear-gradient(135deg, #8C8785 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select option { background: #14100F; color: var(--ink); }
.field input::placeholder,
.field textarea::placeholder { color: #5A5453; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(255, 108, 21, .5);
  background: rgba(255, 255, 255, .05);
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.form-foot p { margin: 0; font-size: 12.5px; color: var(--ink-4); }

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

.site-footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #0B0908, #0E0B0A 40%);
  border-top: 1px solid var(--line);
  padding: 56px var(--pad-x) 34px;
  overflow: hidden;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.footer-brand img { height: 22px; width: auto; display: block; }
.footer-brand .tag {
  margin-top: 18px;
  font-family: 'Red Hat Display', sans-serif;
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.25;
  color: #E7E2E0;
  text-wrap: balance;
}
.footer-brand p {
  margin: 12px 0 0;
  max-width: 330px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-4);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.footer-cols nav {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-cols nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color .2s, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.footer-cols nav a:hover { color: #fff; transform: translateX(3px); }
.footer-rule { margin-top: 44px; height: 1px; background: var(--line); }
.footer-bottom {
  margin-top: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom .copy {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-5);
}
.footer-bottom .made {
  font-family: 'Red Hat Display', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #B9B3B1;
}
.footer-bottom .made em { font-style: normal; color: #FF9256; }

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

@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 40px;
    padding: 20px 18px;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    background: var(--surface);
  }
  .toc ol {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 2px 18px;
  }
  .prose { max-width: none; }
}

@media (max-width: 760px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .site-footer { padding-top: 40px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .hero-meta { flex-direction: column; gap: 14px; }
  .contact { flex-direction: column; align-items: stretch; }
  .contact .btn, .contact .btn-ghost { width: 100%; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .toc ol { grid-template-columns: minmax(0, 1fr); }
  .site-header > .wrap { gap: 12px; }
  .site-header img { height: 21px; }
  .header-nav { gap: 14px; }
  .header-nav a { font-size: 12.5px; }
  .prose ol.steps > li { padding-left: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient svg, .pill::before { animation: none !important; }
}

/* ---------- contract-style documents (patients/termos-de-uso) ----------- */

.prose-contract h2 { text-wrap: pretty; }
.prose-contract h3 { scroll-margin-top: calc(var(--header-h) + 24px); }
.prose-contract .cl {
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.prose-contract h3 .cl { color: var(--accent); }
.prose-contract p.inciso {
  margin-bottom: 10px;
  padding-left: clamp(14px, 3vw, 28px);
  border-left: 1px solid var(--line-2);
}
.prose-contract p.inciso + p:not(.inciso) { margin-top: 18px; }
.site-footer.compact .footer-bottom { margin-top: 0; }
