/*
Theme Name: Too Close To The Mirror
Theme URI: https://floulexweb.com/
Author: Floulex Web
Author URI: https://floulexweb.com/
Description: Website for Too Close To The Mirror Restoration & Deliverance Ministries, Kinston, North Carolina. Built from scratch.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: tctm
*/

/*
 * PALETTE, taken from the church's own seal ("The Seal of the Apostle", sent by
 * Apostle Alice Poole on 2026-10-28): royal purple and gold. The sanctuary's walls
 * are lavender too, so the site sits in the same room as the photographs.
 *   seal purple, sampled  #4d145c   -> deep panels #2e0d3a, text/buttons #5b2170
 *   seal gold, sampled    #e4b45c   -> used only on the deep purple (never as text on light)
 *   gold for text on light, darkened to #7a5418
 * Measured (WCAG): ink on ground 15.92, muted on ground 6.83, purple on ground 10.13,
 * white on purple 11.07, on-deep on deep 14.87, deep-muted on deep 8.84, gold on deep 8.89,
 * dark gold on ground 6.18.
 *
 * Type: Young Serif (display, one weight, warm and upright) over Atkinson
 * Hyperlegible Next (body, made for low-vision readers). Both OFL, self-hosted,
 * latin only.
 *
 * Signature: the church's name printed with its own reflection under it in the
 * opening of the home page (2 Corinthians 3:18, the church's statement of faith).
 * Nothing else moves except one reveal per element.
 */

@font-face { font-family: "Young Serif"; src: url("assets/fonts/young-serif-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("assets/fonts/atkinson-next-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("assets/fonts/atkinson-next-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
	--tc-ground: #f6f4f7;
	--tc-surface: #ffffff;
	--tc-ink: #1f1724;
	--tc-muted: #5a5260;
	--tc-line: #ddd6e0;
	--tc-accent: #5b2170;
	--tc-deep: #2e0d3a;
	--tc-on-deep: #f3eef5;
	--tc-deep-muted: #c4b6cc;
	--tc-gold: #e4b45c;
	--tc-gold-ink: #7a5418;
	--tc-display: "Young Serif", Georgia, "Times New Roman", serif;
	--tc-body: "Atkinson Next", "Atkinson Hyperlegible", -apple-system, "Segoe UI", Arial, sans-serif;
	--tc-wrap: 74rem;
	--tc-gutter: clamp(1.1rem, 4vw, 2.5rem);
}

html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--tc-ground);
	color: var(--tc-ink);
	font-family: var(--tc-body);
	font-size: 1.125rem;
	line-height: 1.6;
	overflow-x: clip;
}
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tc-accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--tc-ink); }
:focus-visible { outline: 3px solid var(--tc-accent); outline-offset: 3px; }

/* WordPress wrappers: the theme draws every section itself. */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
main.tc-main { margin: 0; padding: 0; }
.tc-main > .wp-block-post-content > * { margin-block: 0; max-width: none; }
.wp-block-post-content { margin: 0; }

.tc-wrap { width: 100%; max-width: var(--tc-wrap); margin: 0 auto; padding-inline: var(--tc-gutter); }
.tc-measure { max-width: 40rem; }

h1, h2, h3 { font-family: var(--tc-display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0; }
.tc-lede { font-size: 1.3rem; line-height: 1.55; }
.tc-small { font-size: 1rem; color: var(--tc-muted); }

/* Buttons */
.tc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 3rem; padding: 0.7rem 1.4rem;
	background: var(--tc-accent); color: #fff; border: 1px solid var(--tc-accent);
	font: 700 1.05rem/1.2 var(--tc-body); text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
.tc-btn:hover { background: var(--tc-ink); border-color: var(--tc-ink); color: #fff; }
.tc-btn--ghost { background: transparent; color: var(--tc-ink); border-color: var(--tc-ink); }
.tc-btn--ghost:hover { background: var(--tc-ink); color: #fff; }
.tc-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ------------------------------------------------------------------ header */
.tc-bar { position: sticky; top: 0; z-index: 50; background: var(--tc-ground); border-bottom: 1px solid var(--tc-line); }
.tc-bar.is-scrolled { box-shadow: 0 6px 18px rgba(46, 13, 58, .08); }
.tc-bar__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }
.tc-mark { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--tc-ink); line-height: 1.1; min-width: 0; }
.tc-mark__seal { width: 2.6rem; height: auto; flex: none; border: 0; }
.tc-mark__text { display: flex; flex-direction: column; min-width: 0; }
.tc-mark__name { font-family: var(--tc-display); font-size: 1.32rem; }
.tc-mark__sub { font-size: 0.8rem; letter-spacing: 0.02em; color: var(--tc-muted); margin-top: 0.2rem; }
.tc-mark:hover { color: var(--tc-ink); }

.tc-nav { display: flex; align-items: center; gap: 0.25rem; }
.tc-nav a {
	display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.85rem;
	color: var(--tc-ink); text-decoration: none; font-weight: 600; font-size: 1.02rem;
	border-bottom: 2px solid transparent;
}
.tc-nav a:hover { color: var(--tc-accent); }
.tc-nav a[aria-current="page"] { border-bottom-color: var(--tc-accent); }
.tc-nav .tc-nav__give { margin-left: 0.5rem; background: var(--tc-accent); color: #fff; border: 0; padding: 0 1.15rem; }
.tc-nav .tc-nav__give:hover { background: var(--tc-ink); color: #fff; }
.tc-nav .tc-nav__give[aria-current="page"] { background: var(--tc-ink); }

.tc-menu { display: none; }
.tc-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 0.9rem; border: 1px solid var(--tc-ink); font-weight: 700; }
.tc-menu > summary::-webkit-details-marker { display: none; }
.tc-menu__panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--tc-ground); border-bottom: 1px solid var(--tc-line); box-shadow: 0 14px 28px rgba(46,13,58,.14); }
.tc-menu__panel nav { display: flex; flex-direction: column; padding: 0.5rem var(--tc-gutter) 1.25rem; }
.tc-menu__panel a { min-height: 3.1rem; display: flex; align-items: center; border-bottom: 1px solid var(--tc-line); color: var(--tc-ink); text-decoration: none; font-size: 1.15rem; font-weight: 600; }
.tc-menu__panel a[aria-current="page"] { color: var(--tc-accent); }

@media (max-width: 760px) {
	.tc-bar__in > .tc-nav { display: none; }
	.tc-menu { display: block; }
	.tc-mark__name { font-size: 1.12rem; }
	.tc-mark__sub { font-size: 0.74rem; }
}

/* ------------------------------------------------------------------ sections */
.tc-sec { padding-block: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--tc-line); }
.tc-sec--first { border-top: 0; }
.tc-sec--surface { background: var(--tc-surface); }
.tc-sec--deep { background: var(--tc-deep); color: var(--tc-on-deep); border-top: 0; }
.tc-sec--deep a { color: var(--tc-gold); }
.tc-sec--deep a:hover { color: #fff; }
.tc-sec--deep .tc-small { color: var(--tc-deep-muted); }
.tc-head { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 2.25rem; max-width: 44rem; }
.tc-kicker { font-size: 1rem; font-weight: 700; color: var(--tc-accent); }
.tc-sec--deep .tc-kicker { color: var(--tc-gold); }

.tc-two { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.tc-two--flip > :first-child { order: 2; }
@media (max-width: 860px) {
	.tc-two { grid-template-columns: minmax(0, 1fr); }
	.tc-two--flip > :first-child { order: 0; }
}
.tc-stack { display: flex; flex-direction: column; gap: 1.1rem; }

/* ------------------------------------------------------------------ opening (home) */
.tc-open { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.tc-open__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 4rem); align-items: end; }
@media (max-width: 900px) { .tc-open__grid { grid-template-columns: minmax(0, 1fr); } }
.tc-name { position: relative; }
.tc-name h1 { font-size: clamp(2.9rem, 7.4vw, 5.8rem); line-height: 0.98; letter-spacing: -0.01em; }
.tc-name h1 span { display: block; }
/* The reflection: the same words, flipped, fading out. Decoration only. */
.tc-name__echo {
	font-family: var(--tc-display); font-size: clamp(2.9rem, 7.4vw, 5.8rem); line-height: 0.98; letter-spacing: -0.01em;
	height: 0.98em; overflow: hidden; margin-top: 0.04em;
	transform: scaleY(-1); transform-origin: center;
	color: var(--tc-accent); opacity: 0.2; user-select: none; pointer-events: none;
	/* The mask is drawn before the flip, so "to bottom" ends up strongest next to the words. */
	-webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(0,0,0,1));
	mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(0,0,0,1));
}
.tc-name__echo span { display: block; }
.tc-name__echo span:first-child { display: none; }
.tc-glass { height: 2px; background: linear-gradient(90deg, var(--tc-gold), rgba(228,180,92,0)); margin: 0.2rem 0 1.4rem; }
.tc-open__sub { font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-family: var(--tc-display); color: var(--tc-ink); }
.tc-open__where { margin-top: 0.4rem; color: var(--tc-muted); }
.tc-open__lede { margin-top: 1.6rem; max-width: 38rem; }
.tc-open .tc-btns { margin-top: 1.8rem; }

/* The rail: the facts a visitor needs, set like a notice. */
.tc-rail { background: var(--tc-surface); border: 1px solid var(--tc-line); border-top: 3px solid var(--tc-accent); padding: 1.5rem 1.5rem 1.25rem; }
.tc-rail h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.tc-rail dl { margin: 0; display: grid; gap: 1rem; }
.tc-rail dt { font-size: 0.95rem; font-weight: 700; color: var(--tc-muted); }
.tc-rail dd { margin: 0.15rem 0 0; font-size: 1.12rem; }
.tc-rail .tc-next { font-family: var(--tc-display); font-size: 1.35rem; color: var(--tc-accent); line-height: 1.25; }

/* ------------------------------------------------------------------ figures */
.tc-fig { margin: 0; }
.tc-fig img { width: 100%; height: auto; border: 1px solid var(--tc-line); background: var(--tc-surface); }
.tc-fig figcaption { font-size: 0.98rem; color: var(--tc-muted); margin-top: 0.6rem; }
.tc-sec--deep .tc-fig img { border-color: #4a2a57; }
.tc-sec--deep .tc-fig figcaption { color: var(--tc-deep-muted); }

/* ------------------------------------------------------------------ verse */
.tc-verse { margin: 0; padding-left: 1.5rem; border-left: 3px solid var(--tc-accent); }
.tc-verse p { font-family: var(--tc-display); font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.42; }
.tc-verse cite { display: block; margin-top: 1rem; font-style: normal; font-weight: 700; font-size: 1rem; color: var(--tc-muted); }
.tc-sec--deep .tc-verse { border-left-color: var(--tc-gold); }
.tc-sec--deep .tc-verse cite { color: var(--tc-deep-muted); }

/* ------------------------------------------------------------------ facts list */
.tc-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--tc-line); }
.tc-facts > li { padding: 1.4rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--tc-line); display: flex; flex-direction: column; gap: 0.5rem; }
.tc-facts > li + li { padding-left: 1.5rem; border-left: 1px solid var(--tc-line); }
.tc-facts h3 { font-size: 1.3rem; }
@media (max-width: 860px) {
	.tc-facts { grid-template-columns: minmax(0, 1fr); }
	.tc-facts > li + li { padding-left: 0; border-left: 0; }
}

/* Times table on the visit page */
.tc-times { width: 100%; border-collapse: collapse; }
.tc-times th, .tc-times td { text-align: left; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--tc-line); vertical-align: top; }
.tc-times th { font-weight: 700; width: 46%; }
.tc-times td { color: var(--tc-ink); }
.tc-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--tc-line); }
.tc-dates li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.85rem 0; border-bottom: 1px solid var(--tc-line); }
.tc-dates b { font-weight: 700; }

/* People */
.tc-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 640px) { .tc-people { grid-template-columns: minmax(0, 1fr); } }
.tc-person { display: flex; flex-direction: column; gap: 0.9rem; }
.tc-person h3 { font-size: 1.4rem; }
.tc-role { font-weight: 700; color: var(--tc-accent); font-size: 1rem; }
.tc-sec--deep .tc-role { color: var(--tc-gold); }

/* Giving */
.tc-cash { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.5rem; background: var(--tc-surface); border: 1px solid var(--tc-line); border-top: 3px solid var(--tc-accent); }
.tc-cash__tag { font-family: var(--tc-display); font-size: clamp(2rem, 5vw, 2.8rem); color: var(--tc-ink); line-height: 1.1; word-break: break-word; }

/* Map */
.tc-map { margin-top: 1.5rem; border: 1px solid var(--tc-line); background: var(--tc-surface); }
.tc-map iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; }
@media (max-width: 640px) { .tc-map iframe { aspect-ratio: 4 / 3; } }

/* Teaser link */
.tc-more { font-weight: 700; text-decoration: none; display: inline-flex; gap: 0.4rem; align-items: center; }
.tc-more::after { content: "\2192"; transition: transform .2s ease; }
.tc-more:hover::after { transform: translateX(3px); }

/* Launch post / blog */
.tc-post { padding-block: clamp(3rem, 7vw, 5rem); }
.tc-post .wp-block-post-title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.tc-post .wp-block-post-date { color: var(--tc-muted); font-size: 1rem; margin-bottom: 2rem; }
.tc-post .wp-block-post-content > * + * { margin-top: 1.1rem; }
.tc-post .wp-block-post-content { max-width: 40rem; }
.wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.wp-block-post-template > li { padding: 1.5rem 0; border-bottom: 1px solid var(--tc-line); }
.wp-block-post-template .wp-block-post-title a { color: var(--tc-ink); text-decoration: none; }
.wp-block-post-template .wp-block-post-title a:hover { color: var(--tc-accent); }
.wp-block-video video, .wp-block-embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--tc-line); }

/* ------------------------------------------------------------------ footer */
.tc-foot { background: var(--tc-deep); color: var(--tc-on-deep); padding-block: 3.5rem 2.25rem; }
.tc-foot a { color: var(--tc-on-deep); }
.tc-foot a:hover { color: var(--tc-gold); }
.tc-foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 2rem; }
@media (max-width: 860px) { .tc-foot__grid { grid-template-columns: minmax(0, 1fr); } }
.tc-foot__name { font-family: var(--tc-display); font-size: 1.5rem; line-height: 1.2; }
.tc-foot h2 { font-family: var(--tc-body); font-size: 0.95rem; font-weight: 700; color: var(--tc-deep-muted); margin-bottom: 0.6rem; }
.tc-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.tc-foot p + p { margin-top: 0.35rem; }
.tc-foot__base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #4a2a57; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: 0.95rem; color: var(--tc-deep-muted); }
.tc-foot .fx-credit { margin: 0; color: var(--tc-deep-muted); }
.tc-foot .fx-credit a { color: var(--tc-on-deep); }
.tc-main > .wp-block-post-content > .fx-credit-about, .fx-credit-about { margin: 0 auto; max-width: var(--tc-wrap); padding: 1.5rem var(--tc-gutter) 3rem; font-size: 1rem; color: var(--tc-muted); }

/* 404 */
.tc-404 { padding-block: clamp(4rem, 10vw, 8rem); }
.tc-404 h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 1rem; }

/* ------------------------------------------------------------------ motion */
.js .tc-rev { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .tc-rev.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.js .tc-rev { opacity: 1; transform: none; transition: none; }
	* { scroll-behavior: auto !important; }
}

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
