/* The House of Seyd'amour — base layer.
 *
 * Everything a page needs before a single component is styled: the type scale, the button,
 * the containers, the block classes the template parts reuse, and the alignwide and
 * alignfull escape hatches that a classic theme has to provide for itself.
 *
 * Colour, type and spacing arrive as --wp--preset--* custom properties from theme.json,
 * and Appearance > Customize writes over those same properties at :root. Nothing in this
 * file hard codes a brand colour.
 */

/* ==========================================================================
   Document
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
	--hos-gutter: clamp(20px, 5vw, 60px);
	--hos-content: 780px;
	--hos-wide: 1320px;
	--hos-logo-w: 250px;
}

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background-color: var(--wp--preset--color--warm-white, #FCFAF9);
	color: var(--wp--preset--color--graphite, #3A3639);
	font-family: var(--wp--preset--font-family--body, var(--hos-font-body, "Jost", sans-serif));
	font-size: var(--wp--preset--font-size--medium, 1.06rem);
	font-weight: 400;
	line-height: 1.72;
	letter-spacing: .005em;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, video, iframe, svg { max-width: 100%; height: auto; }
figure { margin: 0; }

/* ==========================================================================
   Type
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--wp--preset--font-family--display, var(--hos-font-display, Georgia, serif));
	color: var(--wp--preset--color--noir, #0B0B0D);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: .005em;
	margin: 0 0 .6em;
	text-wrap: balance;
}
h1 { font-size: var(--wp--preset--font-size--heading-xl, clamp(2.6rem, 6vw, 4.6rem)); }
h2 { font-size: var(--wp--preset--font-size--heading-lg, clamp(2rem, 4.4vw, 3.1rem)); }
h3 { font-size: var(--wp--preset--font-size--heading-md, clamp(1.35rem, 2.4vw, 1.75rem)); line-height: 1.26; }
h4 { font-size: var(--wp--preset--font-size--heading-sm, 1.25rem); line-height: 1.34; }
h5, h6 { font-size: 1rem; }

p { margin: 0 0 1.4rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--wp--preset--color--pink-deep, #6B6668); }

strong, b { font-weight: 500; color: var(--wp--preset--color--noir, #0B0B0D); }
small { font-size: .82em; }

blockquote {
	margin: 2rem 0;
	padding-left: 1.4rem;
	border-left: 2px solid var(--hos-hair-pink, rgba(217, 154, 168, .34));
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: 1.3rem;
	line-height: 1.5;
}

hr, .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--hos-hair-pink, rgba(217, 154, 168, .34));
	margin: 2.5rem auto;
}

ul, ol { margin: 0 0 1.4rem; padding-left: 1.3em; }
li { margin-bottom: .5em; }

code, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .9em;
	background: var(--wp--preset--color--petal, #FAFAFA);
}
pre { padding: 1.2rem; overflow-x: auto; }

table { border-collapse: collapse; width: 100%; }
th, td { padding: .8em 1em; border-bottom: 1px solid var(--hos-hair-pink, rgba(217, 154, 168, .34)); text-align: left; }

/* Preset font size classes, since the templates use them by name. */
.has-eyebrow-font-size { font-size: var(--wp--preset--font-size--eyebrow, .76rem); }
.has-small-font-size { font-size: var(--wp--preset--font-size--small, .92rem); }
.has-medium-font-size { font-size: var(--wp--preset--font-size--medium, 1.06rem); }
.has-lede-font-size { font-size: var(--wp--preset--font-size--lede, 1.22rem); }
.has-heading-md-font-size { font-size: var(--wp--preset--font-size--heading-md, 1.75rem); }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }

/* ==========================================================================
   Layout containers
   ========================================================================== */
.hos-container {
	width: 100%;
	margin-inline: auto;
	padding-inline: var(--hos-gutter);
}
.hos-container--wide { max-width: calc(var(--hos-wide) + var(--hos-gutter) * 2); }
.hos-container--content { max-width: calc(var(--hos-content) + var(--hos-gutter) * 2); }

.hos-band { position: relative; }
.hos-band--pad-0 { padding-block: 0; }
.hos-band--pad-30 { padding-block: var(--wp--preset--spacing--30, clamp(1.5rem, 3vw, 2.5rem)); }
.hos-band--pad-40 { padding-block: var(--wp--preset--spacing--40, clamp(2.5rem, 5vw, 4rem)); }
.hos-band--pad-50 { padding-block: var(--wp--preset--spacing--50, clamp(4rem, 8vw, 7.5rem)); }

.hos-grid { display: grid; gap: clamp(1rem, 2vw, 1.6rem); }
.hos-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* Post listing with an optional sidebar. */
.hos-layout { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 900px) {
	.hos-layout--sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* ==========================================================================
   Background colour classes, so the palette can be named in markup
   ========================================================================== */
.has-noir-background-color { background-color: var(--wp--preset--color--noir, #0B0B0D); }
.has-ink-background-color { background-color: var(--wp--preset--color--ink, #171518); }
.has-pink-background-color { background-color: var(--wp--preset--color--pink, #E4E2E2); }
.has-blush-background-color { background-color: var(--wp--preset--color--blush, #F4F3F3); }
.has-petal-background-color { background-color: var(--wp--preset--color--petal, #FAFAFA); }
.has-white-background-color { background-color: var(--wp--preset--color--white, #fff); }
.has-warm-white-background-color { background-color: var(--wp--preset--color--warm-white, #FCFAF9); }

.has-noir-color { color: var(--wp--preset--color--noir, #0B0B0D); }
.has-blush-color { color: var(--wp--preset--color--blush, #F4F3F3); }
.has-smoke-color { color: var(--wp--preset--color--smoke, #6B6668); }
.has-white-color { color: var(--wp--preset--color--white, #fff); }

/* Anything sitting on a dark band inherits the light text rather than restating it. */
.has-noir-background-color h1,
.has-noir-background-color h2,
.has-noir-background-color h3,
.has-ink-background-color h1,
.has-ink-background-color h2,
.has-ink-background-color h3 { color: var(--wp--preset--color--white, #fff); }

/* ==========================================================================
   Block classes reused by the PHP sections
   ========================================================================== */
.wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40, clamp(2.5rem, 5vw, 4rem));
	margin-block: 0;
}
.wp-block-column { flex: 1 1 0%; min-width: 0; }
.are-vertically-aligned-center { align-items: center; }
.is-vertically-aligned-center { align-self: center; }

@media (max-width: 781px) {
	.wp-block-columns { flex-direction: column; gap: var(--wp--preset--spacing--30, 2rem); }
	.wp-block-column { flex-basis: auto !important; width: 100%; }
}

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: .8rem;
	margin-top: var(--wp--preset--spacing--30, 2rem);
}
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-button { margin: 0; }

.wp-block-button__link,
.wp-element-button {
	display: inline-block;
	border: 0;
	cursor: pointer;
	border-radius: 2px;
	background-color: var(--wp--preset--color--noir, #0B0B0D);
	color: var(--wp--preset--color--white, #fff);
	font-family: var(--wp--preset--font-family--body, inherit);
	font-size: .7rem;
	font-weight: 400;
	letter-spacing: .18em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	padding: 1.15em 2.4em;
}
.wp-block-button__link:hover,
.wp-element-button:hover {
	background-color: var(--wp--preset--color--graphite, #3A3639);
	color: var(--wp--preset--color--white, #fff);
}

/* Kept for markup that still asks for it; the default button is already black. */
.hos-button--noir > .wp-block-button__link {
	background-color: var(--wp--preset--color--noir, #0B0B0D);
	color: var(--wp--preset--color--white, #fff);
}
.hos-button--noir > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--pink, #E4E2E2);
	color: var(--wp--preset--color--noir, #0B0B0D);
}

.wp-block-image { margin-block: 0; }
.wp-block-image img { display: block; width: 100%; }
.wp-block-image figcaption {
	font-size: .82rem;
	color: var(--wp--preset--color--mist, #A5A0A2);
	margin-top: .7rem;
	text-align: center;
}

.wp-block-details { margin-block: 0; }
.wp-block-details summary { cursor: pointer; }

/* ==========================================================================
   Editor content: alignwide and alignfull
   ==========================================================================

   A flow container, not a narrow wrapper with escape hatches.

   The obvious way to do this in a classic theme is to put the content in a 780px box and
   let alignfull break out with `margin-left: calc(50% - 50vw); width: 100vw`. Two things
   go wrong with that, and both of them shipped once.

   100vw counts the scrollbar and the container's 50% does not, so every full width band
   ends up about 7px to the left and 15px too wide, which is enough to give the whole page
   a horizontal scrollbar.

   Worse, `.hos-entry .alignfull` is a descendant selector, so it also matches an aligned
   block nested inside a full width group — and the homepage is full of those. The nested
   block gets the escape applied a second time, against a parent that is already full
   width, and lands hundreds of pixels off screen with its text cut off.

   So: the entry owns the page width, its direct children are constrained instead, and
   nothing needs a negative margin or a viewport unit. Nested blocks are left alone, which
   is correct — the block layout CSS already handles them.
   ========================================================================== */
.hos-entry > * { margin-block: 1.5rem; }
.hos-entry > *:first-child { margin-top: 0; }
.hos-entry > *:last-child { margin-bottom: 0; }

.hos-entry--flow > * {
	width: min(100% - var(--hos-gutter) * 2, var(--hos-content));
	max-width: none;
	margin-inline: auto;
}
.hos-entry--flow > .alignwide {
	width: min(100% - var(--hos-gutter) * 2, var(--hos-wide));
}
/* Full width bands sit flush against each other, so no gap between backgrounds. */
.hos-entry--flow > .alignfull,
.hos-entry--flow > .hos-marquee {
	width: 100%;
	margin-inline: 0;
	margin-block: 0;
}

.hos-entry .alignleft { float: left; margin: .4rem 1.6rem 1.2rem 0; }
.hos-entry .alignright { float: right; margin: .4rem 0 1.2rem 1.6rem; }
.hos-entry .aligncenter { margin-inline: auto; }

/* ==========================================================================
   Forms
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: .9em 1.1em;
	border: 1px solid var(--hos-hair-pink, rgba(217, 154, 168, .34));
	border-radius: 2px;
	background: var(--wp--preset--color--white, #fff);
	color: inherit;
	font: inherit;
	font-size: .95rem;
}
input:focus, select:focus, textarea:focus {
	outline: 2px solid var(--wp--preset--color--pink-deep, #6B6668);
	outline-offset: 1px;
	border-color: transparent;
}
label { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .5em; }
button, input[type="submit"] { font: inherit; }

.hos-search { display: flex; gap: .6rem; flex-wrap: wrap; }
.hos-search__field { flex: 1 1 14rem; }
.hos-search__submit { flex: 0 0 auto; }

/* ==========================================================================
   Accessibility
   ========================================================================== */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}
.skip-link:focus {
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	top: 8px;
	left: 8px;
	z-index: 999;
	padding: .8em 1.4em;
	background: var(--wp--preset--color--noir, #0B0B0D);
	color: #fff;
}
:focus-visible { outline: 2px solid var(--wp--preset--color--pink-deep, #6B6668); outline-offset: 2px; }
