/* ==========================================================================
   RepuNEXT TV — site-wide styles (every page)
   1. Brand tokens       – colours from the logo, fonts, layout, motion
   2. Base + inner pages – pages, posts, archives, search, 404, comments, forms
   3. Site header        – floating header (scoped to .site-header)
   4. Site footer        – (scoped to .site-footer)
   The homepage adds front-page.css on top of this file.
   ========================================================================== */

/* ==========================================================================
   1. Brand tokens
   ========================================================================== */
:root {
  /* Brand — taken from the logo */
  --ink:        #0B2340;   /* "NEXT" wordmark navy */
  --ink-deep:   #04162B;
  --sq-1:       #043A54;   /* bottom-left square */
  --sq-2:       #00517E;   /* top row, 1st */
  --sq-3:       #006E91;   /* middle square */
  --sq-4:       #008AB0;   /* top row, 2nd */
  --sq-5:       #03AEB8;   /* top row, 3rd */
  --sq-6:       #027E8A;   /* right column, middle */
  --sq-7:       #52C2A6;   /* right column, bottom */
  --tagline:    #006E8F;   /* "Your Reputation to the next level" */

  /* Channel identities */
  --en:         var(--sq-2);
  --en-bright:  var(--sq-4);
  --en-tint:    #E3F0F6;
  --ta:         var(--sq-6);
  --ta-bright:  var(--sq-7);
  --ta-tint:    #DFF3EC;

  /* Neutrals */
  --paper:      #F2F5F6;
  --surface:    #FFFFFF;
  --line:       #D4DEE3;
  --line-soft:  #E5ECEF;
  --muted:      #4F6476;
  --faint:      #8497A6;

  /* Type */
  --f-display: "Bricolage Grotesque", "Hanken Grotesk", "Noto Sans Tamil", system-ui, sans-serif;
  --f-body:    "Hanken Grotesk", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-tamil:   "Noto Sans Tamil", "Hanken Grotesk", sans-serif;

  /* Layout */
  --container: 1320px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(72px, 9vw, 128px);
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 64px;

  /* Motion */
  --ease-out: cubic-bezier(.2, .75, .2, 1);
  --ease-io:  cubic-bezier(.65, 0, .35, 1);
  --hard:     0 4px 0 var(--ink);
}

/* ==========================================================================
   2. Base + inner pages
   ========================================================================== */
/* Legacy tokens, mapped to the brand so older markup and Elementor widgets
   that reference them pick up the new look. */
:root {
	--rn-color-primary: var(--en);
	--rn-color-primary-dark: var(--ink);
	--rn-color-dark: var(--ink);
	--rn-color-text: var(--ink);
	--rn-color-muted: var(--muted);
	--rn-color-bg: var(--paper);
	--rn-color-surface: var(--surface);
	--rn-color-border: var(--line);

	--rn-font: var(--f-body);
	--rn-font-size: 1.0625rem;
	--rn-line-height: 1.7;

	--rn-container: var(--container);
	--rn-container-narrow: 760px;
	--rn-gutter: var(--gutter);
	--rn-section-space: clamp(48px, 7vw, 96px);
	--rn-radius: 12px;
	--rn-shadow: 0 4px 0 var(--ink);
}

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 32px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	font-family: var(--f-body);
	font-size: var(--rn-font-size);
	line-height: var(--rn-line-height);
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; }

a { color: var(--en); text-decoration-thickness: 1.5px; text-underline-offset: .2em; transition: color .2s; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--sq-4); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sq-5); color: var(--ink); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-display);
	font-weight: 700;
	color: var(--ink);
	line-height: 1.12;
	letter-spacing: -.025em;
	margin: 0 0 .55em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.02; letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1.15em; }
:lang(ta) { font-family: var(--f-tamil); line-height: 1.8; }

/* Layout ----------------------------------------------------------------- */
.container {
	width: 100%;
	max-width: calc(var(--container) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--rn-container-narrow) + var(--gutter) * 2); }

.site-main { display: block; padding-block: 0 var(--rn-section-space); }
.rn-elementor-page .site-main { padding-block: 0; }

.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* Eyebrow label, as on the landing page: [ Label ] */
.eyebrow {
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--tagline);
}
.eyebrow :lang(ta) { text-transform: none; letter-spacing: 0; }
.page-header .eyebrow,
.error-404 .eyebrow { margin: 0 0 14px; }

/* Buttons (hard shadow, same as the landing page) ------------------------ */
.btn {
	--bg: var(--surface); --fg: var(--ink); --sh: var(--ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 0 20px;
	background: var(--bg);
	color: var(--fg);
	border: 1.5px solid var(--ink);
	border-radius: 12px;
	box-shadow: 0 4px 0 var(--sh);
	font: 600 .975rem/1 var(--f-body);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .25s;
}
.btn:hover { color: var(--fg); transform: translateY(-2px); box-shadow: 0 6px 0 var(--sh); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sh); }
.btn--primary { --bg: var(--en); --fg: #fff; }
.btn--ink { --bg: var(--ink); --fg: #fff; --sh: var(--sq-5); }
.btn--en { --bg: var(--en); --fg: #fff; }
.btn--ta { --bg: var(--ta-bright); --fg: var(--ink); }
.btn--ghost { --bg: transparent; }
.btn--ghost:hover { --bg: var(--surface); }
.btn--light { --bg: #fff; --sh: var(--sq-4); }
.btn-group { display: flex; flex-wrap: wrap; gap: 14px; }

/* Page header ------------------------------------------------------------ */
.page-header { padding-block: clamp(32px, 6vw, 72px) clamp(24px, 3vw, 36px); }
.page-header .entry-title { margin-bottom: 0; }
.page-header .entry-meta { margin-top: 18px; }
.entry-title span { color: var(--en); }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .9rem; }
.entry-meta .sep { color: var(--faint); }
.archive-description { max-width: 60ch; margin-top: 14px; color: var(--muted); }
.archive-description p:last-child { margin-bottom: 0; }

/* Reading sheet: post/page content on a white rounded panel */
.entry-sheet {
	padding: clamp(22px, 5vw, 56px);
	background: var(--surface);
	border: 1.5px solid var(--line-soft);
	border-radius: var(--radius-lg);
}
.entry-sheet > :first-child { margin-top: 0; }
.entry-sheet > :last-child { margin-bottom: 0; }

.entry-thumbnail { margin: 0 0 clamp(20px, 3vw, 32px); }
.entry-thumbnail img { display: block; width: 100%; border-radius: var(--radius-lg); border: 1.5px solid var(--line-soft); }

/* Content ---------------------------------------------------------------- */
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.entry-content li { margin-bottom: .35em; }
.entry-content li::marker { color: var(--sq-4); }
.entry-content hr { margin: 2em 0; border: 0; border-top: 1.5px solid var(--line-soft); }
.entry-content blockquote {
	margin: 1.75em 0;
	padding: 4px 0 4px 22px;
	border-left: 4px solid var(--sq-5);
	font-family: var(--f-display);
	font-size: clamp(1.15rem, 2vw, 1.4rem);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -.01em;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: 10px; font: 600 .85rem/1.4 var(--f-body); font-style: normal; color: var(--muted); letter-spacing: 0; }
.entry-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 1.5em; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.entry-content th { background: var(--paper); font-weight: 600; }
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content code { padding: .1em .4em; background: var(--paper); border-radius: 6px; font-size: .9em; }
.entry-content pre { overflow-x: auto; padding: 18px 20px; background: var(--ink); color: #DCE6ED; border-radius: 12px; font-size: .9rem; }
.entry-content pre code { padding: 0; background: none; color: inherit; }
.entry-content img { border-radius: 12px; }

.alignwide { max-width: var(--container); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption, .wp-element-caption { margin-top: 8px; color: var(--muted); font-size: .875rem; }

/* Post footer: tags + previous/next */
.entry-footer { padding-top: clamp(24px, 4vw, 40px); }
.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.entry-tags a {
	padding: 6px 12px;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-size: .85rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .2s, background-color .2s;
}
.entry-tags a::before { content: "#"; color: var(--sq-4); margin-right: 2px; }
.entry-tags a:hover { border-color: var(--ink); }

.post-navigation { margin-top: 24px; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.post-navigation a {
	display: block;
	height: 100%;
	padding: 18px 20px;
	background: var(--surface);
	border: 1.5px solid var(--line-soft);
	border-radius: 16px;
	color: var(--ink);
	font-family: var(--f-display);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .25s;
}
.post-navigation a:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 5px 0 var(--en); }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; margin-bottom: 6px; font: 600 .75rem/1 var(--f-body); color: var(--tagline); text-transform: uppercase; letter-spacing: .08em; }

/* Cards (post listings) — same feel as the landing feed cards ------------ */
.card {
	padding: 24px;
	background: var(--surface);
	border: 1.5px solid var(--line-soft);
	border-radius: var(--radius-lg);
	transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .3s;
}
.card:hover { transform: translateY(-5px); border-color: var(--ink); box-shadow: 0 6px 0 var(--en); }
.card__title { font-size: 1.3rem; line-height: 1.2; margin-bottom: .45em; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card p:last-child { margin-bottom: 0; }

.entry-card { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.entry-card__media { display: block; overflow: hidden; background: var(--en-tint); }
.entry-card__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .9s var(--ease-out); }
.entry-card:hover .entry-card__media img { transform: scale(1.045); }
.entry-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 20px 22px 22px; }
.entry-card__body p { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.entry-card .entry-meta { order: -1; font-size: .8rem; }

/* Pagination ------------------------------------------------------------- */
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: clamp(32px, 5vw, 56px); }
.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 46px;
	min-height: 46px;
	padding: 0 14px;
	background: var(--surface);
	border: 1.5px solid var(--ink);
	border-radius: 12px;
	box-shadow: 0 3px 0 var(--ink);
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
	transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.pagination a.page-numbers:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.pagination .current { background: var(--ink); color: #fff; box-shadow: 0 3px 0 var(--sq-5); }
.pagination .dots { border-color: transparent; box-shadow: none; background: none; }

/* Forms ------------------------------------------------------------------ */
.search-form { display: flex; gap: 10px; max-width: 560px; margin-bottom: 1.5rem; }
.search-form__input,
.comment-form input:not([type="submit"]):not([type="checkbox"]),
.comment-form textarea,
.post-password-form input[type="password"] {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	background: var(--surface);
	border: 1.5px solid var(--line);
	border-radius: 12px;
	font: inherit;
	color: var(--ink);
	transition: border-color .2s, box-shadow .2s;
}
.search-form__input:focus,
.comment-form input:focus,
.comment-form textarea:focus,
.post-password-form input[type="password"]:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 138, 176, .25); }
::placeholder { color: var(--faint); opacity: 1; }
label { font-weight: 600; font-size: .9rem; }
.comment-form p { margin-bottom: 16px; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; }
.comment-form input[type="checkbox"] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--en); }
.comment-notes, .logged-in-as { color: var(--muted); font-size: .9rem; }

/* Comments --------------------------------------------------------------- */
.comments-area { padding-top: clamp(40px, 6vw, 72px); }
.comments-title, .comment-reply-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.comment-list { list-style: none; margin: 0 0 clamp(32px, 5vw, 48px); padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: clamp(16px, 4vw, 40px); }
.comment-body {
	margin-bottom: 14px;
	padding: 20px 22px;
	background: var(--surface);
	border: 1.5px solid var(--line-soft);
	border-radius: 16px;
}
.comment-body p:last-of-type { margin-bottom: 0; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 12px; font-size: .875rem; color: var(--muted); }
.comment-meta a { color: inherit; text-decoration: none; }
.comment-author { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-author .says { display: none; }
.comment-meta .avatar { border-radius: 10px; }
.reply { margin-top: 12px; }
.comment-reply-link { font-weight: 600; font-size: .875rem; text-decoration: none; }
.comment-reply-link::after { content: " ↩"; }

/* Empty results ---------------------------------------------------------- */
.no-results {
	display: grid;
	justify-items: center;
	gap: 10px;
	padding: clamp(40px, 6vw, 72px) 20px;
	text-align: center;
	background: var(--surface);
	border: 1.5px dashed var(--line);
	border-radius: var(--radius-lg);
	color: var(--muted);
}
.no-results .search-form { width: 100%; margin: 10px auto 0; }

/* 404 -------------------------------------------------------------------- */
.error-404 { padding-block: clamp(48px, 9vw, 120px); text-align: center; }
.error-404 .search-form { margin: 8px auto 24px; }
.error-404 p:not([class]) { color: var(--muted); }
.error-404 .btn-group { justify-content: center; }
.error-404__code {
	margin: 0 0 6px;
	font-family: var(--f-display);
	font-size: clamp(5rem, 18vw, 10rem);
	font-weight: 800;
	line-height: .9;
	letter-spacing: -.06em;
	color: var(--ink);
}
.error-404__code span { color: var(--sq-5); }

/* Accessibility ---------------------------------------------------------- */
/* Visually hidden, still read by screen readers: WordPress core's class + the theme's own. */
.screen-reader-text,
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 600px) {
	.search-form { flex-direction: column; }
	.search-form .btn { width: 100%; }
}

/* ==========================================================================
   3. Site header
   ========================================================================== */
/* ---------- Header base (scoped, so main.css can't leak in) ---------- */
.site-header, .site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header { font-family: var(--f-body); font-size: 1rem; line-height: 1.6; color: var(--ink); -webkit-font-smoothing: antialiased; }
.site-header a { color: inherit; text-decoration: none; }
.site-header a:hover { color: inherit; }
.site-header ul { list-style: none; margin: 0; padding: 0; }
.site-header button { font: inherit; color: inherit; cursor: pointer; }
.site-header img { display: block; max-width: 100%; height: auto; }
.site-header :lang(ta) { font-family: var(--f-tamil); line-height: 1.7; }
.site-header :focus-visible { outline: 2px solid var(--sq-4); outline-offset: 3px; border-radius: 6px; }
.site-header > .container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.site-header .icon { width: 1.1em; height: 1.1em; flex: none; }
.site-header .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.site-header .dot--en { background: var(--en-bright); }
.site-header .dot--ta { background: var(--ta-bright); }

/* Follow button (scoped copy of the landing .btn so it looks identical everywhere) */
.site-header .btn {
  --sh: var(--sq-5);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 14px;
  background: var(--ink); color: #fff;
  border: 1.5px solid var(--ink); border-radius: 10px;
  box-shadow: 0 3px 0 var(--sh);
  font: 600 .9rem/1 var(--f-body); white-space: nowrap; text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.site-header .btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 5px 0 var(--sh); }
.site-header .btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sh); }

/* ==========================================================================
   1. Header
   ========================================================================== */
/* At the top of the page: floating rounded bar at full container width.
   After scrolling: it narrows into a compact, centred bar with a hard shadow. */
.site-header {
  --compact-w: 1120px; /* wide enough for the 7 menu links + Follow */
  --dur: .6s;
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: 14px;
}
.site-header > .container {
  transition: max-width var(--dur) var(--ease-out);
}

.header-bar {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--header-h);
  padding: 0 10px 0 14px;
  /* Frosted glass: the banner video shows through, blurred, behind the menu. */
  background: rgba(255,255,255,.3);
  backdrop-filter: blur(14px) saturate(1.8) brightness(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.8) brightness(1.12);
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(4,16,32,.22), inset 0 1px 0 rgba(255,255,255,.7);
  transition: background-color .35s, border-color .35s, box-shadow .35s;
}
/* No blur support: keep the bar solid so the text stays readable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header-bar { background: rgba(255,255,255,.95); }
}

.site-header.is-scrolled > .container {
  max-width: calc(var(--compact-w) + var(--gutter) * 2);
}
.site-header.is-scrolled .header-bar {
  background: rgba(255,255,255,.92);
  border-color: var(--ink);
  box-shadow: var(--hard);
}

/* Homepage: dark (black) glass with light text, at the top AND after scrolling.
   Over the banner video the tint is light (30%); over the light page after
   scrolling it is darker (75%) so the white text stays readable. Inner pages
   keep the light glass. */
.rn-landing .site-header .header-bar {
  background: rgba(3,10,20,.3);
  backdrop-filter: blur(14px) saturate(1.6);   /* 14px: same frosted look, far cheaper to redraw while scrolling */
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 10px 34px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.1);
}
.rn-landing .site-header.is-scrolled .header-bar {
  background: rgba(3,10,20,.86);
  backdrop-filter: none; -webkit-backdrop-filter: none;   /* nearly opaque after scrolling: no live blur to recompute every frame */
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 12px 30px rgba(4,16,32,.28), inset 0 1px 0 rgba(255,255,255,.1);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .rn-landing .site-header .header-bar,
  .rn-landing .site-header.is-scrolled .header-bar { background: rgba(3,10,20,.92); }
}
.rn-landing .site-header .brand__word { color: #fff; }
.rn-landing .site-header .brand__tv { background: #fff; color: var(--ink); }
@media (min-width: 1200px) { /* desktop menu (hamburger below 1200px: the full link list needs the room) */
  .rn-landing .site-header .follow-menu__toggle { background: #fff; color: var(--ink); border-color: #fff; }
  .rn-landing .site-header .follow-menu__toggle:hover { color: var(--ink); }
  .rn-landing .site-header .nav__link { color: rgba(255,255,255,.8); }
  .rn-landing .site-header .nav__link::before,
  .rn-landing .site-header .nav__link::after { color: rgba(255,255,255,.45); }
  .rn-landing .site-header .nav__link:hover,
  .rn-landing .site-header .nav__link.is-current { color: #fff; }
  .rn-landing .site-header .nav__link:hover::before,
  .rn-landing .site-header .nav__link:hover::after { color: var(--sq-4); }
  .rn-landing .site-header .nav__link[lang="ta"]:hover::before,
  .rn-landing .site-header .nav__link[lang="ta"]:hover::after { color: var(--ta-bright); }
  .rn-landing .site-header .nav__link.is-current::before,
  .rn-landing .site-header .nav__link.is-current::after { color: var(--sq-4); }
  .rn-landing .site-header .nav__link[lang="ta"].is-current::before,
  .rn-landing .site-header .nav__link[lang="ta"].is-current::after { color: var(--ta-bright); }
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 38px; height: auto; transition: transform .5s var(--ease-out); }
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }
.brand__word { font-family: var(--f-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.03em; line-height: 1; }
.brand__word b { font-weight: 800; }
.brand__tv {
  font-family: var(--f-display); font-weight: 700; font-size: .72rem; letter-spacing: .06em;
  padding: 4px 7px; border-radius: 6px; background: var(--ink); color: #fff; line-height: 1;
}

.nav { display: flex; align-items: center; gap: 18px; }
.nav__list { display: flex; align-items: center; gap: 6px; }
.nav__link {
  white-space: nowrap;
  position: relative; display: inline-flex; align-items: center;
  padding: 10px 12px; font-weight: 500; font-size: .975rem; color: var(--muted);
  transition: color .25s;
}
.nav__link::before, .nav__link::after {
  content: "["; color: var(--muted); font-weight: 400; /* --muted, not --faint: stays visible on the glass header */
  transition: transform .35s var(--ease-out), color .25s;
}
.nav__link::after { content: "]"; }
.nav__link > span { padding-inline: 5px; padding-block: 2px; transition: box-shadow .3s var(--ease-out); }
/* Scroll-spy (main.js): underline the link of the section on screen */
.nav__link.is-current > span { box-shadow: inset 0 -2px 0 var(--sq-4); }
.nav__link[lang="ta"].is-current > span { box-shadow: inset 0 -2px 0 var(--ta-bright); }
.nav__link:hover, .nav__link.is-current { color: var(--ink); }
.nav__link:hover::before, .nav__link.is-current::before { transform: translateX(-3px); color: var(--sq-4); }
.nav__link:hover::after,  .nav__link.is-current::after  { transform: translateX(3px);  color: var(--sq-4); }
.nav__link[lang="ta"]:hover::before, .nav__link[lang="ta"].is-current::before,
.nav__link[lang="ta"]:hover::after,  .nav__link[lang="ta"].is-current::after { color: var(--ta-bright); }

/* Follow dropdown */
.follow-menu { position: relative; }
.icon--chev { width: .9em; height: .9em; transition: transform .3s var(--ease-out); }
.follow-menu.is-open .icon--chev { transform: rotate(180deg); }
.follow-menu__list {
  position: absolute; right: 0; top: calc(100% + 12px);
  min-width: 250px; padding: 8px;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--hard);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .25s, transform .3s var(--ease-out), visibility .25s;
}
.follow-menu.is-open .follow-menu__list { opacity: 1; visibility: visible; transform: none; }
.follow-menu__list a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  transition: background-color .2s;
}
.follow-menu__list a:hover { background: var(--paper); }
.follow-menu__list strong { display: block; font-weight: 600; line-height: 1.3; }
.follow-menu__list small { display: block; color: var(--muted); font-size: .82rem; }

/* Mobile toggle */
.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1.5px solid var(--ink); border-radius: 10px;
  background: var(--surface); box-shadow: 0 3px 0 var(--ink); place-items: center;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1199px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 10px);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px; background: var(--surface);
    border: 1.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--hard);
    max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; /* 7 links + Follow: scroll on short screens */
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .35s var(--ease-out), visibility .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    width: 100%; padding: 12px 10px; font-family: var(--f-display); font-size: 1.35rem; font-weight: 600;
    color: var(--ink); letter-spacing: -.02em; border-bottom: 1px solid var(--line-soft);
  }
  .nav__link[lang="ta"] { font-family: var(--f-tamil); font-size: 1.25rem; }
  /* Follow (inside the open menu): the button opens the two channels below it, side by side, same height */
  .follow-menu { padding-top: 14px; }
  .follow-menu__list {
    /* display:none until Follow is tapped; visibility: inherit — never tappable while the menu itself is shut */
    position: static; opacity: 1; visibility: inherit; transform: none;
    border: 0; box-shadow: none; padding: 0; min-width: 0; margin-top: 10px;
    display: none; grid-template-columns: 1fr 1fr; gap: 10px;
  }
  .follow-menu.is-open .follow-menu__list { display: grid; visibility: inherit; }
  .follow-menu__list li { display: flex; }
  .follow-menu__list a { flex: 1; align-items: center; background: var(--paper); min-height: 64px; padding: 10px 14px; }
  .follow-menu__list a > span:last-child { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; }
  /* Same line boxes for both names (the Tamil font is taller), so both items are exactly the same height */
  .follow-menu__list strong { line-height: 22px; height: 22px; }
  .follow-menu__list strong[lang="ta"] { font-family: var(--f-tamil); font-size: 1rem; }
  .follow-menu__list small { line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .follow-menu__list .dot { flex: none; }
}
@media (max-width: 420px) {
  .follow-menu__list { grid-template-columns: 1fr; }
  .brand__word { font-size: 1.2rem; }
}

/* ---------- Page-level helpers ---------- */
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

/* Keep the fixed header below the admin toolbar for logged-in users */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Inner pages: the header floats (position: fixed), so push their content below it.
   The homepage banner already reserves this space itself. */
body:not(.rn-landing) { padding-top: calc(var(--header-h) + 14px + 16px); }

/* ==========================================================================
   4. Site footer
   ========================================================================== */
/* ---------- Footer base (scoped) ---------- */
.site-footer, .site-footer *, .site-footer *::before, .site-footer *::after { box-sizing: border-box; }
.site-footer { font-family: var(--f-body); font-size: 1rem; line-height: 1.6; color: var(--ink); -webkit-font-smoothing: antialiased; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: inherit; text-decoration: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer p { margin: 0; }
.site-footer img { display: block; max-width: 100%; height: auto; }
.site-footer :lang(ta) { font-family: var(--f-tamil); line-height: 1.7; }
.site-footer :focus-visible { outline: 2px solid var(--sq-4); outline-offset: 3px; border-radius: 6px; }
.site-footer > .container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.site-footer .icon { width: 1.1em; height: 1.1em; flex: none; }
.site-footer .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.site-footer .dot--en { background: var(--en-bright); }
.site-footer .dot--ta { background: var(--ta-bright); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1.5px solid var(--line); }
.footer__main {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding-block: clamp(40px, 5vw, 64px);
}
.footer__logo { display: block; width: clamp(180px, 22vw, 260px); }
.footer__logo img { width: 100%; height: auto; }
.footer__links { display: grid; gap: 10px; min-width: min(100%, 360px); }
.footer__links a {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600;
  transition: border-color .25s, transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.footer__links a small { color: var(--faint); font-weight: 500; }
.footer__links a .icon { margin-left: auto; transition: transform .3s var(--ease-out); }
.footer__links a:hover { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.footer__links a:hover .icon { transform: translate(2px, -2px); }
.footer__base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 20px 28px; border-top: 1px solid var(--line-soft);
  font-size: .875rem; color: var(--muted);
}
.footer__top:hover { color: var(--ink); }
.footer__base p a { color: var(--tagline); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.footer__base p a:hover { color: var(--ink); }

/* Inner pages: a little breathing room above the footer */
body:not(.rn-landing) .site-footer { margin-top: clamp(40px, 6vw, 80px); }
