/*
Theme Name:   Advaita (Twenty Twenty-Five Child)
Theme URI:    https://advaita.intensifiedperceptions.com
Description:  Quiet reading layout for advaita.intensifiedperceptions.com. Child theme of Twenty Twenty-Five.
Author:       Intensified Perceptions OG
Author URI:   https://www.intensifiedperceptions.com
Template:     twentytwentyfive
Version:      1.0.5
Requires at least: 6.7
License:      GNU General Public License v2 or later
Text Domain:  twentytwentyfive-advaita
*/

/* ---------------------------------------------------------------------------
   Fonts (local, SIL Open Font License)
   ------------------------------------------------------------------------ */
@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Cormorant Garamond";
	font-style: italic;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
}
@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}

/* ---------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------ */
:root {
	--nd-paper:  #f3f1ea;
	--nd-card:   #f8f6f0;
	--nd-ink:    #26231f;
	--nd-text:   #2f2b26;
	--nd-muted:  #625b52;
	--nd-sepia:  #74563c;
	--nd-line:   #e3ded2;
	--nd-serif:  "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
	--nd-sans:   var(--wp--preset--font-family--manrope, system-ui, sans-serif);
}

body {
	background: var(--nd-paper);
	color: var(--nd-text);
	font-family: var(--nd-sans);
}

a { color: var(--nd-sepia); }
a:hover { color: var(--nd-ink); }

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

/* ---------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------ */
.nd-header {
	padding-top: 1.6rem;
	padding-bottom: 1.6rem;
	border-bottom: 1px solid var(--nd-line);
}
.nd-header .wp-block-site-title {
	font-family: var(--nd-serif);
	font-weight: 600;
	font-size: 1.55rem;
	letter-spacing: 0.02em;
	margin: 0;
}
.nd-header .wp-block-site-title a { color: var(--nd-ink); text-decoration: none; }
.nd-nav {
	font-size: 0.84rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	gap: 1.6rem;
}
.nd-nav a { color: var(--nd-muted); text-decoration: none; }
.nd-nav a:hover,
.nd-nav .current-menu-item a { color: var(--nd-sepia); }

/* ---------------------------------------------------------------------------
   Intro on the front page
   ------------------------------------------------------------------------ */
.nd-intro {
	padding-top: clamp(3rem, 8vw, 5.5rem);
	padding-bottom: clamp(2rem, 5vw, 3.5rem);
	text-align: center;
}
.nd-intro h1 {
	font-family: var(--nd-serif);
	font-weight: 500;
	font-size: clamp(2.3rem, 6vw, 3.4rem);
	line-height: 1.1;
	color: var(--nd-ink);
	margin: 0 0 1rem;
}
.nd-intro p {
	color: var(--nd-muted);
	font-size: 1.15rem;
	line-height: 1.65;
	max-width: 32em;
	margin: 0 auto;
}

/* ---------------------------------------------------------------------------
   Post card (front page + single)
   The card is a flex column. Post content and the advaita wrapper are
   "dissolved" with display:contents so that the occasion can sit above the
   featured image — for old and new posts alike.
   ------------------------------------------------------------------------ */
.nd-card {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding-bottom: clamp(3.5rem, 9vw, 6rem);
	margin-bottom: clamp(3.5rem, 9vw, 6rem);
	border-bottom: 1px solid var(--nd-line);
}
.nd-card:last-child { border-bottom: 0; }
.nd-card > *,
.nd-card .advaita-wrap > * { margin-block: 0 !important; }

.nd-card .wp-block-post-content,
.nd-card .advaita-wrap { display: contents; }

.nd-card .advaita-source            { order: 1; }
.nd-card .wp-block-post-featured-image { order: 2; }
.nd-card .advaita-sutra             { order: 3; }
.nd-card .advaita-section           { order: 4; }
.nd-card .advaita-pointer           { order: 5; }
.nd-card .nd-meta                  { order: 6; }

/* Occasion */
.advaita-source {
	font-size: 1.12rem;
	line-height: 1.55;
	color: var(--nd-text);
	text-align: left;
}
.advaita-source-label {
	display: block;
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--nd-sepia);
	margin-bottom: 0.3rem;
}
.advaita-source-text { font-style: italic; }

/* Image */
.nd-card .wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	border-radius: 2px;
	display: block;
}

/* Sutra */
.advaita-sutra p {
	font-family: var(--nd-serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.75rem, 4.4vw, 2.35rem);
	line-height: 1.28;
	color: var(--nd-ink);
	border-left: 2px solid var(--nd-sepia);
	padding: 0.1rem 0 0.1rem 1.1rem;
	margin: 0.4rem 0;
}

/* Sections */
.advaita-label {
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--nd-sepia);
	margin-bottom: 0.4rem;
}
.advaita-section p {
	font-size: 1.15rem;
	line-height: 1.72;
	margin: 0;
}
.advaita-section + .advaita-section { padding-top: 1.5rem; border-top: 1px solid var(--nd-line); }

.advaita-analogy {
	background: var(--nd-card);
	border-top: 0 !important;
	padding: 1.3rem 1.4rem !important;
}
.advaita-analogy p {
	font-family: var(--nd-serif);
	font-style: italic;
	font-size: 1.5rem;
	line-height: 1.42;
	color: var(--nd-ink);
}
.advaita-analogy-link {
	display: inline-block;
	margin-top: 0.8rem;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	color: var(--nd-sepia);
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}

/* Final pointer */
.advaita-pointer {
	text-align: center;
	padding: 1.2rem 0 0.4rem;
}
.advaita-pointer::before {
	content: "";
	display: block;
	width: 2.2rem;
	height: 1px;
	background: var(--nd-sepia);
	margin: 0 auto 1.3rem;
	opacity: 0.6;
}
.advaita-pointer p {
	font-family: var(--nd-serif);
	font-style: italic;
	font-size: clamp(1.45rem, 3.6vw, 1.8rem);
	line-height: 1.4;
	color: var(--nd-ink);
	max-width: 26em;
	margin: 0 auto;
}

/* Date (single only) */
.nd-meta {
	font-size: 0.86rem;
	color: var(--nd-muted);
	letter-spacing: 0.04em;
	text-align: center;
}

/* Previous / next on single */
.nd-postnav {
	font-size: 0.98rem;
	gap: 1.5rem;
	padding-bottom: 4rem;
}
.nd-postnav a { text-decoration: none; }
.nd-postnav .post-navigation-link-next { text-align: right; }

/* Pagination */
.nd-main .wp-block-query-pagination {
	font-size: 0.98rem;
	padding-bottom: 4rem;
	gap: 1rem;
}
.nd-main .wp-block-query-pagination a { text-decoration: none; }

/* ---------------------------------------------------------------------------
   Pages (FAQ, Imprint, About)
   ------------------------------------------------------------------------ */
.nd-page {
	padding-top: clamp(2.5rem, 7vw, 4.5rem);
	padding-bottom: 5rem;
}
.nd-page .wp-block-post-title {
	font-family: var(--nd-serif);
	font-weight: 500;
	font-size: clamp(2.2rem, 5.5vw, 3rem);
	line-height: 1.12;
	color: var(--nd-ink);
	margin-bottom: 2rem;
}
.nd-page h2,
.nd-page h3 {
	font-family: var(--nd-serif);
	font-weight: 600;
	color: var(--nd-ink);
	line-height: 1.2;
}
.nd-page h2 { font-size: 1.85rem; margin-top: 3.2rem; }
.nd-page h3 { font-size: 1.35rem; margin-top: 2rem; }
.nd-page p,
.nd-page li,
.nd-page dd { font-size: 1.14rem; line-height: 1.72; }
.nd-page .nd-lead {
	font-family: var(--nd-serif);
	font-style: italic;
	font-size: 1.55rem;
	line-height: 1.45;
	color: var(--nd-ink);
}
.nd-page dt {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--nd-ink);
	margin-top: 1rem;
}
.nd-page dd { margin: 0.2rem 0 0; line-height: 1.65; }
.nd-page dd em { color: var(--nd-muted); }

/* Explanation of a post's parts */
.nd-step {
	border-left: 2px solid var(--nd-line);
	padding-left: 1.1rem;
	margin: 1.6rem 0;
}
.nd-step .advaita-label { margin-bottom: 0.25rem; }
.nd-step p { margin: 0.3rem 0 0; }

/* Analogy glossary */
.nd-analogy-entry {
	background: var(--nd-card);
	padding: 1.3rem 1.4rem;
	margin: 1.2rem 0;
	scroll-margin-top: 2rem;
	border-left: 2px solid transparent;
	transition: border-color 0.4s ease;
}
.nd-analogy-entry h3 { margin: 0 0 0.5rem; }
.nd-analogy-entry p { margin: 0.4rem 0 0; }
.nd-analogy-entry:target { border-left-color: var(--nd-sepia); }
.nd-sanskrit {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nd-sepia);
}

.nd-imprint h2 { font-size: 1.45rem; margin-top: 2.4rem; }

/* ---------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------ */
.nd-footer {
	border-top: 1px solid var(--nd-line);
	padding-top: 3rem;
	padding-bottom: 3rem;
	text-align: center;
	color: var(--nd-muted);
	font-size: 0.92rem;
}
.nd-footer .nd-kitsune img {
	width: 48px;
	height: auto;
	opacity: 0.85;
	margin: 0 auto;
}
.nd-footer .nd-claim {
	font-family: var(--nd-serif);
	font-style: italic;
	font-size: 1.3rem;
	color: var(--nd-text);
	margin: 0.8rem 0 0.4rem;
}
.nd-footer a { color: var(--nd-muted); text-decoration: none; }
.nd-footer a:hover { color: var(--nd-sepia); }

@media (max-width: 600px) {
	.nd-nav { gap: 1.1rem; }
	.advaita-analogy { padding: 1.1rem 1.1rem !important; }
}

/* Labels inside pages keep their small caps size */
.nd-page p.advaita-label,
.nd-page p.nd-sanskrit { font-size: 0.78rem; line-height: 1.4; margin: 0 0 0.3rem; }
.nd-analogy-entry h3 { font-size: 1.45rem; }

/* Featured images open in the lightbox */
.wp-block-post-featured-image img { cursor: zoom-in; }

/* Small link to the single post (front page) */
.nd-permalink {
	display: block;
	width: fit-content;
	margin-inline: auto;
	color: var(--nd-muted);
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}
.nd-permalink:hover { color: var(--nd-sepia); }

/* Focus ring only for keyboard users (not after a mouse click / lightbox close) */
.wp-block-post-featured-image img:focus { outline: none; }
.wp-block-post-featured-image img:focus-visible {
	outline: 2px solid var(--nd-sepia);
	outline-offset: 4px;
}

/* About signature */
.nd-page .nd-signature {
	font-family: var(--nd-serif);
	font-style: italic;
	font-size: 1.3rem;
	line-height: 1.5;
	color: var(--nd-ink);
	margin-top: 2.5rem;
}
