/*
 * Your Local Japanese Girl — editorial layer.
 * theme.json carries the design tokens; this file carries the details
 * (masthead, cards, quick facts, CTA, motion). Also loaded as editor style.
 */

/* ---------- Base texture ---------- */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
	transition: color 0.25s ease;
}

/* ---------- Header ---------- */

.yljg-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-top: 1.4rem;
	padding-bottom: 1.4rem;
}

.yljg-brand,
.yljg-brand a {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.45rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.2;
}

.yljg-nav a {
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
}

.yljg-nav a:hover {
	color: var(--wp--preset--color--accent-1);
}

/* ---------- Shared editorial atoms ---------- */

.yljg-main {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--60);
}

.yljg-kicker,
.yljg-kicker a {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-1);
	text-decoration: none;
}

.yljg-muted {
	color: var(--wp--preset--color--muted);
}

/* Hairline separators between front-page sections */
.yljg-section {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--50);
}

.yljg-section-title {
	margin: 0;
}

.yljg-section-tagline {
	margin: 0.35rem 0 0;
	font-size: 0.92rem;
	color: var(--wp--preset--color--muted);
}

.yljg-section-more a {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--accent-1);
}

/* ---------- Cards ---------- */

.yljg-card-grid .wp-block-post-template {
	gap: 2.25rem 1.75rem;
}

.yljg-card-title {
	font-size: 1.35rem;
	line-height: 1.3;
	margin: 0.35rem 0 0;
}

.yljg-card-title a {
	text-decoration: none;
}

.yljg-card-title a:hover {
	color: var(--wp--preset--color--accent-1);
}

.yljg-card-excerpt {
	font-size: 0.92rem;
	line-height: 1.7;
	color: var(--wp--preset--color--muted);
}

.yljg-card-excerpt .wp-block-post-excerpt__more-text,
.yljg-card-excerpt .wp-block-post-excerpt__more-link {
	display: none;
}

.yljg-card .yljg-kicker {
	margin-top: 1rem;
}

/* Image hover micro-zoom (cards + hero) */
.wp-block-post-featured-image {
	overflow: hidden;
}

.wp-block-post-featured-image img {
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.yljg-card:hover .wp-block-post-featured-image img,
.yljg-hero-card:hover .wp-block-post-featured-image img {
	transform: scale(1.035);
}

/* ---------- Front hero ---------- */

.yljg-hero-title {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.12;
	max-width: 20ch;
	margin: 0.5rem 0 0;
}

.yljg-hero-title a {
	text-decoration: none;
}

.yljg-hero-title a:hover {
	color: var(--wp--preset--color--accent-1);
}

.yljg-hero-excerpt {
	max-width: 58ch;
	color: var(--wp--preset--color--muted);
}

.yljg-hero-card .yljg-kicker {
	margin-top: 1.5rem;
}

/* ---------- Archives ---------- */

.yljg-archive-head {
	padding-bottom: var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--wp--preset--color--line);
	margin-bottom: var(--wp--preset--spacing--40);
}

.yljg-archive-title {
	font-size: var(--wp--preset--font-size--xx-large);
	margin: 0;
}

.yljg-archive-intro {
	max-width: 52ch;
	color: var(--wp--preset--color--muted);
	margin-top: 0.75rem;
}

/* Narrow max-width elements inside constrained layouts get centered by the
 * core `margin: auto` layout rule — keep these flush left instead. */
.yljg-hero-title,
.yljg-hero-excerpt,
.yljg-archive-intro {
	margin-left: 0 !important;
}

.yljg-pagination {
	margin-top: var(--wp--preset--spacing--50);
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.yljg-pagination a {
	text-decoration: none;
}

/* ---------- Single article ---------- */

.yljg-article-head {
	text-align: center;
	padding-top: var(--wp--preset--spacing--30);
}

.yljg-article-title {
	max-width: 24ch;
	margin: 0.6rem auto 0;
	line-height: 1.12;
}

.yljg-article-date {
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-top: 1rem;
}

.yljg-article-hero {
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--40);
}

.yljg-single .wp-block-post-content > h2 {
	margin-top: 2.5em;
}

.yljg-single .wp-block-post-content a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent-1);
}

.yljg-article-foot {
	margin-top: var(--wp--preset--spacing--60);
}

/* ---------- Quick Facts ---------- */

.yljg-quick-facts {
	background: var(--wp--preset--color--base-2);
	border: 1px solid var(--wp--preset--color--line);
	padding: 1.75rem 1.9rem 1.4rem;
	margin: 2.5rem 0;
}

.yljg-qf-title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-1);
	margin: 0 0 0.6rem;
}

.yljg-qf-row {
	display: grid;
	grid-template-columns: 7.5rem 1fr;
	gap: 0.5rem 1.25rem;
	padding: 0.8rem 0;
	border-top: 1px solid var(--wp--preset--color--line);
	margin: 0;
}

.yljg-qf-label {
	font-size: 0.74rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 0;
	padding-top: 0.2rem;
}

.yljg-qf-value {
	font-size: 0.95rem;
	line-height: 1.65;
	margin: 0;
}

@media (max-width: 480px) {
	.yljg-qf-row {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}

/* ---------- FAQ ---------- */

.yljg-faq {
	margin: 2.5rem 0;
}

.yljg-faq-title {
	font-size: var(--wp--preset--font-size--large);
}

.yljg-faq-item {
	border-top: 1px solid var(--wp--preset--color--line);
	padding: 1rem 0;
	margin: 0;
}

.yljg-faq-item:last-child {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.yljg-faq-item summary {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.2rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

.yljg-faq-item summary::-webkit-details-marker {
	display: none;
}

.yljg-faq-item summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 0;
	color: var(--wp--preset--color--accent-1);
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 400;
	transition: transform 0.3s ease;
}

.yljg-faq-item[open] summary::after {
	transform: rotate(45deg);
}

.yljg-faq-item p {
	font-size: 0.95rem;
	color: var(--wp--preset--color--muted);
	margin-top: 0.6rem;
}

/* ---------- Email CTA ---------- */

.yljg-cta {
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--base);
	padding: clamp(2rem, 5vw, 3.25rem);
	text-align: center;
}

.yljg-cta-title {
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--x-large);
	margin: 0;
}

.yljg-cta-copy {
	color: var(--wp--preset--color--base);
	opacity: 0.85;
	font-size: 0.95rem;
	max-width: 46ch;
	margin: 0.75rem auto 0;
}

.yljg-cta-form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.yljg-cta-form input[type="email"] {
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--wp--preset--color--base);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-size: 0.95rem;
	padding: 0.75rem 0.25rem;
	min-width: min(20rem, 70vw);
	outline-offset: 4px;
}

.yljg-cta-form input[type="email"]::placeholder {
	color: var(--wp--preset--color--base);
	opacity: 0.55;
}

.yljg-cta-form button {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--accent-1);
	border: none;
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 0.85rem 1.75rem;
	cursor: pointer;
	transition: opacity 0.25s ease;
}

.yljg-cta-form button:hover {
	opacity: 0.85;
}

.yljg-cta-note {
	font-size: 0.8rem;
	opacity: 0.7;
	margin-top: 1rem;
	color: var(--wp--preset--color--base);
}

/* ---------- Footer ---------- */

.yljg-footer {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--60);
}

.yljg-footer .yljg-cta {
	margin-top: calc(-1 * var(--wp--preset--spacing--50) - 1px);
	margin-bottom: var(--wp--preset--spacing--50);
}

.yljg-brand-footer,
.yljg-brand-footer a {
	font-size: 1.1rem;
}

.yljg-footnote {
	font-size: 0.85rem;
	margin-top: 0.4rem;
}

.yljg-footer-nav p {
	margin: 0;
}

.yljg-footer-nav a {
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}

.yljg-copyright {
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	margin-top: var(--wp--preset--spacing--40);
}

/* ---------- Search ---------- */

.yljg-search .wp-block-search__input {
	background: transparent;
	border: 1px solid var(--wp--preset--color--line);
	font: inherit;
	padding: 0.7rem 1rem;
}

/* ---------- Motion ----------
 * Initial hidden states are gated on html.yljg-js, which is added by a
 * tiny inline script only when IntersectionObserver exists. No JS (or the
 * block editor) → content simply stays visible.
 */

html.yljg-js .yljg-fade,
html.yljg-js .yljg-card-grid .wp-block-post,
html.yljg-js .yljg-section-head {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

html.yljg-js .yljg-fade.is-inview,
html.yljg-js .yljg-card-grid .wp-block-post.is-inview,
html.yljg-js .yljg-section-head.is-inview {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html.yljg-js .yljg-fade,
	html.yljg-js .yljg-card-grid .wp-block-post,
	html.yljg-js .yljg-section-head {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.wp-block-post-featured-image img,
	.yljg-faq-item summary::after {
		transition: none;
	}

	.yljg-card:hover .wp-block-post-featured-image img,
	.yljg-hero-card:hover .wp-block-post-featured-image img {
		transform: none;
	}
}
