/* ==========================================================================
   Terms & Conditions page
   All rules are scoped to .tc-body / .tc-page so nothing leaks into the
   shared header, footer or other pages. Sizes follow the 1440px Figma frame;
   the layout is fluid below that.

   01. Tokens and base       05. Terms sections
   02. Buttons               06. Contact card
   03. Hero                  07. CTA band
   04. Layout and sidebar    08. Motion
                             09. Responsive
   ========================================================================== */

/* 01. Tokens and base ----------------------------------------------------- */
.tc-body {
  --tc-ink: #1A182B;
  --tc-text: #5B5870;
  --tc-help: #41365D;
  --tc-purple: #6E47FF;
  --tc-lavender: #F1EDFD;
  --tc-card: #F4F1FC;
  --tc-active-bg: #F5F2FF;
  --tc-line: #EAE8EF;
  --tc-line-soft: #E6E3EC;
  --tc-card-line: #E9E3F5;
  --tc-ease: cubic-bezier(.22, .61, .36, 1);
  margin: 0;
  background: #fff;
}

html:has(.tc-body) { scroll-padding-top: 24px; }

.tc-skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--tc-ink);
  font: 600 14px/1 Manrope, system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.tc-skip-link:focus { top: 16px; }

.tc-page {
  overflow-x: clip;
  color: var(--tc-ink);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.tc-page :where(h1, h2, h3, p, ul, li, dl, dt, dd, address) { margin: 0; padding: 0; }
.tc-page :where(ul) { list-style: none; }
.tc-page address { font-style: normal; }
/* Zero-specificity reset so component link colours (buttons, TOC) win. */
.tc-page :where(a) { color: inherit; text-decoration: none; }
.tc-page :focus-visible { outline: 2px solid var(--tc-purple); outline-offset: 3px; }
.tc-page section[id] { scroll-margin-top: 88px; }
.tc-page section[id]:focus { outline: none; }

/* 02. Buttons ------------------------------------------------------------- */
.tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 26px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .3s var(--tc-ease), box-shadow .3s var(--tc-ease), background-color .3s var(--tc-ease);
}

.tc-btn--primary {
  min-width: 188px;
  height: 48px;
  padding: 0 22px;
  background: var(--tc-purple);
  color: #fff;
  font-size: 14px;
  line-height: 22.4px;
  box-shadow: 0 6px 18px rgba(110, 71, 255, .22);
}

.tc-btn--primary:hover {
  background: #5F37F5;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(110, 71, 255, .32);
}

.tc-btn--white {
  min-width: 218px;
  height: 52px;
  padding: 0 28px;
  background: #fff;
  color: var(--tc-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.tc-btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(12, 0, 80, .35);
}

.tc-btn:active { transform: translateY(0); }

/* 03. Hero ---------------------------------------------------------------- */
.tc-hero {
  position: relative;
  min-height: 598px;
  padding: 194px 24px 120px;
  overflow: hidden;
  background: var(--tc-lavender);
}

/* Concentric rings from the Figma "illustration" layer. */
.tc-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -522px;
  width: 730px;
  height: 730px;
  margin-left: -365px;
  border: .667px solid rgba(110, 71, 255, .12);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(110, 71, 255, .02),
    0 0 0 120px rgba(110, 71, 255, .02),
    0 0 0 180px rgba(110, 71, 255, .02);
  pointer-events: none;
}

.tc-hero__inner {
  position: relative;
  max-width: 910px;
  margin: 0 auto;
  text-align: center;
}

.tc-hero__title {
  color: var(--tc-ink);
  font-size: 76px;
  font-weight: 500;
  line-height: 79.04px;
  letter-spacing: -4.18px;
}

.tc-hero__text {
  padding-top: 24px;
  color: var(--tc-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
}

.tc-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 30px;
}

.tc-hero__help {
  color: var(--tc-help);
  font-size: 14px;
  font-weight: 400;
  line-height: 22.4px;
}

.tc-hero__help a {
  color: var(--tc-help);
  font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--tc-ease), color .3s var(--tc-ease);
}

.tc-hero__help a:hover {
  color: var(--tc-purple);
  background-size: 100% 1px;
}

/* 04. Layout and sidebar -------------------------------------------------- */
.tc-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 863px);
  column-gap: 82px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 40px 86px;
  justify-content: center;
}

.tc-sidebar {
  position: sticky;
  top: 96px; /* clears the 64px fixed header */
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.tc-explore__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: .667px solid var(--tc-line-soft);
  color: var(--tc-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 25.6px;
  letter-spacing: -.32px;
  cursor: pointer;
  list-style: none;
}

.tc-explore__summary::-webkit-details-marker { display: none; }

/* Minus when open, plus when closed. */
.tc-explore__icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.tc-explore__icon::before,
.tc-explore__icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 11.25px;
  width: 12px;
  height: 1.5px;
  background: var(--tc-purple);
  transition: transform .3s var(--tc-ease);
}

.tc-explore__icon::after { transform: rotate(90deg); }
.tc-explore[open] .tc-explore__icon::after { transform: rotate(0deg); }

.tc-toc {
  display: flex;
  flex-direction: column;
  padding: 15px 7px 0 0;
}

.tc-toc__link {
  display: block;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0;
  color: var(--tc-text);
  font-size: 13px;
  font-weight: 400;
  line-height: 18.85px;
  transition: color .25s var(--tc-ease), background-color .25s var(--tc-ease), border-color .25s var(--tc-ease), padding-left .25s var(--tc-ease);
}

.tc-toc__link:hover {
  color: var(--tc-purple);
  background: #FAF8FF;
  padding-left: 16px;
}

.tc-toc__link.is-active {
  border-left-color: var(--tc-purple);
  border-radius: 8px;
  background: var(--tc-active-bg);
  color: var(--tc-purple);
}

.tc-toc__link.is-active:hover { padding-left: 12px; }

/* 05. Terms sections ------------------------------------------------------ */
.tc-content { min-width: 0; }

.tc-term {
  position: relative;
  padding: 38px 0 38px 58px;
  border-bottom: 1px solid var(--tc-line);
}

.tc-term:first-child { padding-top: 0; }
.tc-term--last { border-bottom: 0; padding-bottom: 0; }

.tc-term__num {
  position: absolute;
  left: 0;
  top: 41px;
  color: var(--tc-purple);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .26px;
  transition: transform .3s var(--tc-ease);
}

.tc-term:first-child .tc-term__num { top: 3px; }
.tc-term:hover .tc-term__num { transform: translateX(4px); }

.tc-term__title {
  color: var(--tc-ink);
  font-size: 26px;
  font-weight: 500;
  line-height: 32.5px;
  letter-spacing: -.78px;
}

.tc-page .tc-term__text {
  max-width: 805px;
  padding-top: 13px;
  color: var(--tc-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
}

.tc-page .tc-term__text--after-list { padding-top: 0; }

.tc-page .tc-inline-link {
  color: var(--tc-purple);
  text-decoration: underline;
  text-underline-position: from-font;
  transition: color .25s var(--tc-ease);
}

.tc-page .tc-inline-link:hover { color: #4A1FF5; }

.tc-page .tc-term__list {
  display: grid;
  row-gap: 10px;
  max-width: 805px;
  padding: 16px 0;
}

.tc-page .tc-term__list li {
  position: relative;
  padding-left: 20px;
  color: var(--tc-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
}

.tc-term__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tc-purple);
}

.tc-term__list strong {
  color: var(--tc-ink);
  font-weight: 600;
}

/* Sub-headings and last-updated line (used by the Privacy Policy page). */
.tc-page .tc-term__subtitle {
  padding-top: 22px;
  color: var(--tc-ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -.36px;
}

.tc-page .tc-term__text strong { color: var(--tc-ink); font-weight: 600; }

.tc-page .tc-hero__text--sub { padding-top: 12px; }

.tc-page .tc-hero__updated {
  padding-top: 14px;
  color: var(--tc-help);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

/* 06. Contact card -------------------------------------------------------- */
.tc-contact-card {
  margin-top: 24px;
  width: calc(100% + 22px);
  padding: 28px;
  border-radius: 20px;
  background: var(--tc-card);
  transform: perspective(900px) rotateX(0) translateY(0);
  transition: transform .45s var(--tc-ease), box-shadow .45s var(--tc-ease);
}

.tc-contact-card:hover {
  transform: perspective(900px) rotateX(2deg) translateY(-4px);
  box-shadow: 0 22px 44px rgba(62, 36, 160, .12);
}

.tc-contact-card__title {
  color: var(--tc-ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 23.75px;
  letter-spacing: -.285px;
}

.tc-page .tc-contact-card__list { padding-top: 16px; }

.tc-contact-card__row {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr);
  column-gap: 14px;
  padding: 12px 0;
  border-bottom: .667px solid var(--tc-card-line);
}

.tc-contact-card__row:last-child { border-bottom: 0; padding-bottom: 0; }

.tc-contact-card__row dt {
  color: var(--tc-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 24px;
}

.tc-contact-card__row dd {
  color: var(--tc-ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
  overflow-wrap: anywhere;
}

/* Figma: email value is set smaller, semibold and in the body grey. */
.tc-contact-card__row:first-child dd {
  color: var(--tc-text);
  font-size: 13px;
  font-weight: 600;
}

.tc-contact-card__row:last-child dd {
  color: var(--tc-text);
  line-height: 26.25px;
}

.tc-contact-card__row a { transition: color .25s var(--tc-ease); }
.tc-contact-card__row a:hover { color: var(--tc-purple); }

/* 07. CTA band ------------------------------------------------------------ */
.tc-cta {
  background:
    radial-gradient(55% 60% at 44% 110%, rgba(170, 150, 255, .55) 0%, rgba(170, 150, 255, 0) 70%),
    linear-gradient(180deg, #150079 0%, #2E1B6A 26%, #4A30C4 52%, #6744F5 74%, #6E47FF 100%);
}

.tc-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1440px;
  min-height: 321px;
  margin: 0 auto;
  padding: 72px clamp(16px, 11.8vw, 170px) 96px clamp(16px, 11.5vw, 166px);
}

.tc-cta__title {
  max-width: 400px;
  color: #fff;
  font-size: 54px;
  font-weight: 400;
  line-height: 50px;
  letter-spacing: -2.7px;
}

.tc-page .tc-cta__text {
  padding-top: 24px;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

/* 08. Motion -------------------------------------------------------------- */
@keyframes tc-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .tc-hero__title { animation: tc-rise .7s var(--tc-ease) both; }
  .tc-hero__text { animation: tc-rise .7s .1s var(--tc-ease) both; }
  .tc-hero__actions { animation: tc-rise .7s .2s var(--tc-ease) both; }

  /* Scroll-triggered reveal, driven by the browser's view timeline.
     Browsers without support simply show the content with no animation. */
  @supports (animation-timeline: view()) {
    .tc-reveal {
      animation: tc-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.tc-body) { scroll-behavior: auto; }

  .tc-page *,
  .tc-page *::before,
  .tc-page *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }

  .tc-contact-card:hover,
  .tc-btn:hover { transform: none; }
}

/* 09. Responsive ---------------------------------------------------------- */

/* Laptop and desktop: 1024px - 1439px */
@media (max-width: 1439px) {
  .tc-layout {
    grid-template-columns: 235px minmax(0, 1fr);
    column-gap: clamp(48px, 5.7vw, 82px);
    max-width: 1280px;
  }

  .tc-contact-card { width: 100%; }
}

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) {
  .tc-hero {
    min-height: 0;
    padding: 160px 32px 96px;
  }

  .tc-hero__title {
    font-size: 60px;
    line-height: 64px;
    letter-spacing: -3px;
  }

  .tc-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    column-gap: 40px;
    padding: 72px 32px 72px;
  }

  .tc-term { padding-left: 44px; }

  .tc-term__title {
    font-size: 24px;
    line-height: 30px;
  }

  .tc-cta__title {
    font-size: 46px;
    line-height: 46px;
    letter-spacing: -2px;
  }
}

/* Mobile: 320px - 767px */
@media (max-width: 767px) {
  .tc-hero { padding: 128px 16px 72px; }

  .tc-hero::before {
    width: 520px;
    height: 520px;
    margin-left: -260px;
    top: -380px;
  }

  .tc-hero__title {
    font-size: clamp(36px, 10.5vw, 48px);
    line-height: 1.08;
    letter-spacing: -1.6px;
  }

  .tc-hero__text {
    padding-top: 18px;
    font-size: 15px;
    line-height: 26px;
  }

  .tc-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 32px;
    padding: 40px 16px 56px;
  }

  /* Compact, collapsible table of contents above the content. */
  .tc-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .tc-explore {
    padding: 16px;
    border: 1px solid var(--tc-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26, 24, 43, .05);
  }

  .tc-explore:not([open]) .tc-explore__summary {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .tc-toc { padding-right: 0; }

  .tc-toc__link {
    padding-top: 11px;
    padding-bottom: 11px;
    font-size: 14px;
  }

  .tc-term { padding: 32px 0; }
  .tc-term:first-child { padding-top: 0; }
  .tc-term--last { padding-bottom: 0; }

  .tc-term__num,
  .tc-term:first-child .tc-term__num {
    position: static;
    display: block;
    margin-bottom: 6px;
  }

  .tc-term__title {
    font-size: 22px;
    line-height: 28px;
    letter-spacing: -.5px;
  }

  .tc-page .tc-term__text,
  .tc-page .tc-term__list li {
    font-size: 15px;
    line-height: 26px;
  }

  .tc-term__list li::before { top: 11px; }

  .tc-contact-card { padding: 20px; }

  .tc-contact-card__row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
  }

  .tc-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 56px 16px 64px;
  }

  .tc-cta__title {
    font-size: 38px;
    line-height: 40px;
    letter-spacing: -1.4px;
  }

  .tc-page .tc-cta__text { padding-top: 16px; }

  .tc-btn--white {
    width: 100%;
    min-height: 52px;
  }
}

/* 10. Privacy Policy page -------------------------------------------------
   Sizes measured from the Privacy Policy design. Scoped to
   .tc-page--privacy so the Terms page is untouched. */
@media (min-width: 768px) {
  .tc-page--privacy .tc-hero__inner { max-width: 884px; }
  .tc-page--privacy .tc-hero__text { padding-top: 24px; }
  .tc-page--privacy .tc-hero__text--sub { padding-top: 11px; }
  .tc-page--privacy .tc-hero__actions { padding-top: 28px; }

  .tc-page--privacy .tc-term__title {
    font-size: 24.5px;
    line-height: 32px;
    letter-spacing: -.74px;
  }

  .tc-page--privacy .tc-term__text,
  .tc-page--privacy .tc-term__list li {
    max-width: none;
    font-size: 15.2px;
    line-height: 26px;
  }

  .tc-page--privacy .tc-term__text { padding-top: 12px; }
  .tc-page--privacy .tc-term__title + .tc-term__text { padding-top: 14px; }
  .tc-page--privacy .tc-term__text + .tc-term__text { padding-top: 15px; }
  .tc-page--privacy .tc-term__text--after-list { padding-top: 0; }

  .tc-page--privacy .tc-term__list {
    max-width: none;
    row-gap: 11px;
    padding: 17px 0 16px;
  }

  .tc-page--privacy .tc-term__list li { padding-left: 19px; }
  .tc-page--privacy .tc-term__list li::before { top: 11px; width: 5px; height: 5px; }

  .tc-page--privacy .tc-term__subtitle {
    padding-top: 24px;
    font-size: 17.3px;
    font-weight: 500;
    line-height: 26px;
    letter-spacing: -.3px;
  }

  .tc-page--privacy .tc-term__list + .tc-term__subtitle { padding-top: 8px; }
  .tc-page--privacy .tc-term__subtitle + .tc-term__text { padding-top: 9px; }

  .tc-page--privacy .tc-toc { padding-top: 15px; }
  .tc-page--privacy .tc-explore__summary { padding-top: 2px; }

  .tc-page--privacy .tc-toc__link {
    padding: 6px 10px;
    font-size: 12.75px;
  }

  .tc-page--privacy .tc-toc__link:hover { padding-left: 14px; }
  .tc-page--privacy .tc-toc__link.is-active:hover { padding-left: 10px; }
}

@media (min-width: 1024px) {
  .tc-page--privacy .tc-hero { padding-top: 184px; }
  .tc-page--privacy .tc-term { padding: 36px 0 35px 48px; }
  .tc-page--privacy .tc-term:first-child { padding-top: 0; }
  .tc-page--privacy .tc-term--last { padding-bottom: 0; }
  .tc-page--privacy .tc-term__num { top: 39px; }
  .tc-page--privacy .tc-term:first-child .tc-term__num { top: 3px; }
  .tc-page--privacy .tc-contact-card__list { padding-top: 13px; }
}

@media (min-width: 1440px) {
  .tc-page--privacy .tc-layout {
    grid-template-columns: 250px minmax(0, 875px);
    column-gap: 75px;
    padding-top: 85px;
    padding-bottom: 67px;
  }

  .tc-page--privacy .tc-contact-card { width: 100%; padding: 29px 28px 30px; }
}

/* ==========================================================================
   11. Cookie Policy page (Terms base sizes, tuned spacing)
   ========================================================================== */
.tc-page--cookie .tc-term__list li::before { width: 5px; height: 5px; }

@media (min-width: 768px) {
  .tc-page--cookie .tc-toc__link { padding-right: 2px; }

  .tc-page--cookie .tc-term__title + .tc-term__text { padding-top: 14px; }

  .tc-page--cookie .tc-term__list { row-gap: 9px; padding: 15px 0 14px; }
  .tc-page--cookie .tc-term__list:last-child { padding-bottom: 16px; }
  .tc-page--cookie .tc-term__list li { padding-left: 13px; }
  .tc-page--cookie .tc-term__list li::before { left: -4px; }

  .tc-page--cookie .tc-term__subtitle {
    font-size: 17.3px;
    font-weight: 500;
    letter-spacing: -.3px;
  }

  .tc-page--cookie .tc-term__list + .tc-term__subtitle { padding-top: 7px; }
  .tc-page--cookie .tc-term__subtitle + .tc-term__text { padding-top: 8px; }
}

@media (min-width: 1024px) {
  .tc-page--cookie .tc-term { padding: 34px 0 34px 48px; }
  .tc-page--cookie .tc-term:first-child { padding-top: 0; }
  .tc-page--cookie .tc-term--last { padding-bottom: 0; }
  .tc-page--cookie .tc-term__num { top: 37px; }
  .tc-page--cookie .tc-term:first-child .tc-term__num { top: 3px; }

  .tc-page--cookie .tc-cta__title { max-width: none; }
  .tc-page--cookie .tc-cta__inner { padding-top: 98px; }
}

@media (min-width: 1440px) {
  /* The design lets body copy run slightly past the divider line. */
  .tc-page--cookie .tc-term__text,
  .tc-page--cookie .tc-term__list { max-width: 860px; margin-right: -45px; }
}
