/*
Theme Name: Rosie Harpist
Author: Chai Webs
Author URI: https://chaiwebs.co.uk
Description: A light, dependency-free theme for Rosanna Jones, wedding harpist. Works with the block editor, Polylang (English / Cymraeg) and Contact Form 7. No page builder required.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: rosie-harpist
*/

:root {
	--ink: #241c2b;
	--heather: #6a5480;
	--heather-deep: #4a3a5c;
	--mist: #f2eff5;
	--paper: #ffffff;
	--gilt: #a8802f;
	--string-c: #b3261e;   /* on a harp, every C string is red… */
	--string-f: #1d2a44;   /* …and every F string is dark blue-black */
	--string: #cfc6d8;
	--serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
	--sans: Optima, Candara, "Segoe UI", "Gill Sans", "Trebuchet MS", sans-serif;
	--wide: 68rem;
	--measure: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.125rem;
	line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--heather-deep); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--string-c); }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.2rem); }
h3 { font-size: 1.3rem; font-style: italic; color: var(--heather-deep); }
p, ul, ol { margin: 0 0 1.1em; }
.screen-reader-text, .skip-link:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 99; background: var(--paper); padding: .5rem 1rem; }

/* ---------- Header ---------- */
.site-header { padding: 1.75rem 1.25rem 0; text-align: center; }
.site-header .custom-logo-link { display: inline-block; }
.site-header .custom-logo { width: min(21rem, 78vw); height: auto; margin: 0 auto; }
.site-title { font-size: 2rem; margin: 0; }
.site-title a { text-decoration: none; color: var(--ink); }
.site-nav { margin-top: 1.1rem; font-family: var(--sans); font-size: .95rem; letter-spacing: .03em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem 1.6rem; }
.site-nav a { display: inline-block; padding: .55rem 0; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { border-bottom-color: var(--string-c); color: var(--ink); }
.site-nav .lang-item a { color: var(--heather); font-style: italic; font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; }
.nav-toggle { display: none; }

/* The strings: a band of fine vertical lines, red at each C and dark at each F,
   exactly as a harp is strung (seven strings to the octave). */
.strings, hr.wp-block-separator {
	border: 0; height: 2.25rem; margin: 2.5rem auto; max-width: none; width: 100%; opacity: 1;
	background:
		repeating-linear-gradient(90deg, var(--string-c) 0 1.5px, transparent 1.5px 84px),
		repeating-linear-gradient(90deg, transparent 0 36px, var(--string-f) 36px 37.5px, transparent 37.5px 84px),
		repeating-linear-gradient(90deg, var(--string) 0 1px, transparent 1px 12px);
	background-position: center;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.site-header .strings { margin: 1.25rem auto 0; height: 1.5rem; }

/* ---------- Content ---------- */
.site-main { padding: 2.5rem 1.25rem 3rem; }
.entry { max-width: var(--wide); margin: 0 auto; }
.entry-title { text-align: center; margin-bottom: 1.5rem; }
.entry-content > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.entry-content > .wp-block-columns,
.entry-content > .wp-block-media-text,
.entry-content > .rh-testimonials,
.entry-content > .wp-block-separator { max-width: var(--wide); }
.entry-content > h2 { text-align: center; margin-top: 2.5rem; }
.entry-content > h2:first-child { margin-top: 0; }
.entry-content > h2 + p { text-align: center; }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-bottom: 2rem; align-items: flex-start; }
.wp-block-column { flex: 1 1 15rem; min-width: 0; }
.wp-block-image { margin: 0 0 1.25rem; }
.wp-block-image img { width: 100%; }
.wp-block-column h3 a { text-decoration: none; }
.wp-block-list { padding-left: 1.1em; }
.wp-block-list li { margin-bottom: .2em; }
.wp-block-list li::marker { color: var(--gilt); }
.wp-block-list.is-style-rh-plain { list-style: none; padding: 0; font-size: 1.02rem; }
.wp-block-list.is-style-rh-plain li { padding: .35em 0; border-bottom: 1px solid var(--mist); margin: 0; }

.wp-block-buttons { display: flex; justify-content: center; margin: 2.5rem auto; }
.wp-block-button__link, .wpcf7-submit {
	display: inline-block; background: var(--heather-deep); color: #fff; border: 0; border-radius: 2px;
	font-family: var(--sans); font-size: 1.05rem; letter-spacing: .04em; padding: .9rem 2.2rem; text-decoration: none; cursor: pointer;
}
.wp-block-button__link:hover, .wpcf7-submit:hover { background: var(--ink); color: #fff; }

/* Home hero */
.rh-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0; background: var(--mist); margin-top: -2.5rem; margin-bottom: 0; }
.rh-hero .wp-block-media-text__media { margin: 0; grid-column: 2; grid-row: 1; align-self: stretch; }
.rh-hero .wp-block-media-text__media img { width: 100%; height: 100%; min-height: 22rem; object-fit: cover; object-position: 60% 30%; }
.rh-hero .wp-block-media-text__content { grid-column: 1; grid-row: 1; padding: 3rem clamp(1.5rem, 5vw, 4.5rem); }
.rh-hero h1 { margin-bottom: .5em; }
.rh-hero p { font-size: 1.2rem; max-width: 30rem; margin-bottom: 0; }
.home .entry { max-width: none; }
.home .site-main { padding-left: 0; padding-right: 0; }
.home .entry-content > * { padding-left: 1.25rem; padding-right: 1.25rem; }
.home .entry-content > .rh-hero, .home .entry-content > .wp-block-separator { max-width: none; padding: 0; }

/* Testimonials */
.rh-testimonials { columns: 3 17rem; column-gap: 2.5rem; margin-top: 2rem; margin-bottom: 2rem; }
.rh-testimonial { break-inside: avoid; margin: 0 0 2rem; padding: 0 0 0 1.25rem; border-left: 1.5px solid var(--string-c); }
.rh-testimonial p { font-style: italic; margin: 0 0 .5em; }
.rh-testimonial footer { font-family: var(--sans); font-size: .9rem; color: var(--heather); }

/* Audio playlist (core) */
.wp-playlist.wp-playlist-light { border: 0; background: var(--mist); padding: 1.25rem; font-family: var(--sans); font-size: .95rem; margin: 0 auto 2rem; }
.wp-playlist .wp-playlist-current-item { display: none; }
.wp-playlist .wp-playlist-item { padding: .45rem .25rem; border-bottom: 1px solid #e0d9e6; }
.wp-playlist .wp-playlist-playing { background: transparent; font-weight: 600; color: var(--string-c); }
.wp-playlist .wp-playlist-item-length { top: .45rem; }
.wp-playlist a { text-decoration: none; }

/* Contact form */
.wpcf7 label { display: block; font-family: var(--sans); font-size: .95rem; margin-bottom: 1rem; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 textarea {
	display: block; width: 100%; margin-top: .3rem; padding: .7rem .8rem; font: inherit; font-family: var(--serif); font-size: 1.05rem;
	color: var(--ink); background: #fff; border: 1px solid #b9adc4; border-radius: 2px;
}
.wpcf7 textarea { min-height: 9rem; }
.wpcf7 .wpcf7-not-valid-tip { color: var(--string-c); font-size: .9rem; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: .75rem 1rem; border-width: 1px; font-family: var(--sans); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e9e3ee; text-align: center; padding: 2.5rem 1.25rem; font-family: var(--sans); font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .4em; }
.site-footer .footer-name { font-family: var(--serif); font-size: 1.4rem; font-style: italic; }
.site-footer .footer-small { opacity: .7; font-size: .85rem; margin-top: 1rem; }

@media (max-width: 46rem) {
	body { font-size: 1.06rem; }
	.rh-hero { grid-template-columns: 1fr; }
	.rh-hero .wp-block-media-text__media, .rh-hero .wp-block-media-text__content { grid-column: 1; grid-row: auto; }
	.rh-hero .wp-block-media-text__media img { min-height: 0; aspect-ratio: 3 / 2; }
	.nav-toggle { display: inline-block; margin-top: 1rem; background: none; border: 1px solid var(--heather); color: var(--ink); font-family: var(--sans); font-size: .95rem; padding: .5rem 1.2rem; border-radius: 2px; cursor: pointer; }
	.site-nav ul { display: none; flex-direction: column; gap: 0; }
	.site-nav.is-open ul { display: flex; }
	.site-nav a { padding: .7rem 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
