/* Privacy Policy + Terms & Conditions — shared styles for the legal pages
   (shared site styles: assets/css/style.css) */

/* ── PAGE HEADER ── */
.page-header {
  position: relative; min-height: 340px; padding: 56px 0; display: flex; align-items: center; overflow: hidden;
  background:
    radial-gradient(900px 380px at 88% 0%, rgba(var(--brand-rgb),0.18), transparent 62%),
    linear-gradient(120deg, var(--ink-deep) 0%, var(--ink) 55%, #16345A 100%);
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.045'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header::after {
  content: ''; position: absolute; right: 7%; top: 50%; width: 230px; height: 340px; transform: translateY(-50%) rotate(-8deg);
  background: url('../../img/dev-enterprises-logo-light.png') center/contain no-repeat; opacity: 0.07; pointer-events: none;
}
.page-header-content { position: relative; z-index: 1; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 16px; font-weight: 500; }
.breadcrumb a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep, .breadcrumb .current { color: var(--brand); }
.page-header-tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(var(--brand-rgb),0.18); border: 1px solid rgba(var(--brand-rgb),0.4); color: var(--brand-light); font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 16px; border-radius: 30px; margin-bottom: 18px; }
.page-header h1 { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(38px, 5.4vw, 62px); font-weight: 800; color: var(--white); line-height: 1.04; margin-bottom: 14px; }
.page-header h1 em { font-style: normal; color: var(--brand); }
.page-header p { font-size: 15.5px; color: rgba(255,255,255,0.78); max-width: 580px; line-height: 1.72; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.legal-meta span { font-size: 12.5px; color: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.04); padding: 6px 13px; border-radius: 30px; }
.legal-meta strong { color: var(--white); font-weight: 600; }

/* ── LAYOUT ── */
.legal { padding: 72px 0 90px; background: var(--white); }
.legal-grid { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 56px; align-items: start; }

/* ── TABLE OF CONTENTS ── */
.legal-toc { position: sticky; top: 96px; background: var(--gray-light); border: 1px solid #E4E9EF; border-radius: var(--radius-lg); padding: 22px 16px 18px; max-height: calc(100vh - 120px); overflow: auto; }
.legal-toc summary { display: none; }
.toc-title { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand); padding: 0 10px 12px; }
.legal-toc ol { list-style: none; counter-reset: toc; }
.legal-toc li a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 6px; font-size: 13.5px; line-height: 1.45; color: #4A5A6E; text-decoration: none; transition: background var(--transition), color var(--transition); }
.legal-toc li a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700; color: var(--gray-mid); min-width: 18px; }
.legal-toc li a:hover { background: var(--white); color: var(--ink); }
.legal-toc li a.active { background: var(--white); color: var(--brand-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.legal-toc li a.active::before { color: var(--brand); }
.toc-actions { border-top: 1px solid #E4E9EF; margin-top: 14px; padding: 14px 10px 0; display: flex; flex-direction: column; gap: 10px; }
.toc-print { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 13px 'Inter', sans-serif; color: var(--ink); background: var(--white); border: 1px solid #D3DAE2; border-radius: 6px; padding: 9px 12px; cursor: pointer; transition: border-color var(--transition), color var(--transition); }
.toc-print:hover { border-color: var(--brand); color: var(--brand-dark); }
.toc-other { font-size: 13px; font-weight: 600; color: var(--brand-dark); text-decoration: none; text-align: center; }
.toc-other:hover { text-decoration: underline; }

/* ── BODY ── */
.legal-body { max-width: 790px; min-width: 0; }
.glance { position: relative; background: var(--ink); color: rgba(255,255,255,0.86); border-radius: 14px; padding: 30px 32px 26px; margin-bottom: 52px; overflow: hidden; }
.glance::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-grad); }
.glance-title { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.glance-sub { font-size: 13.5px; color: rgba(255,255,255,0.6); margin-bottom: 18px; }
.glance ul { list-style: none; display: grid; gap: 12px; }
.glance li { position: relative; padding-left: 32px; font-size: 14.5px; line-height: 1.6; }
.glance li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; background: rgba(var(--brand-rgb),0.2); color: var(--brand-light); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.glance strong { color: var(--white); }
.glance a { color: var(--brand-light); }

.legal-section { scroll-margin-top: 100px; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid #ECF0F5; }
.legal-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.legal-section h2 { display: flex; align-items: baseline; gap: 14px; font-family: 'Barlow Condensed', sans-serif; font-size: 31px; font-weight: 800; line-height: 1.15; color: var(--ink); margin-bottom: 16px; }
.legal-section h2 .num { font-size: 15px; letter-spacing: 0.06em; color: var(--brand); min-width: 26px; }
.legal-section h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 24px 0 8px; }
.legal-section p { font-size: 15.5px; line-height: 1.8; color: #3A4A5E; margin-bottom: 14px; }
.legal-section ul { list-style: none; margin: 4px 0 16px; }
.legal-section li { position: relative; padding-left: 24px; margin-bottom: 9px; font-size: 15px; line-height: 1.72; color: #3A4A5E; }
.legal-section li::before { content: ''; position: absolute; left: 5px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.legal-section strong { color: var(--ink); font-weight: 600; }
.legal-section a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--brand-rgb),0.45); }
.legal-section a:hover { text-decoration-color: var(--brand-dark); }

.legal-note { background: #FFF4EC; border-left: 4px solid var(--brand); border-radius: 8px; padding: 15px 18px; margin: 18px 0; font-size: 14.5px; line-height: 1.7; color: #3A4A5E; }
.legal-note strong { color: var(--ink); }

/* data table (stacks into cards on phones) */
.legal-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #E4E9EF; border-radius: 10px; overflow: hidden; margin: 12px 0 18px; font-size: 14.5px; }
.legal-table th { background: var(--gray-light); color: var(--ink); text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid #E4E9EF; }
.legal-table td { padding: 13px 16px; vertical-align: top; color: #3A4A5E; line-height: 1.6; border-bottom: 1px solid #ECF0F5; }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table td:first-child { color: var(--ink); font-weight: 600; width: 42%; }

/* contact card */
.contact-card { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; background: var(--gray-light); border: 1px solid #E4E9EF; border-radius: var(--radius-lg); padding: 26px 28px; margin: 18px 0 8px; }
.cc-item .cc-label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.cc-item .cc-value { font-size: 15px; color: var(--ink); line-height: 1.55; word-break: break-word; }
.cc-item .cc-value a { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(var(--brand-rgb),0.5); }
.cc-wide { grid-column: 1 / -1; }

.legal-related { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 48px; padding: 22px 26px; border: 1px solid #E4E9EF; border-radius: var(--radius-lg); background: linear-gradient(120deg, #FFFFFF, #FDF3EA); }
.legal-related .lr-text { font-size: 14px; color: #4A5A6E; }
.legal-related .lr-text strong { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 22px; color: var(--ink); }
.btn-primary { background: var(--brand); color: var(--white); padding: 14px 30px; font-size: 14px; font-weight: 700; border-radius: 3px; text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; transition: background var(--transition), transform var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .legal-grid { grid-template-columns: 1fr; gap: 28px; }
  .legal-toc { position: static; max-height: none; padding: 0; background: var(--white); }
  .legal-toc summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; padding: 15px 18px; font-size: 14px; font-weight: 700; color: var(--ink); background: var(--gray-light); border-radius: var(--radius-lg); }
  .legal-toc summary::-webkit-details-marker { display: none; }
  .legal-toc summary::after { content: '▾'; color: var(--brand); transition: transform var(--transition); }
  .legal-toc[open] summary { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .legal-toc[open] summary::after { transform: rotate(180deg); }
  .legal-toc .toc-title { display: none; }
  .legal-toc ol { padding: 8px 8px 4px; }
  .toc-actions { padding: 12px 18px 16px; }
  .legal-body { max-width: none; }
  .page-header::after { right: -40px; opacity: 0.05; }
}
@media (max-width: 768px) {
  .page-header { min-height: 260px; padding: 40px 0; }
  .legal { padding: 44px 0 64px; }
  .glance { padding: 24px 22px 20px; margin-bottom: 40px; }
  .legal-section h2 { font-size: 26px; gap: 10px; }
  .legal-section { padding-bottom: 32px; margin-bottom: 32px; }
}
@media (max-width: 640px) {
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table thead { display: none; }
  .legal-table tr { border-bottom: 1px solid #E4E9EF; padding: 10px 0; }
  .legal-table tr:last-child { border-bottom: none; }
  .legal-table td { border: none; padding: 4px 16px; }
  .legal-table td:first-child { width: 100%; }
  .legal-table td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-mid); margin-bottom: 2px; }
  .contact-card { grid-template-columns: 1fr; padding: 22px; }
  .page-header::after { display: none; }
}

/* ── PRINT / SAVE AS PDF ── */
@media print {
  .topbar, nav, footer, .back-top, .legal-toc, .legal-related, .sample-tag, .fill-in::after { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .page-header { min-height: 0; padding: 0 0 14px; background: none !important; border-bottom: 2px solid #000; }
  .page-header::before, .page-header::after, .page-header-tag, .breadcrumb { display: none !important; }
  .page-header h1, .page-header p, .legal-meta span, .legal-meta strong { color: #000 !important; }
  .page-header h1 em { background: none !important; color: #000 !important; -webkit-text-fill-color: #000 !important; }
  .legal-meta span { border-color: #999; }
  .legal { padding: 18px 0 0; }
  .legal-grid { display: block; }
  .legal-body { max-width: none; }
  .glance { background: #fff !important; color: #000; border: 1px solid #999; }
  .glance::before { display: none; }
  .glance-title, .glance strong, .glance-sub, .glance a { color: #000 !important; }
  .glance li::before { background: none; color: #000; border: 1px solid #000; }
  .legal-section { break-inside: auto; border-color: #ccc; }
  .legal-section h2 { break-after: avoid; }
  .legal-section p, .legal-section li, .legal-table td { color: #000; }
  .legal-section a, .cc-item .cc-value a { color: #000; text-decoration: none; }
  .contact-card, .legal-note { background: #fff; border: 1px solid #999; }
}
