/* Terms page styles */
.terms-page {
  padding-block: var(--space-section);
}

.terms-container {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.terms-section {
  margin-block-end: var(--space-xxl);
  position: relative;
}

.terms-section:last-child {
  margin-block-end: 0;
}

.terms-section h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  margin-block-end: var(--space-md);
}

.terms-section h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  margin-block-end: var(--space-sm);
}

.terms-copy {
  max-width: 65ch;
  text-align: left;
}

.terms-copy p,
.terms-copy ul,
.terms-copy ol,
.terms-copy dl {
  margin-block-end: var(--space-md);
}

.terms-copy ul,
.terms-copy ol {
  padding-inline-start: var(--space-lg);
}

.terms-copy li {
  margin-block-end: var(--space-xs);
}

/* Introduction section */
.terms-intro {
  padding-block-start: var(--space-lg);
}

.terms-heading-block {
  position: relative;
  margin-block-end: var(--space-lg);
}

.terms-heading-block::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 40px;
  height: 2px;
  background-color: var(--color-coral);
  transform: translateY(-50%);
}

.terms-intro h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  margin-block-end: var(--space-sm);
}

.terms-intro h2 {
  margin-block-end: 0;
}

.terms-callout {
  background-color: var(--color-warm-sand);
  border-inline-start: 4px solid var(--color-coral);
  padding: var(--space-md);
  border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
  margin-block-start: var(--space-lg);
  max-width: 65ch;
}

.terms-callout p {
  margin-block-end: 0;
}

/* Definitions */
.terms-definition-list {
  list-style: none;
  padding-inline-start: 0;
  margin-block-end: 0;
}

.terms-definition-item {
  padding-block: var(--space-sm);
  border-block-end: 1px solid rgba(0, 0, 0, 0.1);
}

.terms-definition-item:last-child {
  border-block-end: none;
}

.terms-definition-item dt {
  font-weight: 700;
  font-family: var(--font-heading);
  margin-block-end: var(--space-xs);
}

.terms-definition-item dd {
  margin-inline-start: 0;
  line-height: var(--leading-body);
}

/* Use of website */
.terms-use-subsections {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.terms-use-subsection {
  width: 100%;
  min-width: 0;
}

.terms-permitted {
  padding-block-end: var(--space-lg);
  border-block-end: 1px solid rgba(0, 0, 0, 0.1);
}

.terms-prohibited {
  border-inline-start: 3px solid var(--color-burgundy);
  padding-inline-start: var(--space-md);
}

/* Intellectual property */
.terms-ip {
  position: relative;
}

.terms-copyright-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background-color: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-small);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  margin-block-start: var(--space-md);
}

.terms-copyright-symbol {
  font-size: var(--text-body);
  font-weight: 700;
}

.terms-copyright-year {
  font-weight: 700;
}

/* Disclaimer of warranties */
.terms-disclaimer-box {
  background-color: var(--color-warm-sand);
  border-inline-start: 4px solid var(--color-coral);
  padding: var(--space-md);
  border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
}

.terms-disclaimer-box .terms-copy {
  max-width: none;
}

/* Limitation of liability */
.terms-liability-copy {
  border-block-end: 3px solid var(--color-burgundy);
  padding-block-end: var(--space-md);
}

/* Governing law */
.terms-law {
  position: relative;
}

.terms-law::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background-color: var(--color-eucalyptus);
  clip-path: polygon(0 0, 100% 0, 100% 80%, 80% 100%, 0 100%);
  opacity: 0.3;
}

/* Changes to terms */
.terms-date-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-small);
  font-size: var(--text-label);
  line-height: var(--leading-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-block-start: var(--space-md);
}

.terms-date-tag-cobalt {
  background-color: var(--color-cobalt);
  color: var(--color-white);
}

.terms-date-tag-eucalyptus {
  background-color: var(--color-eucalyptus);
  color: var(--color-ink);
}

.terms-date-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 2px;
  position: relative;
}

.terms-date-icon::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 2px;
  width: 4px;
  height: 4px;
  background-color: currentColor;
  border-radius: 50%;
}

/* Contact information */
.terms-contact-card {
  background-color: var(--color-cobalt);
  color: var(--color-white);
  border-radius: var(--radius-medium);
  padding: var(--space-lg);
}

.terms-contact-content {
  max-width: 65ch;
}

.terms-contact-content p {
  margin-block-end: var(--space-md);
}

.terms-contact-list {
  list-style: none;
  padding-inline-start: 0;
  margin-block-end: 0;
}

.terms-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-block-end: var(--space-sm);
}

.terms-contact-list li:last-child {
  margin-block-end: 0;
}

.terms-contact-list a {
  color: var(--color-white);
  text-decoration: underline;
}

.terms-contact-list a:hover {
  color: var(--color-coral);
}

.terms-contact-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-block-start: 2px;
  position: relative;
}

.terms-phone-icon::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.terms-email-icon::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 1px;
  width: 14px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.terms-address-icon::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 4px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

/* Effective date */
.terms-effective {
  margin-block-end: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .terms-container {
    padding-inline: var(--space-md);
  }

  .terms-heading-block::after {
    width: 24px;
  }

  .terms-callout,
  .terms-disclaimer-box {
    padding: var(--space-sm);
  }

  .terms-contact-card {
    padding: var(--space-md);
  }

  .terms-copy {
    max-width: none;
  }

  .terms-callout {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .terms-section {
    margin-block-end: var(--space-xl);
  }

  .terms-intro h1 {
    font-size: var(--text-h1);
  }

  .terms-heading-block::after {
    display: none;
  }

  .terms-contact-list li {
    flex-direction: column;
    gap: var(--space-xs);
  }
}
