/* ==========================================================================
   twism.com.br legal pages (/termos/, /privacidade/)
   Started from the values of twism.com's legal pages (site/assets/css/site.css), cut down to
   what these two pages use; twism.com.br's own file now, it does not follow site.css. Do not
   add hues; the one exception is the LGPD consent frame, which is legal content.
   ========================================================================== */

@font-face {
  font-family: "Clash Display";
  src: url("/assets/fonts/ClashDisplay-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #0033eb;
  --blue-ink: #00145e;
  --night: #000a2f;
  --sky: #a3b7ff;
  --mist-2: #f6f7fc;
  --mist-3: #f0f3ff;
  --mist-4: #e5ebff;
  --ink: #19191f;
  --ink-2: #525265;
  --line: #e3e3e8;
  --white: #fff;
  /* The firm's .docx frames the clause 6.4 consent in this red. */
  --consent: #c00000;

  --font-display: "Clash Display", "Arial Narrow", sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(88px, 11vw, 168px);
  --nav-h: 76px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keeps a #section target, and the apps' scrollIntoView, clear of the sticky nav. */
  scroll-padding-top: calc(var(--nav-h) + 16px);
  scrollbar-color: var(--sky) var(--mist-2);
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  caret-color: var(--blue);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection {
  background: var(--blue);
  color: var(--white);
}

svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 8px;
}
.footer :focus-visible {
  outline-color: var(--white);
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1240px);
  margin-inline: auto;
}

.icon {
  width: 1.125em;
  height: 1.125em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--solid {
  fill: currentColor;
  stroke: none;
}

.display-2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.25rem, 5.4vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.028em;
  word-spacing: 0.08em;
  text-wrap: balance;
}

.eyebrow {
  margin-bottom: 18px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
  transition: box-shadow 0.3s;
}
.nav.is-scrolled {
  box-shadow: 0 1px 0 var(--mist-4);
}
.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: inline-flex;
  color: var(--ink);
  border-radius: 8px;
}
.logo svg {
  width: 124px;
  height: 30px;
}

/* ---------- Legal hero, tabs and side nav ---------- */

.legal-hero {
  background: var(--mist-2);
  padding-block: clamp(56px, 8vw, 112px) clamp(40px, 5vw, 64px);
}
.legal-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 32px;
  padding: 4px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line);
}
.legal-tabs [role="tab"] {
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s;
}
.legal-tabs [role="tab"]:hover {
  color: var(--blue-ink);
}
.legal-tabs [aria-selected="true"],
.legal-tabs [aria-selected="true"]:hover {
  background: var(--blue);
  color: var(--white);
}
/* Without JavaScript both documents show, one after the other. */
html:not(.js) .legal-tabs {
  display: none;
}
.js .legal-panel:not(.is-active) {
  display: none;
}
html:not(.js) .legal-panel + .legal-panel {
  margin-top: var(--section);
}

.legal-layout {
  display: grid;
  gap: 40px;
  padding-block: clamp(40px, 6vw, 88px) var(--section);
}
.legal-layout > * {
  min-width: 0;
}
.legal-side ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.legal-side a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--mist-3);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.legal-side a:hover {
  color: var(--blue-ink);
  background: var(--mist-4);
}
.legal-side a[aria-current="page"] {
  background: var(--blue);
  color: var(--white);
}
@media (min-width: 960px) {
  .legal-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 72px;
  }
  .legal-side {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    align-self: start;
  }
  .legal-side ul {
    flex-direction: column;
    gap: 2px;
  }
  .legal-side a {
    display: block;
    background: none;
    font-size: 0.9375rem;
  }
  .legal-side a:hover {
    background: var(--mist-3);
  }
}

/* ---------- Document ---------- */

.legal {
  max-width: 72ch;
  color: var(--ink-2);
  overflow-wrap: break-word;
}
.legal > * + * {
  margin-top: 1em;
}
/* The document's own title and subtitle, from the .docx (the hero carries the page name). */
.legal .legal-doc-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.legal .legal-doc-subtitle {
  margin-top: 0.5em;
  font-weight: 500;
  color: var(--ink);
}
.legal h3 {
  margin-top: 2.2em;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.legal a {
  color: var(--blue);
}
.legal .strong {
  font-weight: 600;
  color: var(--ink);
}
.legal p.li {
  position: relative;
  padding-left: 1.25em;
}
.legal p.li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0.25em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* Legal content, not decoration: the LGPD requires this consent to be visibly set apart
   ("destacado"), and the firm's .docx frames it in red. */
.legal .consent {
  margin-block: 1.5em;
  padding: 20px 24px;
  border: 1.5px solid var(--consent);
  border-radius: 16px;
}
.legal .consent > * + * {
  margin-top: 1em;
}
.legal .consent-title {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--night);
  color: var(--white);
}
.footer__main {
  display: grid;
  gap: 48px;
  padding-block: clamp(64px, 8vw, 112px) clamp(48px, 6vw, 80px);
}
.footer .logo {
  color: var(--white);
  --logo-mark: var(--white);
}
.footer__tag {
  margin-top: 18px;
  color: var(--mist-4);
  max-width: 22em;
}
.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 24px;
}
.footer__cols h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sky);
}
.footer__cols ul {
  margin-top: 14px;
  display: grid;
  gap: 4px;
}
.footer__cols a {
  display: inline-block;
  padding: 6px 0;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9375rem;
}
.footer__cols a:hover {
  text-decoration: underline;
}
.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 28px 40px;
  border-top: 1px solid rgba(163, 183, 255, 0.2);
  font-size: 0.875rem;
  color: var(--mist-4);
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.footer__legal a {
  padding: 6px 0;
  text-decoration: none;
}
.footer__legal a:hover,
.footer__legal a[aria-current="page"] {
  color: var(--white);
}
.footer__legal a:hover {
  text-decoration: underline;
}
.footer__social {
  display: flex;
  gap: 8px;
}
.footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(163, 183, 255, 0.35);
  color: var(--white);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.footer__social a:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--night);
}
.footer__social .icon {
  width: 20px;
  height: 20px;
}
@media (min-width: 900px) {
  .footer__main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
  .footer__cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- ?fs=1: opened from the apps, text only ---------- */

.is-embed {
  scroll-padding-top: 16px;
}
.is-embed .nav,
.is-embed .footer,
.is-embed .legal-side,
.is-embed .legal-tabs {
  display: none;
}
.is-embed .legal-hero {
  padding-block: 24px 0;
  background: none;
}
.is-embed .legal-layout {
  display: block;
  padding-block: 24px 48px;
}

/* ---------- Cookie bar (the same bar as the home page, in base.css) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.btn--primary {
  background: var(--blue);
  color: var(--white);
}
.btn--primary:hover {
  background: color-mix(in oklab, var(--blue) 84%, var(--white));
  box-shadow: 0 0 0 4px rgb(0 51 235 / 0.18), 0 10px 28px -6px rgb(0 51 235 / 0.7);
}
.cookiebar {
  position: fixed;
  inset: auto 0 0;
  z-index: 60;
  padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow: 0 -10px 40px -16px rgba(0, 10, 47, 0.22);
}
.cookiebar[hidden],
.is-embed .cookiebar {
  display: none;
}
.cookiebar__wrap {
  position: relative;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-right: 48px;
}
.cookiebar p {
  margin: 0;
}
.cookiebar__close {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.cookiebar__close:hover {
  background: var(--mist-3);
}
.cookiebar__close .icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.cookiebar__notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 48px;
}
.cookiebar__text {
  display: grid;
  gap: 10px;
  flex: 1 1 400px;
  max-width: 600px;
}
.cookiebar__consent {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-weight: 600;
  color: var(--blue-ink);
  cursor: pointer;
}
.cookiebar__consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.cookiebar__actions .btn {
  min-width: 160px;
}

@media (max-width: 759px) {
  .cookiebar {
    max-height: 88vh;
    overflow: auto;
    padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px));
    font-size: 0.8125rem;
    line-height: 1.4;
  }
  .cookiebar__wrap {
    padding-right: 32px;
  }
  .cookiebar__close {
    top: -10px;
    right: -12px;
  }
  .cookiebar__notice {
    gap: 12px;
  }
  /* The button runs under the close button too, so it takes the bar's full width. */
  .cookiebar__actions {
    display: grid;
    width: calc(100% + 32px);
    margin-right: -32px;
  }
}
