/*
Theme Name: Shirushi
Description: Intro page for the Shirushi store. Tokens follow docs/ui-brief.md in PrintCraftResearch.
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: shirushi
*/

/* Sections, header and footer sit flush; spacing comes from each section's padding. */
.wp-site-blocks > *,
.site-main > * {
	margin-block-start: 0;
}

em,
i {
	font-style: normal;
}

/* Break Japanese headings at phrase boundaries instead of leaving one character on a line. */
h1,
h2,
h3 {
	word-break: auto-phrase;
	text-wrap: balance;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--wp--preset--color--bg);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.site-header__bar {
	min-height: 4rem;
	gap: 1rem;
}

.brand-line {
	margin: 0;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 44px;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-decoration: none;
}

/* Hanko-style seal: the one place the brand mark appears. */
.brand__mark {
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border: 1.5px solid var(--wp--preset--color--accent);
	border-radius: 4px;
	color: var(--wp--preset--color--accent);
	font-size: 1.125rem;
	line-height: 1;
	letter-spacing: 0;
}

.site-nav {
	flex-wrap: nowrap;
	gap: 0.25rem 1.25rem;
	align-items: center;
	justify-content: flex-end;
}

.site-nav > p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
}

.site-nav a:not(.wp-block-button__link) {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.site-nav a:not(.wp-block-button__link):hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.site-nav .wp-block-button__link {
	padding: 0.5rem 1rem;
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 781px) {
	.site-nav__link {
		display: none;
	}
}

/* ---- Sections -------------------------------------------------------------------------- */

.section {
	padding-block: var(--wp--preset--spacing--60);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.section--editor,
.section--promise,
.section--closing {
	background: var(--wp--preset--color--surface);
}

.section h2 {
	margin-block-end: 0.5rem;
}

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

.eyebrow {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.15em;
}

.lead {
	max-width: 36em;
	color: var(--wp--preset--color--muted);
}

.more-link a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-underline-offset: 4px;
}

/* Outline buttons: the theme's button colours are for the filled style only. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	border: 1px solid var(--wp--preset--color--input);
	padding: calc(0.75rem - 1px) calc(1.5rem - 1px);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--tint);
	color: var(--wp--preset--color--ink);
}

.wp-block-button__link {
	min-height: 44px;
	transition: background-color 200ms ease-out;
}

/* ---- Screenshots ----------------------------------------------------------------------- */

.shot img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--surface);
}

.shot--desktop img {
	aspect-ratio: 16 / 10;
	border-radius: 12px;
}

.shot--phone {
	max-width: 300px;
	margin-inline: auto;
}

.shot--phone img {
	aspect-ratio: 390 / 844;
	border-radius: 28px;
	border-width: 8px;
	border-color: var(--wp--preset--color--ink);
}

/* ---- Hero ------------------------------------------------------------------------------ */

.section--hero {
	padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--60);
}

.hero-columns {
	align-items: center !important;
	gap: var(--wp--preset--spacing--50);
}

@media (min-width: 782px) {
	.hero-columns > .wp-block-column:first-child {
		flex: 0 0 58%;
	}
}

/* ---- About ----------------------------------------------------------------------------- */

.about p {
	line-height: 2;
}

/* ---- Editor ---------------------------------------------------------------------------- */

.editor-columns {
	align-items: center !important;
	gap: var(--wp--preset--spacing--50);
}

@media (min-width: 782px) {
	.editor-columns > .wp-block-column:first-child {
		flex: 0 0 60%;
	}
}

.checks {
	list-style: none;
	padding: 0;
}

.checks li {
	position: relative;
	padding-inline-start: 1.75rem;
	margin-block: 0.5rem;
}

.checks li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0.25rem;
	top: 0.55em;
	width: 0.75rem;
	height: 0.4rem;
	border-left: 2px solid var(--wp--preset--color--accent);
	border-bottom: 2px solid var(--wp--preset--color--accent);
	transform: rotate(-45deg);
}

/* ---- Steps and promises ---------------------------------------------------------------- */

.steps {
	counter-reset: step;
	margin-block-start: var(--wp--preset--spacing--40);
}

.steps > .wp-block-column {
	counter-increment: step;
	position: relative;
	padding-inline-start: 3.25rem;
}

.steps > .wp-block-column::before {
	content: counter(step);
	position: absolute;
	inset-inline-start: 0;
	top: 0.1rem;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 50%;
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--serif);
}

.steps h3,
.promises h3 {
	margin: 0 0 0.25rem;
}

.steps p,
.promises p {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
}

.promises {
	margin-block-start: var(--wp--preset--spacing--40);
}

.promises > .wp-block-column {
	border-top: 1px solid var(--wp--preset--color--border);
	padding-top: 1.25rem;
}

/* ---- Occasions ------------------------------------------------------------------------- */

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
}

.chips li {
	margin: 0;
}

.chips a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding-inline: 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	transition: background-color 200ms ease-out;
}

.chips a:hover {
	background: var(--wp--preset--color--tint);
}

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

.faq .wp-block-details {
	border-top: 1px solid var(--wp--preset--color--border);
	margin: 0;
	padding-block: 0.75rem;
}

.faq .wp-block-details:last-of-type {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.faq summary {
	min-height: 44px;
	display: flex;
	align-items: center;
	cursor: pointer;
	font-weight: 700;
}

.faq summary::marker {
	content: "";
}

.faq summary::after {
	content: "+";
	margin-inline-start: auto;
	padding-inline-start: 1rem;
	color: var(--wp--preset--color--accent);
	font-size: 1.25rem;
}

.faq details[open] summary::after {
	content: "−";
}

.faq details p {
	margin-block: 0.5rem 0;
	color: var(--wp--preset--color--muted);
}

/* ---- Closing --------------------------------------------------------------------------- */

.closing {
	text-align: center;
}

.closing .wp-block-buttons {
	justify-content: center;
}

/* ---- Social links ---------------------------------------------------------------------- */

.wp-block-social-links.social {
	gap: 0.25rem;
	margin-block-start: 0.5rem;
}

/* Logos only, in ink: brand colours would compete with the one accent. 24px icon + padding = 44px target. */
.wp-block-social-links.social .wp-social-link a {
	padding: 10px;
}

.wp-block-social-links.social .wp-social-link a:hover {
	color: var(--wp--preset--color--accent);
}

/* Pull the first icon's padding back so it lines up with the text above. */
.site-footer .wp-block-social-links.social {
	margin-inline-start: -10px;
}

.closing .follow {
	margin-block-start: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--small);
}

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

.site-footer {
	padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	font-size: var(--wp--preset--font-size--small);
}

.site-footer h3 {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0;
	margin-block-end: 0.25rem;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.footer-links a:hover {
	text-decoration: underline;
}

.copyright {
	margin-block-start: var(--wp--preset--spacing--40);
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}
}
