/*
Theme Name: porfavorconfirm
Theme URI: https://porfavorconfirm.ar
Author: Juan Manuel Echeverria
Description: Landing de validación de porfavorconfirm.ar: confirmación de turnos por WhatsApp para consultorios. Theme clásico sin build, con lista de espera (CPT privado), Customizer para los datos de contacto y hardening (CSP estática, token firmado, throttling).
Version: 0.1.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: porfavorconfirm
*/

/* ============================================================
   Design tokens ("agenda sheet": cream desk, white sheets, one blue ink;
   green / amber / red only for the appointment semaphore)
   ============================================================ */
:root {
	--pfc-bg: #F6F4EE;
	--pfc-bg-tint: #EEEAE0;
	--pfc-surface: #FFFFFF;
	--pfc-ink: #182230;
	--pfc-ink-soft: #515B6B;
	--pfc-brand: #1F3F7A;
	--pfc-brand-dark: #142C57;
	--pfc-brand-soft: #E4EAF4;
	--pfc-ok: #1F6B3C;
	--pfc-ok-fill: #2A9357;
	--pfc-warn: #8A5A00;
	--pfc-danger: #A62B2B;
	--pfc-danger-fill: #D94C4C;
	--pfc-border: #D9D5CB;
	--pfc-border-strong: #6F7989;
	--pfc-inverted-soft: #C9D4EA;

	--pfc-font-display: "Newsreader", Georgia, "Times New Roman", serif;
	--pfc-font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Modular scale 1.25 on a 17→18px base (visual.json). */
	--fs-xs: 0.8125rem;
	--fs-sm: 0.9375rem;
	--fs-base: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
	--fs-lead: clamp(1.1875rem, 1.1rem + 0.5vw, 1.375rem);
	--fs-h3: clamp(1.25rem, 1.15rem + 0.6vw, 1.625rem);
	--fs-h2: clamp(1.875rem, 1.4rem + 2.4vw, 3rem);
	--fs-h1: clamp(2.25rem, 1.35rem + 4.2vw, 4.5rem);
	--fs-figure: clamp(2.75rem, 1.5rem + 6vw, 5.5rem);

	--r-sm: 4px;
	--r-md: 8px;
	--r-lg: 14px;
	--pfc-shadow-sheet: 0 1px 0 rgba(31, 63, 122, 0.06), 0 18px 40px -24px rgba(31, 63, 122, 0.22);
	--pfc-margin: 56px; /* the notebook margin line */

	--pfc-container: 1120px;
	--pfc-text: 720px;
	--pfc-form: 560px;
	--pfc-gutter: 20px;
	--pfc-section-pad: clamp(4.5rem, 3rem + 6vw, 8.5rem);
	--pfc-topbar-h: 64px;
	--pfc-t: 150ms;
}

@media (min-width: 600px) {
	:root { --pfc-gutter: 32px; }
}

@media (min-width: 960px) {
	:root { --pfc-gutter: 48px; }
}

/* ============================================================
   Fonts (self-hosted latin subsets, OFL — see assets/fonts/)
   One variable file serves Newsreader 400 and 500.
   ============================================================ */
@font-face {
	font-family: "Newsreader";
	font-style: normal;
	font-weight: 400 500;
	font-display: swap;
	src: url("assets/fonts/newsreader-500-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Newsreader";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/newsreader-400italic-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Atkinson Hyperlegible Next";
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("assets/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Reset and base typography
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--pfc-topbar-h) + 16px);
}

body {
	margin: 0;
	background: var(--pfc-bg);
	color: var(--pfc-ink);
	font-family: var(--pfc-font-body);
	font-size: var(--fs-base);
	font-weight: 400;
	line-height: 1.55;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
svg { max-width: 100%; }

img { height: auto; display: block; }

[hidden] { display: none !important; }

h1,
h2,
h3,
p,
ul,
ol,
figure { margin: 0; }

h1,
h2 {
	font-family: var(--pfc-font-display);
	font-weight: 500;
	font-optical-sizing: auto;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-h1);
	line-height: 1.02;
	max-width: 22ch;
}

h2 {
	font-size: var(--fs-h2);
	line-height: 1.08;
	max-width: 28ch;
}

h3 {
	font-size: var(--fs-h3);
	font-weight: 600;
	line-height: 1.25;
}

p { max-width: 60ch; }

a {
	color: var(--pfc-brand);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	transition: color var(--pfc-t);
}

a:hover { color: var(--pfc-brand-dark); }

:focus-visible {
	outline: 2px solid var(--pfc-brand);
	outline-offset: 2px;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

.pfc-visually-hidden,
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

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

/* ============================================================
   Icons, buttons, links
   ============================================================ */
.pfc-icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	flex: none;
	vertical-align: -0.2em;
}

.pfc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 52px;
	padding: 0 24px;
	border: 1px solid transparent;
	border-radius: var(--r-md);
	font-family: var(--pfc-font-body);
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--pfc-t), color var(--pfc-t), border-color var(--pfc-t);
}

.pfc-btn--primary {
	background: var(--pfc-brand);
	border-color: var(--pfc-brand);
	color: #fff;
}

.pfc-btn--primary:hover {
	background: var(--pfc-brand-dark);
	border-color: var(--pfc-brand-dark);
	color: #fff;
}

.pfc-btn--secondary {
	background: transparent;
	border-color: var(--pfc-brand);
	color: var(--pfc-brand);
}

.pfc-btn--secondary:hover {
	background: var(--pfc-brand-soft);
	color: var(--pfc-brand-dark);
}

.pfc-btn--inverted {
	background: var(--pfc-surface);
	border-color: var(--pfc-surface);
	color: var(--pfc-brand);
}

.pfc-btn--inverted:hover {
	background: var(--pfc-brand-soft);
	border-color: var(--pfc-brand-soft);
	color: var(--pfc-brand-dark);
}

.pfc-btn--block { width: 100%; }

.pfc-btn[disabled],
.pfc-btn[aria-busy="true"] {
	cursor: progress;
	opacity: 0.75;
}

.pfc-link { font-weight: 500; }

/* ============================================================
   Skip link and top bar (header.php)
   ============================================================ */
.pfc-skip-link,
.skip-link {
	position: absolute;
	left: var(--pfc-gutter);
	top: -100px;
	z-index: 100;
	padding: 10px 14px;
	background: var(--pfc-surface);
	color: var(--pfc-brand);
	border: 1px solid var(--pfc-brand);
	border-radius: var(--r-sm);
	font-weight: 500;
	text-decoration: none;
}

.pfc-skip-link:focus,
.skip-link:focus { top: 12px; }

.pfc-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--pfc-topbar-h);
	padding-inline: max(var(--pfc-gutter), calc((100% - var(--pfc-container)) / 2));
	background: var(--pfc-bg);
	border-bottom: 1px solid var(--pfc-border);
}

.pfc-topbar > .pfc-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-inline: 0;
}

.pfc-wordmark,
.pfc-topbar__brand {
	font-family: var(--pfc-font-display);
	font-weight: 500;
	/* Viewport cap: the nowrap wordmark must still fit a phone at 200% text size. */
	font-size: min(1.25rem, 6vw);
	letter-spacing: -0.01em;
	color: var(--pfc-ink);
	text-decoration: none;
	white-space: nowrap;
}

.pfc-dot { color: var(--pfc-brand); }

.pfc-topbar__wa {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	font-size: var(--fs-sm);
	font-weight: 500;
	text-decoration: none;
}

.pfc-topbar__wa:hover { text-decoration: underline; }

@media (max-width: 599px) {
	.pfc-topbar__wa-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.pfc-topbar__wa .pfc-icon {
		width: 24px;
		height: 24px;
	}

	/* Icon-only link: 44×44 hit area without shifting the icon. */
	.pfc-topbar__wa {
		min-width: 44px;
		justify-content: center;
		margin-inline-end: -10px;
	}
}

/* ============================================================
   Footer (footer.php)
   ============================================================ */
.pfc-footer {
	margin-top: auto;
	border-top: 1px solid var(--pfc-border);
	padding-block: 3rem;
	font-size: var(--fs-sm);
	color: var(--pfc-ink-soft);
}

.pfc-footer__tagline {
	color: var(--pfc-ink);
	font-weight: 500;
	max-width: 60ch;
}

.pfc-footer__disclaimer {
	margin-top: 1rem;
	font-size: 0.875rem;
	line-height: 1.5;
	max-width: 76ch;
}

.pfc-footer__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-top: 1.5rem;
	padding: 0;
	list-style: none;
}

.pfc-footer__nav a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 44px;
	font-weight: 500;
}

.pfc-footer__copy { margin-top: 1rem; }

/* ============================================================
   Generic page, privacy policy and 404
   ============================================================ */
.pfc-generic,
.pfc-404 {
	max-width: calc(var(--pfc-text) + 2 * var(--pfc-gutter));
	padding: clamp(2.5rem, 2rem + 3vw, 5rem) var(--pfc-gutter) clamp(3rem, 2rem + 4vw, 6rem);
	margin-inline: auto;
}

.pfc-generic h1,
.pfc-404 h1 {
	font-size: var(--fs-h2);
	line-height: 1.08;
}

.pfc-generic h2 {
	font-size: var(--fs-h3);
	line-height: 1.2;
	margin-top: 2.5rem;
}

.pfc-generic h3 { margin-top: 1.75rem; }

.pfc-generic p,
.pfc-generic ul,
.pfc-generic ol { margin-top: 1rem; }

.pfc-generic ul,
.pfc-generic ol { padding-left: 1.4rem; }

.pfc-generic li + li { margin-top: 0.4rem; }

.pfc-generic__meta,
.pfc-generic .pfc-updated {
	margin-top: 2.5rem;
	font-size: var(--fs-sm);
	color: var(--pfc-ink-soft);
}

.pfc-404 p { margin-top: 1rem; }

.pfc-404 .pfc-btn { margin-top: 1.5rem; }

/* ============================================================
   Motion: nothing moves for people who asked it not to
   (JS checks matchMedia too, this block cannot stop its loops)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
