/* Terms of Service page composition. Shared tokens and components live in site.css. */
.terms-hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  color: var(--white);
  background-color: #0043A1;
  background-image: url('../hero_bg/terms_bg.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.terms-hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 202, 255, .12), transparent 45%);
}

.terms-hero .hero__inner {
  position: relative;
  z-index: 1;
}

.terms-hero .hero__content {
  position: relative;
  z-index: 1;
  width: min(100%, 44rem);
}

.terms-hero .hero__title {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-2);
}

.terms-hero .hero__description {
  max-width: 58ch;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.6;
}

.terms-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
  color: rgba(255, 255, 255, .78);
  font-size: .78rem;
  font-weight: 600;
}

.terms-breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.terms-breadcrumb a:hover {
  color: var(--white);
  text-decoration: underline;
}

.terms-hero__art {
  position: absolute;
  right: clamp(1rem, 6vw, 6rem);
  bottom: clamp(-1.25rem, -1vw, -.25rem);
  width: clamp(12rem, 22vw, 18rem);
  color: var(--white);
  filter: drop-shadow(0 1rem 1.75rem rgba(0, 30, 105, .32));
  pointer-events: none;
}

.terms-hero__art svg { display: block; width: 100%; height: auto; }

.terms-section {
  background: var(--white);
}

.terms-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2.5rem, 6vw, 6.5rem);
}

.terms-column + .terms-column {
  padding-left: clamp(2.5rem, 6vw, 6.5rem);
  border-left: 1px solid var(--border);
}

.terms-column > section {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: var(--stack-sm) var(--stack-sm);
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
}

.terms-column > section:first-child {
  padding-top: 0;
  border-top: none;
}

.terms-column > section > :not(.terms__topic-icon) {
  grid-column: 2;
}

.terms__topic-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-top: .05rem;
  color: var(--blue-primary);
  flex-shrink: 0;
}

.terms__topic-icon svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.terms-column h2 {
  grid-column: 2;
  align-self: center;
  margin: 0;
  color: var(--dark);
  font-size: clamp(.95rem, 1.3vw, 1.1rem);
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.terms-column p {
  margin: 0;
  color: var(--dark);
  font-size: clamp(.84rem, .95vw, .98rem);
  line-height: 1.65;
  max-width: 62ch;
}

.terms-column section p + p {
  margin-top: var(--space-2);
}

.terms-column strong {
  color: var(--blue-primary);
  font-weight: 800;
}

/* Terms List Styling */
.terms-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.terms-list__item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: var(--space-2);
  align-items: start;
}

.terms-list__item strong {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue-primary);
  font-size: .9rem;
  font-weight: 900;
  flex-shrink: 0;
}

.terms-list__item p {
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .terms-hero__art { right: var(--gutter); width: clamp(9rem, 27vw, 13rem); opacity: .68; }
  .terms-hero .hero__content { width: min(100%, 36rem); }
  .terms-columns { grid-template-columns: 1fr; }
  .terms-column + .terms-column { padding-top: var(--space-4); padding-left: 0; border-top: 1px solid var(--border); border-left: 0; }
}

@media (max-width: 600px) {
  .terms-hero {
    background-image: linear-gradient(90deg, rgba(0, 67, 161, .96), rgba(0, 122, 254, .68)), url('../hero_bg/terms_bg.png');
  }

  .terms-hero__art { display: none; }

  .terms-breadcrumb {
    margin-bottom: var(--space-2);
    font-size: .75rem;
  }

  .terms-column > section {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    padding-block: var(--space-3);
  }

  .terms-column > section > :not(.terms__topic-icon) {
    grid-column: 1;
  }

  .terms__topic-icon {
    grid-column: 1;
    grid-row: auto;
  }

  .terms-column h2 {
    grid-column: 1;
  }

  .terms-list__item {
    grid-template-columns: 1.75rem 1fr;
    gap: var(--space-2);
  }
}

/* Print Styles */
@media print {
  .terms-hero {
    background: var(--blue-primary);
    color: var(--white);
  }

  .terms-hero::before {
    display: none;
  }

  .terms-breadcrumb {
    display: none;
  }

  .terms-section {
    background: var(--white);
  }

  .terms-column > section {
    page-break-inside: avoid;
  }
}
