/*
Theme Name:        The Doctors Page
Theme URI:         https://thedoctorspage.com
Author:            The Doctors Page
Author URI:        https://thedoctorspage.com
Description:       Custom lightweight WordPress theme for The Doctors Page — healthcare-focused digital growth marketing for doctors, clinics and hospitals in Odisha and across India.
Version:           1.0.0
Requires at least: 6.4
Requires PHP:      8.0
Tested up to:       6.6
Text Domain:        tdp
License:            Proprietary
License URI:        https://thedoctorspage.com

This stylesheet holds the WordPress theme header (required) plus the
design-token layer. Component and layout styles live in
assets/css/main.css and are enqueued separately — see inc/enqueue.php.
Do not add component rules here; this file stays small and cacheable.
*/

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
	/* --- Brand colors (from brand brief, section 03) --- */
	--tdp-orange:        #F36F22; /* primary CTA fills, accents, "+" motif */
	--tdp-orange-ink:     #B84E0E; /* orange TEXT on white — AA-safe link/eyebrow color */
	--tdp-orange-tint:    #FDEEE3; /* light orange surface for badges/highlights */

	--tdp-blue:           #0946BE; /* headings, trust sections, secondary buttons */
	--tdp-blue-deep:      #073490; /* hover state / deep blue section background */
	--tdp-blue-tint:      #E7EDFB; /* light blue surface */

	--tdp-ink:            #0B0B0B; /* body text — softer than pure black */
	--tdp-grey:           #7A7A7A; /* large metadata, dividers, icon strokes */
	--tdp-grey-text:      #5F5F5F; /* small supporting text — AA-safe on white */
	--tdp-line:           #E6E6E6; /* hairline borders */
	--tdp-line-on-blue:   rgba(255,255,255,.18);

	--tdp-paper:          #FFFFFF;
	--tdp-paper-warm:     #FAF8F5; /* alternate section background */

	/* --- Semantic aliases (use these in components, not raw brand colors) --- */
	--color-bg:            var(--tdp-paper);
	--color-bg-alt:        var(--tdp-paper-warm);
	--color-bg-inverse:    var(--tdp-blue);
	--color-bg-inverse-deep: var(--tdp-blue-deep);
	--color-bg-inverse-orange: var(--tdp-orange);
	--color-text:           var(--tdp-ink);
	--color-text-muted:     var(--tdp-grey-text);
	--color-text-inverse:   #FFFFFF;
	--color-border:         var(--tdp-line);
	--color-accent:         var(--tdp-orange);
	--color-accent-ink:     var(--tdp-orange-ink);
	--color-link:           var(--tdp-orange-ink);
	--color-focus:          var(--tdp-blue);

	/* --- Typography (per brand book: Oswald for headings, Amaranth for body) --- */
	--font-display: 'Oswald', 'Arial Narrow', sans-serif;
	--font-body:    'Amaranth', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-odia:    'Anek Odia', var(--font-body);

	--fs-h1: clamp(2.25rem, 1.7rem + 2.2vw, 3.75rem);
	--fs-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.75rem);
	--fs-h3: clamp(1.375rem, 1.2rem + .7vw, 1.75rem);
	--fs-h4: clamp(1.125rem, 1.05rem + .3vw, 1.3rem);
	--fs-lead: clamp(1.125rem, 1.05rem + .3vw, 1.3rem);
	--fs-body: 1.0625rem;
	--fs-small: .9375rem;
	--fs-eyebrow: .8125rem;

	--lh-heading: 1.15;
	--lh-body: 1.65;
	--measure: 68ch;

	/* --- Spacing / rhythm --- */
	/* Tightened from clamp(4rem,3rem+5vw,8rem): with most sections now on
	   white/off-white (no color change to mark the boundary), the old
	   max of 8rem top + 8rem bottom between two sections read as a bare
	   empty gap rather than breathing room. */
	--space-section: clamp(3rem, 2.4rem + 3vw, 5.5rem);
	--space-section-tight: clamp(2rem, 1.6rem + 2vw, 3rem);
	--space-xs: .5rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2.5rem;
	--space-xl: 4rem;

	--gutter: 1.25rem;
	--container-max: 1240px;
	--radius: 8px;
	--radius-lg: 14px;
	--radius-pill: 999px;

	/* --- Motion --- */
	--ease: cubic-bezier(.2,.7,.2,1);
	--dur-fast: 150ms;
	--dur-base: 200ms;
	--dur-reveal: 500ms;
}

@media (prefers-color-scheme: dark) {
	/* TDP does not ship a dark theme at launch; content stays on the light
	   palette intentionally (healthcare/trust context reads better on
	   white). Token layer left ready if this changes later. */
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: var(--lh-heading);
	color: var(--tdp-blue);
	margin: 0 0 var(--space-sm);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 var(--space-sm); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tdp-orange); }

:focus-visible {
	outline: 3px solid var(--color-focus);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--tdp-blue);
	color: #fff;
	padding: .75em 1.25em;
	z-index: 10000;
	border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */

.container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	position: relative;
	overflow: hidden;
	padding-block: var(--space-section);
	background: var(--color-bg);
}
.section--tight { padding-block: var(--space-section-tight); }
/* .section--alt is a whisper-quiet rhythm break between white sections —
   not a solid brand-color block. Text stays the normal ink/blue palette. */
.section--alt {
	background: var(--color-bg-alt);
}
/* .section--inverse is reserved for the one or two moments per page that
   should read as a bold brand-color band (the final CTA) — everything
   else stays on white with color used as an accent, not a fill. */
.section--inverse {
	background: var(--color-bg-inverse);
	color: var(--color-text-inverse);
}
.section > .container { position: relative; z-index: 1; }

/* Brand corner mark: a small hairline bracket in the top-left of
   every section, in place of the earlier solid triangle — same
   brand-book "corner flag" idea, drawn as pure linework instead of a
   filled shape so it reads as a quiet, considered detail rather than
   a decoration. Color alternates orange/blue section by section via
   the --tdp-corner-color custom property, so one rule below handles
   every variant. */
.section::before {
	content: "";
	position: absolute;
	top: 28px;
	left: 28px;
	width: 30px;
	height: 30px;
	border-top: 1.5px solid var(--tdp-corner-color, var(--tdp-orange));
	border-left: 1.5px solid var(--tdp-corner-color, var(--tdp-orange));
	pointer-events: none;
}
/* Closing bracket, bottom-right — mirrors ::before so every section is
   "framed" by the two opposite corners instead of a single mark. Same
   --tdp-corner-color hook, so the alt/inverse overrides below cover
   both automatically. */
.section::after {
	content: "";
	position: absolute;
	bottom: 28px;
	right: 28px;
	width: 30px;
	height: 30px;
	border-bottom: 1.5px solid var(--tdp-corner-color, var(--tdp-orange));
	border-right: 1.5px solid var(--tdp-corner-color, var(--tdp-orange));
	pointer-events: none;
}
.section--alt::before,
.section--alt::after {
	--tdp-corner-color: var(--tdp-blue);
}
.section--inverse::before,
.section--inverse::after {
	--tdp-corner-color: rgba(255, 255, 255, .55);
}
.section--inverse h1, .section--inverse h2, .section--inverse h3, .section--inverse h4 {
	color: #fff;
}
.section--inverse p { color: rgba(255,255,255,.85); }
.section--inverse a:not(.btn) { color: #fff; text-decoration-color: rgba(255,255,255,.5); }
.section--inverse .wp-block-list { color: rgba(255,255,255,.9); }

/* .card keeps its own white surface even inside the solid-color CTA
   band — reset text back to normal dark colors so it doesn't inherit
   white-on-white. */
.section--inverse .card, .section--inverse .card p { color: var(--color-text); }
.section--inverse .card h1, .section--inverse .card h2, .section--inverse .card h3, .section--inverse .card h4 { color: var(--tdp-blue); }

.eyebrow {
	display: table;
	font-size: var(--fs-eyebrow);
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--tdp-orange-ink);
	background: var(--tdp-orange-tint);
	padding: .4em 1.1em;
	border-radius: var(--radius-pill);
	margin-bottom: var(--space-sm);
}
.section--inverse .eyebrow { color: #fff; background: rgba(255,255,255,.14); }
.section--inverse-orange .eyebrow { color: #fff; background: rgba(255,255,255,.16); }

.section--inverse-orange {
	background: var(--color-bg-inverse-orange);
	color: var(--color-text-inverse);
}
.section--inverse-orange h1, .section--inverse-orange h2, .section--inverse-orange h3, .section--inverse-orange h4 {
	color: #fff;
}
.section--inverse-orange p { color: rgba(255,255,255,.88); }
.section--inverse-orange a:not(.btn) { color: #fff; text-decoration-color: rgba(255,255,255,.5); }

/* Centered "pill eyebrow + headline" intro, matching every section on
   the reference site: purely structural (eyebrow directly followed by
   a heading, optionally one lead paragraph) so it applies wherever
   that markup shape already exists, no per-pattern edits needed. */
.section > .container > .eyebrow,
.section > .container > .container > .eyebrow {
	margin-inline: auto;
}
.section > .container > .eyebrow + h1,
.section > .container > .eyebrow + h2,
.section > .container > .eyebrow + h3 {
	text-align: center;
	max-width: 42rem;
	margin-inline: auto;
}
.section > .container > .eyebrow + h1 + p,
.section > .container > .eyebrow + h2 + p,
.section > .container > .eyebrow + h3 + p {
	text-align: center;
	margin-inline: auto;
}

.text-accent { color: var(--tdp-orange); }
.section--inverse .text-accent, .section--inverse-orange .text-accent { color: #FFD9BC; }

.grid { display: grid; gap: var(--space-lg); }
@media (min-width: 720px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px)  { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: var(--fs-small);
	padding: .85em 1.75em;
	border-radius: var(--radius-pill);
	border: 1.5px solid transparent;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: transform var(--dur-fast) var(--ease), background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
	line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn .btn__arrow { transition: transform var(--dur-base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--primary {
	background: var(--tdp-orange);
	color: var(--tdp-ink); /* AA-safe: black text on orange (~7:1), not white */
}
.btn--primary:hover { background: #E05F14; color: var(--tdp-ink); }

.btn--outline {
	background: transparent;
	border-color: currentColor;
	color: var(--tdp-blue);
}
.btn--outline:hover { background: var(--tdp-blue-tint); color: var(--tdp-blue); }

.section--inverse .btn--outline {
	color: #fff;
	border-color: rgba(255,255,255,.55);
}
.section--inverse .btn--outline:hover { background: rgba(255,255,255,.12); color: #fff; }

.btn--whatsapp {
	background: transparent;
	border-color: #25D366;
	color: #128C3E;
}
.btn--whatsapp:hover { background: #EAFBF1; }

.btn--text {
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-link);
	font-weight: 700;
}

/* ==========================================================================
   5. CARDS
   ========================================================================== */

.card {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-md);
	transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: var(--tdp-blue); }

/* ==========================================================================
   6. REVEAL-ON-SCROLL (progressive enhancement, see assets/js/main.js)
   ========================================================================== */

[data-reveal] {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal],
[data-reveal].is-visible,
html:not(.js) [data-reveal] { opacity: 1; transform: none; }
