/*
 * Guide articles (page-templates/guide.php): a long read set like a fine edition. Loaded only on
 * guide pages, after main.css, whose tokens, buttons, kickers and portrait cards it reuses.
 */

/* Hero ------------------------------------------------------------------- */
.guide-hero {
	position: relative;
	margin-top: calc(var(--header-h) * -1);
	padding: calc(var(--header-h) + clamp(30px, 5vw, 72px)) 0 clamp(44px, 5vw, 80px);
	overflow: hidden;
	overflow: clip;
	background:
		radial-gradient(ellipse 60% 60% at 75% 38%, rgba(242, 217, 160, 0.42), rgba(242, 217, 160, 0) 70%),
		linear-gradient(180deg, var(--parchment) 0%, var(--ivory) 70%, var(--cream) 100%);
}
.guide-hero__inner {
	position: relative;
	display: grid;
	gap: clamp(32px, 5vw, 64px);
	align-items: center;
	max-width: calc(var(--max) + var(--gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--gutter);
}
@media (min-width: 960px) {
	.guide-hero__inner { grid-template-columns: 1.08fr 1fr; }
}
.guide-hero__title { font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.5rem); line-height: 1.02; letter-spacing: -0.012em; }
.guide-hero__subtitle { margin-top: 14px; font-size: clamp(1.25rem, 1.08rem + 0.7vw, 1.65rem); font-style: italic; color: var(--plum); line-height: 1.25; }
.guide-hero__lede { max-width: 36em; margin-top: 20px; font-size: clamp(1.1rem, 1.02rem + 0.36vw, 1.28rem); line-height: 1.6; color: var(--ink-2); }
.guide-hero__lede a { color: var(--plum); text-decoration-color: var(--gold); }
.guide-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 18px 0 26px;
	font-family: var(--sans);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-muted);
}
.guide-hero__meta span + span::before { content: "·"; margin-right: 14px; color: var(--gold); }

.guide-hero__art { justify-self: center; width: 100%; max-width: 560px; }
.guide-hero__looks { display: grid; gap: clamp(10px, 1.6vw, 16px); list-style: none; margin: 0; padding: 0; }
.guide-hero__looks--2 { grid-template-columns: repeat(2, 1fr); }
.guide-hero__looks--3 { grid-template-columns: repeat(3, 1fr); }
.guide-hero__looks--1 { max-width: 340px; margin: 0 auto; }
.guide-hero__looks--3 li:nth-child(2) { transform: translateY(-18px); }
.guide-hero__looks .look { border-radius: 50% 50% 14px 14px / 34% 34% 14px 14px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--hairline-gold), var(--shadow-lift); }
.guide-hero__looks .look__name { font-size: clamp(0.92rem, 0.6rem + 1.2vw, 1.22rem); }
.guide-hero__looks .look__scene { font-size: clamp(0.78rem, 0.6rem + 0.6vw, 0.96rem); }
.guide-hero__note { margin-top: 18px; font-size: 1rem; font-style: italic; text-align: center; color: var(--ink-muted); }

.guide-hero__figure { margin: 0; }
.guide-hero__figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--hairline-gold), var(--shadow-lift);
}
.guide-hero__figure figcaption { margin-top: 18px; text-align: center; }

/* At a glance ------------------------------------------------------------ */
.glance { padding: clamp(36px, 5vw, 64px) var(--gutter); background: var(--cream); }
.glance__inner {
	max-width: 60rem;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 44px);
	border-radius: 26px;
	background: var(--parchment);
	box-shadow: inset 0 0 0 1px var(--hairline-gold), var(--shadow-card);
}
.glance__title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); line-height: 1.15; }
.glance__title::after { content: ""; display: block; width: 64px; height: 1px; margin-top: 14px; background: var(--gold); }
.glance__intro { margin-top: 16px; font-size: 1.18rem; line-height: 1.65; color: var(--ink); }
.glance .guide-table,
.glance .guide-facts,
.glance .guide-list,
.glance .guide-looks { margin-top: 22px; }
.glance a { color: var(--plum); text-decoration-color: var(--gold); }

/* Contents --------------------------------------------------------------- */
.guide-contents a { white-space: nowrap; }

/* Sections --------------------------------------------------------------- */
.guide-section { --pad: clamp(56px, 7vw, 100px); padding: var(--pad) var(--gutter); background: var(--ivory); scroll-margin-top: calc(var(--anchor-gap) - var(--pad)); }
.guide-section--alt { background: var(--parchment); box-shadow: 0 -1px 0 var(--hairline), 0 1px 0 var(--hairline); }
.guide-prose { max-width: 46rem; margin: 0 auto; font-size: 1.22rem; line-height: 1.72; }
.guide-prose > * + * { margin-top: 1.05em; }
.guide-prose h2 { font-size: clamp(1.9rem, 1.5rem + 1.3vw, 2.7rem); line-height: 1.12; letter-spacing: -0.006em; }
.guide-prose h2::after { content: ""; display: block; width: 64px; height: 1px; margin-top: 16px; background: var(--gold); }
.guide-prose .kicker + h2 { margin-top: 10px; }
.guide-prose h3 { margin-top: 1.8em; font-size: clamp(1.4rem, 1.25rem + 0.5vw, 1.7rem); line-height: 1.2; color: var(--plum-ink); scroll-margin-top: var(--anchor-gap); }
.guide-prose p a,
.guide-prose li a,
.guide-prose td a,
.guide-prose dd a { color: var(--plum); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.guide-prose strong { color: var(--plum-ink); }
.guide-list { padding-left: 1.25em; }
.guide-list li + li { margin-top: 0.45em; }
.guide-list li::marker { color: var(--gold-deep); }

/* Wide blocks break out of the reading column. */
.guide-figure--wide,
.guide-looks,
.guide-people,
.guide-table,
.guide-callout {
	width: min(64rem, calc(100vw - 2 * var(--gutter)));
	margin-left: 50%;
	transform: translateX(-50%);
}

/* Figures ---------------------------------------------------------------- */
.guide-figure { margin-top: 1.8em !important; margin-bottom: 0.6em; text-align: center; }
/* Tall plates (most book illustrations) stay a readable size: centred, never taller than the screen. */
.guide-figure img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(76vh, 760px);
	margin: 0 auto;
	border-radius: 12px;
	box-shadow: 0 0 0 5px #fff, 0 0 0 6px var(--hairline-gold), var(--shadow-card);
}
.guide-figure--wide img { max-height: min(84vh, 900px); }
.guide-figure figcaption { max-width: 36rem; margin-left: auto; margin-right: auto; text-align: center; }
.guide-figure figcaption,
.guide-hero__figure figcaption { display: grid; gap: 4px; margin-top: 14px; }
.guide-figure__caption { font-size: 1.02rem; font-style: italic; line-height: 1.45; color: var(--ink-2); }
.guide-figure__credit { font-family: var(--sans); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-muted); }
.guide-figure__credit a { color: inherit; }
@media (min-width: 900px) {
	.guide-figure--side { float: right; width: 44%; margin: 0.4em 0 1em 2em !important; }
	.guide-figure--side + * { margin-top: 0; }
	.guide-section::after { content: ""; display: table; clear: both; }
}

/* Quotations ------------------------------------------------------------- */
.guide-quote {
	display: grid;
	gap: 18px;
	align-items: center;
	margin-top: 1.8em !important;
	margin-bottom: 1.8em;
	padding: clamp(20px, 3vw, 30px);
	border-radius: 22px;
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--hairline-gold), var(--shadow-card);
}
.guide-section--alt .guide-quote { background: var(--ivory); }
.guide-quote--portrait { grid-template-columns: clamp(78px, 18vw, 112px) minmax(0, 1fr); }
.guide-quote__art { display: block; aspect-ratio: 4 / 5; border-radius: 50% 50% 10px 10px / 40% 40% 10px 10px; overflow: hidden; padding: 3px; background: var(--gilt); }
.guide-quote__art img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% 50% 8px 8px / 40% 40% 8px 8px; }
.guide-quote blockquote { margin: 0; }
.guide-quote blockquote p { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); font-style: italic; line-height: 1.45; color: var(--plum-ink); }
.guide-quote figcaption { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; font-family: var(--sans); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); }
.guide-quote figcaption strong { color: var(--ink); font-weight: 600; }
.guide-quote__note { margin-top: 10px; font-size: 1.04rem; line-height: 1.55; color: var(--ink-2); }

/* Portrait strip ----------------------------------------------------------- */
.guide-looks { margin-top: 2em !important; margin-bottom: 1em; }
.guide-looks__title { margin-bottom: 14px; font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); text-align: center; }
.guide-looks__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: clamp(12px, 2vw, 22px); list-style: none; margin: 0; padding: 0; }
.guide-look { display: grid; gap: 4px; text-align: center; text-decoration: none; color: var(--ink); }
.guide-look__art {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: 50% 50% 12px 12px / 34% 34% 12px 12px;
	overflow: hidden;
	padding: 4px;
	background: var(--gilt);
	box-shadow: var(--shadow-card);
	transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}
.guide-look__art img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% 50% 9px 9px / 34% 34% 9px 9px; }
.guide-look:hover .guide-look__art { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.guide-look__name { margin-top: 10px; font-size: 1.18rem; font-weight: 600; line-height: 1.15; }
.guide-look__scene { font-size: 0.98rem; font-style: italic; color: var(--ink-2); }
.guide-look__cta { margin-top: 6px; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); }
.guide-look:hover .guide-look__cta { color: var(--plum); }
.guide-looks__note { margin-top: 16px; font-size: 1.02rem; font-style: italic; text-align: center; color: var(--ink-2); }

/* Character cards (japs_person) inside a guide. */
.guide-people { margin-top: 1.6em !important; }
.guide-people .person { background: #fff; }
.guide-section--alt .guide-people .person { background: var(--ivory); }
.guide-people .person__name { font-size: 1.5rem; }
.guide-people .person__about { font-size: 1.08rem; line-height: 1.6; }

/* Tables ----------------------------------------------------------------- */
.guide-table { margin-top: 1.6em !important; overflow-x: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--hairline-gold); background: #fff; }
.guide-section--alt .guide-table { background: var(--ivory); }
.glance .guide-table { width: 100%; margin-left: 0; transform: none; }
.guide-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 1.04rem; line-height: 1.45; }
.guide-table caption { padding: 16px 20px 4px; font-size: 1rem; font-style: italic; text-align: left; color: var(--ink-2); }
.guide-table th,
.guide-table td { padding: 13px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.guide-table thead th { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); border-bottom-color: var(--hairline-gold); }
.guide-table tbody th { font-weight: 600; color: var(--plum-ink); }
.guide-table tbody tr:last-child th,
.guide-table tbody tr:last-child td { border-bottom: 0; }

/* On phones each row becomes a small card: the first cell as its title, the rest labelled. */
@media (max-width: 640px) {
	.guide-table { overflow: visible; }
	.guide-table table { min-width: 0; }
	.guide-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.guide-table tbody tr { display: grid; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--hairline); }
	.guide-table tbody tr:last-child { border-bottom: 0; }
	.guide-table tbody th,
	.guide-table tbody td { display: block; padding: 0; border: 0; }
	.guide-table tbody th { font-size: 1.12rem; }
	.guide-table tbody td::before {
		content: attr(data-label);
		display: block;
		font-family: var(--sans);
		font-size: 10.5px;
		font-weight: 600;
		letter-spacing: 0.12em;
		text-transform: uppercase;
		color: var(--gold-deep);
	}
	.guide-table tbody td[data-label=""]::before { display: none; }
}

/* Key facts -------------------------------------------------------------- */
.guide-facts { display: grid; gap: 0; margin-top: 1.4em !important; border-top: 1px solid var(--hairline-gold); }
@media (min-width: 700px) { .guide-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }
.guide-facts div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.guide-facts dt { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.guide-facts dd { margin: 0; font-size: 1.12rem; line-height: 1.45; }

/* Timeline --------------------------------------------------------------- */
.guide-timeline { position: relative; margin-top: 1.6em !important; padding: 0 0 0 26px; list-style: none; }
.guide-timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--gold), var(--gold-pale)); }
.guide-timeline li { position: relative; display: grid; gap: 2px; padding: 0 0 18px; }
.guide-timeline li::before { content: ""; position: absolute; left: -25px; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--parchment); box-shadow: inset 0 0 0 2px var(--gold); }
.guide-timeline__when { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); }
.guide-timeline__what { font-size: 1.12rem; line-height: 1.5; }

/* Notes and the app callout ------------------------------------------------ */
.guide-note { padding: 16px 20px; border-radius: 16px; background: var(--cream); font-size: 1.04rem; line-height: 1.55; color: var(--ink-2); box-shadow: inset 3px 0 0 var(--gold); }
.guide-callout {
	display: grid;
	gap: 22px;
	align-items: center;
	margin-top: 2.2em !important;
	margin-bottom: 0.6em;
	padding: clamp(22px, 3vw, 32px);
	border-radius: 26px;
	background:
		radial-gradient(ellipse 70% 90% at 0% 0%, rgba(242, 217, 160, 0.35), rgba(242, 217, 160, 0) 70%),
		var(--cream);
	box-shadow: inset 0 0 0 1px var(--hairline-gold), var(--shadow-card);
}
@media (min-width: 640px) { .guide-callout { grid-template-columns: 160px 1fr; } }
.guide-callout__art { display: block; aspect-ratio: 4 / 5; border-radius: 50% 50% 10px 10px / 40% 40% 10px 10px; overflow: hidden; padding: 4px; background: var(--gilt); }
.guide-callout__art img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% 50% 7px 7px / 40% 40% 7px 7px; }
.guide-callout__title { font-size: clamp(1.4rem, 1.25rem + 0.6vw, 1.75rem); line-height: 1.2; color: var(--plum-ink); }
.guide-callout__text { margin-top: 8px; font-size: 1.1rem; line-height: 1.55; color: var(--ink-2); }
.guide-callout__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.guide-callout__free { font-size: 1rem; font-style: italic; color: var(--ink-muted); }
.guide-callout .kicker { margin-bottom: 8px; }

/* Related guides ----------------------------------------------------------- */
.guide-related { background: var(--parchment); }
.guide-related__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(18px, 2.4vw, 28px); list-style: none; margin: 0; padding: 0; }
.guide-card { display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
.guide-card__art { display: block; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--cream); box-shadow: var(--shadow-card); }
.guide-card__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform 1.2s var(--ease); }
.guide-card:hover .guide-card__art img { transform: scale(1.04); }
.guide-card__title { margin-top: 10px; font-size: 1.4rem; font-weight: 600; line-height: 1.15; color: var(--plum-ink); }
.guide-card__text { font-size: 1.04rem; font-style: italic; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
	.guide-look__art,
	.guide-card__art img { transition: none; }
}
