/* ================================================================
   TERMS & CONDITIONS PAGE
   ================================================================ */

/* ===== HERO ===== */
.terms-hero {
  padding-top: 100px;
  background: var(--color-bg);
}

/* Match footer's 1600px width */
.terms-hero .container {
  max-width: 1600px;
}

/* Positioning context — image sets the natural height */
.terms-hero__frame {
  position: relative;
}

/* Image displayed at natural dimensions; rounded corners come from the PNG itself */
.terms-hero__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Title overlay — mirrors the image's built-in padding (100px h, 150px v) */
.terms-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-inline: 100px;
  padding-block: 150px;
}

.terms-hero__title {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5.3125rem); /* 85px max */
  line-height: 1.0;
  color: #ffffff;
  max-width: 52%;
}

.terms-hero__line--accent {
  color: #FFC10F;
}

@media (max-width: 767px) {
  .terms-hero {
    padding-top: 80px;
  }

  .terms-hero__content {
    padding-inline: 28px;
    padding-block: 40px;
  }

  .terms-hero__title {
    max-width: 100%;
  }
}


/* ===== CONTENT AREA ===== */
.terms-content {
  padding-block: var(--space-16) var(--space-20);
  background: var(--color-bg);
}

.terms-body {
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--color-text);
}


/* ===== RENDERED MARKDOWN ELEMENTS ===== */

.terms-body h1 {
  font-family: var(--font-body);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-16);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-purple-light);
  line-height: 1.2;
}

.terms-body h1:first-child {
  margin-top: 0;
}

.terms-body h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.terms-body h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-purple-dark);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.terms-body p {
  margin-bottom: var(--space-4);
}

.terms-body ul,
.terms-body ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.terms-body li {
  margin-bottom: var(--space-2);
}

.terms-body strong {
  font-weight: 600;
}

.terms-body em {
  font-style: italic;
}

.terms-body code {
  font-family: 'Courier New', monospace;
  background: var(--color-purple-light);
  color: var(--color-purple-dark);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

.terms-body a {
  color: var(--color-purple);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms-body a:hover {
  color: var(--color-purple-dark);
}

.terms-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-14);
}

/* Blockquotes (used for sensitive-data warnings in the markdown) */
.terms-body blockquote {
  border-left: 4px solid var(--color-purple);
  background: var(--color-purple-bg);
  padding: var(--space-4) var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-block: var(--space-4);
  font-size: 0.9375rem;
}

.terms-body blockquote p {
  margin-bottom: 0;
}

/* Tables */
.terms-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-6);
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.terms-body thead {
  background: var(--color-purple-light);
}

.terms-body th {
  font-weight: 600;
  color: var(--color-purple-dark);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border: 1px solid var(--color-border);
  white-space: nowrap;
}

.terms-body td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border: 1px solid var(--color-border);
  vertical-align: top;
}

.terms-body tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}


/* ===== LOADING SKELETON ===== */
.terms-loading {
  padding-block: var(--space-4);
}

.skeleton {
  display: block;
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    #eeeeee 25%,
    #e0e0e0 50%,
    #eeeeee 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== ERROR STATE ===== */
.terms-error {
  text-align: center;
  padding-block: var(--space-12);
  color: var(--color-text-muted);
  font-size: 1rem;
}

.terms-error__retry {
  display: inline-block;
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-6);
  background: var(--color-purple);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.terms-error__retry:hover {
  background: var(--color-purple-dark);
}


/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: #e0e0e0;
  }
}
