/* ========================================
   TERMS OF SERVICE PAGE — Deck&Co
   Scoped under .deckco-terms
   ======================================== */

/* ---- PAGE HERO (Interior pages) ---- */

.deckco-terms .page-hero {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 100px);
  background: var(--forest-dark);
  overflow: hidden;
}

.deckco-terms .page-hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(44,59,43,0.88) 0%, rgba(26,26,26,0.72) 50%, rgba(44,59,43,0.65) 100%),
    url('../images/terms/hero.webp') center/cover no-repeat;
}

.deckco-terms .page-hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 1px,
    rgba(255,255,255,0.03) 1px,
    rgba(255,255,255,0.03) 2px
  );
}

.deckco-terms .page-hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.deckco-terms .page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}

.deckco-terms .page-hero__breadcrumb a {
  color: rgba(255,255,255,0.5);
  transition: color 0.3s;
}

.deckco-terms .page-hero__breadcrumb a:hover {
  color: rgba(255,255,255,0.8);
}

.deckco-terms .page-hero__breadcrumb svg {
  width: 12px;
  height: 12px;
  opacity: 0.4;
}

.deckco-terms .page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.deckco-terms .page-hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--sand-light);
}

.deckco-terms .page-hero__subtitle {
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
}

/* ---- POLICY LAYOUT ---- */

.deckco-terms .policy {
  padding: var(--section-pad) 0;
}

.deckco-terms .policy__layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(48px, 6vw, 80px);
  align-items: start;
}

/* -- Sidebar TOC -- */

.deckco-terms .policy__sidebar {
  position: sticky;
  top: 96px;
}

.deckco-terms .policy__toc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.deckco-terms .policy__toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.deckco-terms .policy__toc-link {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  padding: 8px 16px;
  border-left: 2px solid transparent;
  transition: all 0.3s var(--ease);
  line-height: 1.4;
}

.deckco-terms .policy__toc-link:hover {
  color: var(--charcoal);
  border-left-color: var(--border);
}

.deckco-terms .policy__toc-link.active {
  color: var(--forest);
  font-weight: 500;
  border-left-color: var(--forest);
  background: rgba(58, 78, 57, 0.04);
}

/* -- Main Content -- */

.deckco-terms .policy__content {
  max-width: 720px;
}

.deckco-terms .policy__updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 10px 20px;
  background: var(--sand-pale);
  border-radius: 2px;
  margin-bottom: 40px;
}

.deckco-terms .policy__updated svg {
  width: 14px;
  height: 14px;
  color: var(--sand);
  flex-shrink: 0;
}

.deckco-terms .policy__intro {
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 300;
  line-height: 1.85;
  color: var(--charcoal-soft);
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

/* -- Policy Sections -- */

.deckco-terms .policy__section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 100px;
}

.deckco-terms .policy__section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.deckco-terms .policy__section-number {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--sand);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.deckco-terms .policy__section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.25;
  margin-bottom: 20px;
}

.deckco-terms .policy__text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--charcoal-soft);
  margin-bottom: 16px;
}

.deckco-terms .policy__text:last-child {
  margin-bottom: 0;
}

.deckco-terms .policy__text a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(58, 78, 57, 0.3);
  transition: text-decoration-color 0.3s var(--ease);
}

.deckco-terms .policy__text a:hover {
  text-decoration-color: var(--forest);
}

.deckco-terms .policy__text strong {
  font-weight: 600;
  color: var(--charcoal);
}

/* -- Lists -- */

.deckco-terms .policy__list {
  list-style: none;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deckco-terms .policy__list li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--charcoal-soft);
  padding-left: 28px;
  position: relative;
}

.deckco-terms .policy__list li::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--forest);
  opacity: 0.5;
  position: absolute;
  left: 0;
  top: 13px;
}

.deckco-terms .policy__list li strong {
  font-weight: 600;
  color: var(--charcoal);
}

/* -- Sub-headings -- */

.deckco-terms .policy__sub-heading {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: 24px;
  margin-bottom: 12px;
}

/* -- Privacy Link -- */

.deckco-terms .policy__privacy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--forest);
  margin-top: 12px;
  transition: gap 0.3s var(--ease);
}

.deckco-terms .policy__privacy-link:hover {
  gap: 10px;
}

.deckco-terms .policy__privacy-link svg {
  width: 16px;
  height: 16px;
}

/* ---- CONTACT CTA ---- */

.deckco-terms .policy-cta {
  padding: var(--section-pad-sm) 0;
  background: var(--sand-pale);
}

.deckco-terms .policy-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(32px, 6vw, 80px);
}

.deckco-terms .policy-cta__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(58, 78, 57, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.deckco-terms .policy-cta__icon svg {
  width: 22px;
  height: 22px;
  color: var(--forest);
}

.deckco-terms .policy-cta__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.deckco-terms .policy-cta__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 300;
  color: var(--charcoal);
  margin: 8px 0 12px;
}

.deckco-terms .policy-cta__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 460px;
}

.deckco-terms .policy-cta__actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 1024px) {
  .deckco-terms .policy__layout {
    grid-template-columns: 200px 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .deckco-terms .policy__layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .deckco-terms .policy__sidebar {
    position: relative;
    top: 0;
    margin-bottom: 40px;
  }

  .deckco-terms .policy__toc-label {
    display: none;
  }

  .deckco-terms .policy__toc {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 32px;
    border-bottom: 1px solid var(--border);
  }

  .deckco-terms .policy__toc-link {
    font-size: 12px;
    padding: 7px 16px;
    border-left: none;
    border: 1px solid var(--border);
    border-radius: 100px;
    white-space: nowrap;
  }

  .deckco-terms .policy__toc-link:hover {
    border-color: var(--forest);
    color: var(--forest);
    background: transparent;
  }

  .deckco-terms .policy__toc-link.active {
    background: var(--forest);
    color: #fff;
    border-color: var(--forest);
    border-left-color: var(--forest);
  }
}

@media (max-width: 768px) {
  .deckco-terms .page-hero {
    padding: clamp(60px, 10vw, 100px) 0 clamp(40px, 6vw, 70px);
  }

  .deckco-terms .page-hero__title {
    font-size: clamp(28px, 7vw, 44px);
  }

  .deckco-terms .policy__section {
    margin-bottom: 36px;
    padding-bottom: 36px;
  }

  .deckco-terms .policy__section-title {
    font-size: clamp(20px, 5vw, 26px);
  }

  .deckco-terms .policy__text,
  .deckco-terms .policy__list li {
    font-size: 14px;
    line-height: 1.75;
  }

  .deckco-terms .policy-cta__inner {
    flex-direction: column;
    text-align: center;
  }

  .deckco-terms .policy-cta__icon {
    margin: 0 auto 16px;
  }

  .deckco-terms .policy-cta__body {
    max-width: none;
  }

  .deckco-terms .policy-cta__actions {
    flex-direction: column;
    width: 100%;
  }

  .deckco-terms .policy-cta__actions .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .deckco-terms .policy__toc {
    gap: 6px;
  }

  .deckco-terms .policy__toc-link {
    font-size: 11px;
    padding: 5px 12px;
  }
}
