/* Page-owned styles for Terms and Conditions */

.terms-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  padding-block: var(--space-3xl);
}

/* Hero */
.terms-hero {
  background-color: var(--color-sky-blue);
  color: var(--color-charcoal);
}

.terms-hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding-desktop);
}

.terms-hero__heading-block {
  width: 100%;
  max-width: 1200px;
}

.terms-hero__heading-block h1 {
  margin-block-end: var(--space-md);
  position: relative;
  padding-block-end: var(--space-sm);
}

.terms-hero__heading-block h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--color-carrot-orange);
  margin-block-start: var(--space-sm);
}

.terms-hero__lead {
  max-width: 70ch;
  margin-block-end: var(--space-md);
}

.terms-hero__supporting {
  max-width: 70ch;
  margin-block-end: 0;
}

.terms-hero__effective-date-box {
  background-color: var(--color-warm-cream);
  border: var(--border-structural);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  max-width: 600px;
  width: 100%;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.terms-hero__effective-date {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  margin-block-end: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.terms-hero__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--color-grass-green);
  color: var(--color-white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.terms-hero__effective-note {
  font-size: var(--text-small);
  line-height: var(--leading-small);
  margin-block-end: 0;
}

/* Sections */
.terms-section {
  background-color: var(--color-warm-cream);
}

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

.terms-section__block {
  background-color: var(--color-warm-cream);
  padding: var(--space-xl);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.terms-section__block--taped {
  border: var(--border-structural);
  position: relative;
  box-shadow: var(--shadow-taped);
  transform: rotate(1deg);
}

.terms-section__block--taped::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -20px;
  width: 80px;
  height: 24px;
  background-color: rgba(253, 246, 227, 0.75);
  border: 1px dashed rgba(46, 46, 46, 0.3);
  transform: rotate(-35deg);
  z-index: 1;
}

.terms-section__block--dashed {
  border: var(--border-dashed);
}

.terms-section__block--solid {
  border: var(--border-structural);
}

.terms-section__block h2 {
  margin-block-end: var(--space-sm);
}

.terms-section__block h3 {
  margin-block-end: var(--space-sm);
}

.terms-section__block p {
  max-width: 70ch;
  margin-block-end: var(--space-md);
}

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

.terms-section__block ul,
.terms-section__block ol {
  max-width: 70ch;
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-lg);
}

.terms-section__block ul:last-child,
.terms-section__block ol:last-child {
  margin-block-end: 0;
}

.terms-list {
  list-style-position: outside;
}

.terms-list--numbered {
  list-style-type: decimal;
}

.terms-list--carrot {
  list-style: none;
  padding-inline-start: 0;
}

.terms-list--carrot li {
  position: relative;
  padding-inline-start: var(--space-xl);
  margin-block-end: var(--space-sm);
}

.terms-list--carrot li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 0;
  height: 0;
  border-inline-start: 7px solid transparent;
  border-inline-end: 7px solid transparent;
  border-block-end: 14px solid var(--color-carrot-orange);
}

.terms-list--check {
  list-style: none;
  padding-inline-start: 0;
}

.terms-list--check li {
  position: relative;
  padding-inline-start: var(--space-xl);
  margin-block-end: var(--space-sm);
}

.terms-list--check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: var(--color-grass-green);
  color: var(--color-white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
}

.terms-list--prohibited {
  list-style: none;
  padding-inline-start: 0;
}

.terms-list--prohibited li {
  position: relative;
  padding-inline-start: var(--space-xl);
  margin-block-end: var(--space-sm);
}

.terms-list--prohibited li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: var(--color-red-accent);
  color: var(--color-white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
}

.terms-list--plain {
  list-style: disc;
}

.terms-verified {
  position: relative;
  padding-inline-start: var(--space-xl);
}

.terms-verified::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--color-grass-green);
  color: var(--color-white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
}

.terms-trademark-note {
  border-inline-start: 4px solid var(--color-red-accent);
  border-radius: var(--radius-input);
  padding: var(--space-md);
  background-color: var(--color-warm-cream);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

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

.terms-trademark-note ul {
  margin-block-end: 0;
}

.terms-disclaimer {
  border-inline-start: 4px solid var(--color-red-accent);
  border-radius: var(--radius-input);
  padding: var(--space-md);
  background-color: var(--color-warm-cream);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

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

.terms-disclaimer ul {
  margin-block-end: 0;
}

.terms-changes-callout {
  border-inline-start: 4px solid var(--color-red-accent);
  border-radius: var(--radius-input);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-warm-cream);
  font-family: var(--font-heading);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

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

/* Contact grid */
.terms-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  max-width: 70ch;
}

.terms-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  min-width: 0;
  background-color: var(--color-white);
  border: var(--border-structural);
  border-radius: var(--radius-card);
  padding: var(--space-md);
}

.terms-contact-item--address {
  grid-column: 1 / -1;
}

.terms-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--color-grass-green);
  color: var(--color-white);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.terms-contact-item span:last-child {
  min-width: 0;
  overflow-wrap: break-word;
}

.terms-contact-item a {
  color: var(--color-charcoal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.terms-contact-item a:hover {
  color: var(--color-carrot-orange-dark);
}

/* Acceptance statement */
.terms-section--acceptance-statement {
  background-color: var(--color-sky-blue);
}

.terms-acceptance-box {
  background-color: var(--color-carrot-orange);
  color: var(--color-white);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
}

.terms-acceptance-box::after {
  content: "";
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 2px;
  background-color: var(--color-charcoal);
}

.terms-acceptance-box::before {
  content: "";
  position: absolute;
  right: -41px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-inline-start: 8px solid var(--color-charcoal);
  border-block-start: 5px solid transparent;
  border-block-end: 5px solid transparent;
}

.terms-acceptance-box h2 {
  color: var(--color-white);
  margin-block-end: 0;
}

.terms-acceptance-box p {
  color: var(--color-white);
  max-width: 60ch;
  margin-inline: auto;
  margin-block-end: 0;
}

/* Responsive */
@media (max-width: 1199px) {
  .terms-hero__inner {
    padding-inline: var(--container-padding-tablet);
  }

  .terms-section__inner {
    padding-inline: var(--container-padding-tablet);
  }

  .terms-section__block--taped {
    transform: rotate(0.5deg);
  }
}

@media (max-width: 767px) {
  .terms-main {
    gap: var(--space-xl);
    padding-block: var(--space-2xl);
  }

  .terms-hero__inner {
    padding-inline: var(--container-padding-mobile);
    gap: var(--space-lg);
  }

  .terms-hero__heading-block h1 {
    font-size: 1.9rem;
    line-height: 1.25;
  }

  .terms-hero__effective-date-box {
    max-width: 100%;
    padding: var(--space-md);
  }

  .terms-section__inner {
    padding-inline: var(--container-padding-mobile);
  }

  .terms-section__block {
    padding: var(--space-lg);
  }

  .terms-section__block--taped {
    transform: rotate(0deg);
  }

  .terms-section__block--taped::before {
    width: 60px;
    height: 18px;
    top: -8px;
    left: -12px;
  }

  .terms-contact-grid {
    grid-template-columns: 1fr;
  }

  .terms-contact-item--address {
    grid-column: auto;
  }

  .terms-acceptance-box {
    max-width: 100%;
    padding: var(--space-lg);
  }

  .terms-acceptance-box::after,
  .terms-acceptance-box::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terms-section__block--taped {
    transform: rotate(0deg);
  }
}
