/* Legal pages (page-legal.php). Builds on assets/wp-chennai/wpc.css.
   Sizes are in px because the theme sets html{font-size:62.5%}. */

/* Hero: shorter than the service pages, text first */
.wpc-legal-hero { min-height: 0; padding: 40px 0 88px; }
.wpc-legal-hero > .wpc-wrap { width: 100%; z-index: 3; }
.wpc-legal-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; align-items: center; }
.wpc-legal-hero .wpc-lead { max-width: 700px; margin-bottom: 26px; }
.wpc .wpc-legal-date { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 9px 16px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line-d); font-size: 14.5px; color: #d0d5e3; }
.wpc-legal-date strong { color: #fff; font-weight: 600; }
.wpc-legal-date .wpc-i { color: var(--peach); }
.wpc .wpc-legal-chips { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14.5px; color: #d0d5e3; }
.wpc-legal-chips li { display: flex; align-items: center; gap: 8px; }
.wpc-legal-chips .wpc-i { color: #34d399; }
.wpc-legal-badge { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 34px 30px; border-radius: var(--r); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-d); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.wpc-legal-badge .wpc-card-i { width: 64px; height: 64px; font-size: 28px; margin-bottom: 18px; }
.wpc-legal-badge b { font-family: var(--display); font-size: 21px; font-weight: 650; letter-spacing: -.015em; color: #fff; }
.wpc-legal-badge small { font-size: 14px; color: #8e97b0; }

/* Policy: sticky contents + readable text */
.wpc-legal-main { padding: 96px 0 112px; }
.wpc-legal-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 72px; align-items: start; }
.wpc-legal-side { position: sticky; top: 96px; display: grid; gap: 18px; max-height: calc(100vh - 120px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.wpc-legal-toc { padding: 24px 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.wpc .wpc-legal-toc .wpc-kicker { margin-bottom: 12px; font-size: 12.5px; }
.wpc .wpc-legal-toc ol { display: grid; gap: 2px; }
.wpc .wpc-legal-toc a { display: block; padding: 7px 12px; border-left: 2px solid var(--line); font-size: 14.5px; line-height: 1.4; color: var(--body); text-decoration: none; transition: color .2s, border-color .2s, background .2s; }
.wpc .wpc-legal-toc a:hover { color: var(--ink); border-left-color: #c9c3e6; }
.wpc .wpc-legal-toc a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--pink); background: linear-gradient(90deg, rgba(255, 77, 141, .08), transparent); }
.wpc-legal-help { padding: 20px 22px; border-radius: 20px; background: var(--tint); font-size: 14.5px; }
.wpc-legal-help b { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 17px; color: var(--ink); }
.wpc .wpc-legal-help p { margin: 0; }

.wpc-legal-body { max-width: 820px; min-width: 0; font-size: 17px; line-height: 1.75; }
.wpc-legal-body > :first-child { margin-top: 0; }
.wpc .wpc-legal-body > p:first-of-type { font-size: 18.5px; color: var(--ink); }
.wpc .wpc-legal-body h2 { margin: 64px 0 18px; padding-top: 40px; border-top: 1px solid var(--line); font-size: clamp(26px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -.025em; scroll-margin-top: 90px; }
.wpc .wpc-legal-body h3 { margin: 32px 0 12px; font-size: 20px; }
.wpc .wpc-legal-body p { margin: 0 0 18px; }
.wpc .wpc-legal-body strong { color: var(--ink); font-weight: 600; }
.wpc .wpc-legal-body a { color: var(--orange-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.wpc .wpc-legal-body a:hover { color: #d91f68; }
.wpc .wpc-legal-body ul, .wpc .wpc-legal-body ol { display: grid; gap: 10px; margin: 0 0 22px; }
.wpc .wpc-legal-body ul ul { margin: 12px 0 4px; gap: 8px; }
.wpc-legal-body ul > li { position: relative; padding-left: 24px; }
.wpc-legal-body ul > li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--grad-deep); }
.wpc-legal-body ul ul > li::before { width: 6px; height: 6px; background: #fff; border: 1.5px solid #d91f68; }
.wpc-legal-body ol { counter-reset: legal; }
.wpc-legal-body ol > li { position: relative; padding-left: 40px; counter-increment: legal; }
.wpc-legal-body ol > li::before { content: counter(legal); position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--tint); font-size: 13px; font-weight: 700; line-height: 1; color: #5a35d6; }
.wpc .wpc-legal-body code { padding: 1px 6px; border-radius: 6px; background: var(--tint); font: 500 13.5px/1.6 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); overflow-wrap: anywhere; }

/* Tables scroll sideways on small screens */
.wpc .wpc-legal-body .wp-block-table { margin: 8px 0 28px; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.wpc .wpc-legal-body table { width: 100%; min-width: 560px; margin: 0; border: 0; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.wpc .wpc-legal-body th, .wpc .wpc-legal-body td { padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.wpc .wpc-legal-body thead th { background: var(--tint); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.wpc .wpc-legal-body tbody tr:last-child td { border-bottom: 0; }
.wpc .wpc-legal-body tbody tr:hover td { background: #fbfaff; }
.wpc .wpc-legal-body td:first-child { color: var(--ink); font-weight: 500; }

/* Related policies */
.wpc-legal-related .wpc-head { margin-bottom: 48px; }
.wpc .wpc-legal-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.wpc-legal-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 30px 26px; border: 1px solid transparent; border-radius: var(--r); background: #fff; color: var(--body); text-decoration: none; transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; }
.wpc a.wpc-legal-card { color: var(--body); text-decoration: none; }
a.wpc-legal-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -36px rgba(60, 40, 140, .6); }
.wpc-legal-card-i { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 8px; border-radius: 14px; background: var(--tint); color: #5a35d6; font-size: 22px; }
a.wpc-legal-card:hover .wpc-legal-card-i { background: var(--grad); color: #fff; }
.wpc-legal-card b { font-family: var(--display); font-size: 20px; font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
.wpc-legal-card small { font-size: 15px; line-height: 1.55; }
.wpc .wpc-legal-more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--orange-ink); }
.wpc-legal-card.is-current { border-color: rgba(217, 31, 104, .35); background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.wpc-legal-card.is-current .wpc-legal-card-i { background: var(--grad); color: #fff; }
.wpc .wpc-legal-also { margin: 32px 0 0; text-align: center; font-size: 15.5px; }

/* Contact */
.wpc-legal-cta { position: relative; padding: 104px 0; background: var(--night); color: var(--on-dark); overflow: hidden; isolation: isolate; }
.wpc-legal-cta-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: center; z-index: 3; }
.wpc .wpc-legal-cta h2 { color: #fff; margin-bottom: 18px; font-size: clamp(32px, 3.4vw, 48px); }
.wpc .wpc-legal-cta p { max-width: 640px; margin: 0; font-size: 17.5px; color: #d0d5e3; }
.wpc-legal-cta strong { color: #fff; font-weight: 600; }

@media (max-width: 1240px) {
	.wpc .wpc-legal-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
	.wpc-legal-hero-in { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.wpc-legal-badge { display: none; }
	.wpc-legal-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.wpc-legal-side { position: static; max-height: none; overflow: visible; }
	.wpc .wpc-legal-toc ol { grid-template-columns: 1fr 1fr; column-gap: 12px; }
	.wpc-legal-cta-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 680px) {
	.wpc-legal { padding-bottom: 0; }
	.wpc-legal-hero { padding: 28px 0 64px; }
	.wpc-legal-main { padding: 56px 0 72px; }
	.wpc .wpc-legal-toc ol { grid-template-columns: 1fr; }
	.wpc-legal-body { font-size: 16px; }
	.wpc .wpc-legal-body > p:first-of-type { font-size: 17px; }
	.wpc .wpc-legal-body h2 { margin-top: 48px; padding-top: 32px; }
	.wpc .wpc-legal-body th, .wpc .wpc-legal-body td { padding: 12px 14px; font-size: 14.5px; }
	.wpc .wpc-legal-cards { grid-template-columns: 1fr; }
	.wpc-legal-cta { padding: 76px 0; }
}
