/* Legal pages (Terms & Conditions, Privacy Policy) */

html { scroll-padding-top: 90px; }

/* ===== Hero (interior page) ===== */
.legal-hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy), var(--charcoal));
  padding: 60px 0 70px;
  overflow: hidden;
  color: var(--white);
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(232,100,44,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.legal-hero-content {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.legal-hero .breadcrumb {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}
.legal-hero .breadcrumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.legal-hero .breadcrumb a:hover { color: var(--white); text-decoration: none; }
.legal-hero .breadcrumb-sep { margin: 0 8px; color: rgba(255,255,255,0.35); }
.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 14px;
}
.legal-hero-subhead {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
  margin: 0 auto 24px;
  max-width: 620px;
}
.legal-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
}
.legal-hero-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

/* ===== Content layout ===== */
.legal-wrap {
  background: var(--off-white);
  padding: 72px 0 100px;
}
.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: flex-start;
}

/* ===== Desktop TOC rail ===== */
.toc {
  position: sticky;
  top: 96px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.toc-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  margin: 0;
}
.toc-list a {
  display: block;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--gray-600);
  padding: 7px 10px;
  border-radius: 6px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  line-height: 1.4;
}
.toc-list a:hover {
  color: var(--navy);
  background: var(--gray-50);
  text-decoration: none;
}
.toc-list a.active {
  color: var(--orange);
  background: var(--orange-light);
  border-left-color: var(--orange);
  font-weight: 600;
}
.toc-list .toc-num {
  display: inline-block;
  min-width: 22px;
  color: var(--gray-400);
  font-weight: 600;
  font-size: 0.78rem;
}
.toc-list a.active .toc-num { color: var(--orange); }

.toc-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.toc-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  text-decoration: none;
}
.toc-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }

/* ===== Mobile TOC ===== */
.toc-mobile {
  display: none;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}
.toc-mobile-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--white);
  border: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.toc-mobile-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--gray-400);
  stroke-width: 2;
  fill: none;
  transition: transform 0.2s;
}
.toc-mobile.open .toc-mobile-btn svg { transform: rotate(180deg); }
.toc-mobile-panel {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--gray-100);
}
.toc-mobile.open .toc-mobile-panel { display: block; }
.toc-mobile-panel ol {
  list-style: none;
  padding: 12px 0 0;
  margin: 0;
}
.toc-mobile-panel a {
  display: block;
  padding: 10px 0;
  font-size: 0.92rem;
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-100);
}
.toc-mobile-panel li:last-child a { border-bottom: none; }

/* ===== Article ===== */
.legal-article {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 56px 64px;
  box-shadow: var(--shadow-sm);
}

.notice-card {
  background: var(--orange-light);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 40px;
}
.notice-card h2 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}
.notice-card p {
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--gray-800);
  margin-bottom: 10px;
}
.notice-card p:last-child { margin-bottom: 0; }
.notice-card strong { font-weight: 700; color: var(--navy); }

.summary-card {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.summary-card h2 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.summary-card p.intro {
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--gray-800);
  margin-bottom: 14px;
}
.summary-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  padding: 0;
  margin: 0;
}
.summary-list li {
  position: relative;
  padding-left: 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--gray-800);
}
.summary-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--teal);
  border-radius: 50%;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M6 11.5l-3-3 1.4-1.4L6 8.7l5.6-5.6L13 4.5z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M6 11.5l-3-3 1.4-1.4L6 8.7l5.6-5.6L13 4.5z'/></svg>") center/contain no-repeat;
}
.summary-list li strong { color: var(--navy); font-weight: 700; }

.intro-para {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gray-800);
  margin-bottom: 16px;
}
.intro-para strong { color: var(--navy); font-weight: 700; }

.legal-section {
  margin-top: 48px;
  scroll-margin-top: 90px;
}
.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.legal-section h2 .sec-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--orange);
  min-width: 36px;
}
.legal-section h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 24px;
  margin-bottom: 10px;
}
.legal-section h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-top: 18px;
  margin-bottom: 6px;
}
.legal-section p {
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--gray-800);
  margin-bottom: 14px;
}
.legal-section p.emphasis {
  background: var(--gray-50);
  border-left: 3px solid var(--navy);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  font-weight: 500;
  color: var(--navy);
  font-size: 0.92rem;
}
.legal-section ul,
.legal-section ol {
  margin: 0 0 16px 24px;
  padding: 0;
}
.legal-section li {
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--gray-800);
  margin-bottom: 8px;
  padding-left: 6px;
}
.legal-section strong { color: var(--navy); font-weight: 700; }
.legal-section em { font-style: italic; }

.defs-list {
  list-style: none !important;
  margin: 0 !important;
}
.defs-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  margin: 0 !important;
}
.defs-list li:last-child { border-bottom: none; }
.defs-list strong {
  display: inline;
  color: var(--navy);
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table th {
  background: var(--gray-50);
  text-align: left;
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--gray-100);
}
.data-table td {
  padding: 12px 16px;
  vertical-align: top;
  line-height: 1.6;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child {
  font-weight: 700;
  color: var(--navy);
  width: 30%;
  white-space: nowrap;
}

.rights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.right-chip {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
}
.right-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.right-chip span {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--gray-600);
}

.contact-card {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-top: 20px;
  color: var(--white);
}
.contact-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 12px;
}
.contact-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
  margin-bottom: 4px;
}
.contact-card p strong { color: var(--white); }
.contact-card a {
  color: var(--orange);
  font-weight: 600;
}

.acknowledgement {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--navy);
  text-align: center;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s;
  z-index: 50;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--orange);
  transform: translateY(-2px);
}
.back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== CTA banner ===== */
.legal-cta-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.legal-cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 70% at 20% 50%, rgba(232,100,44,0.08) 0%, transparent 70%);
}
.legal-cta-inner {
  position: relative;
  text-align: center;
}
.legal-cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.legal-cta-banner p {
  font-size: 1.02rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.legal-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Sticky mobile CTA ===== */
.sticky-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  box-shadow: 0 -4px 16px rgba(15,31,61,0.08);
  padding: 12px 20px;
  z-index: 90;
  transition: transform 0.3s ease;
}
.sticky-cta-bar.hidden { transform: translateY(100%); }
.sticky-cta-bar .btn-primary { width: 100%; justify-content: center; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 240px 1fr;
    gap: 40px;
  }
  .legal-article { padding: 48px; }
}

@media (max-width: 860px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc { display: none; }
  .toc-mobile { display: block; }
}

@media (max-width: 768px) {
  body { padding-bottom: 70px; }
  .legal-hero { padding: 48px 0 56px; }
  .legal-wrap { padding: 40px 0 72px; }
  .legal-article { padding: 32px 24px; }
  .legal-section h2 { font-size: 1.2rem; flex-direction: column; gap: 6px; align-items: flex-start; }
  .notice-card { padding: 18px 20px; }
  .legal-cta-banner { padding: 64px 0; }
  .legal-cta-actions { flex-direction: column; }
  .legal-cta-actions .btn-primary,
  .legal-cta-actions .btn-outline { width: 100%; justify-content: center; }
  .sticky-cta-bar { display: block; }
  .back-to-top { bottom: 84px; }
}

@media (max-width: 640px) {
  .summary-list { grid-template-columns: 1fr; }
  .data-table td:first-child { white-space: normal; }
  .data-table th, .data-table td { padding: 10px 12px; font-size: 0.88rem; }
  .rights-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .legal-article { padding: 28px 20px; }
}
