/*
Theme Name: Kastania
Theme URI: https://kastaniaphoto.com/
Author: Kastania Photo
Description: Editorial block theme for Kastania Photo. The sage homepage is ready the moment you activate the theme. The Weddings, Commercial & Real Estate and Social & Content pages come as separate import files, each with its own colours and menu.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kastania
Tags: full-site-editing, block-patterns, photography, portfolio, custom-colors
*/

/* ------------------------------------------------------------------
   1. Page foundations
   ------------------------------------------------------------------ */

.wp-site-blocks > * { margin-block: 0; }
.wp-block-post-content > .alignfull,
.wp-block-post-content > .kp-page { margin-block: 0; }

.kp-page {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.45;
	letter-spacing: -0.01em;
	color: var(--kp-fg);
	overflow-x: clip;
}
.kp-page > * { margin-block: 0 !important; }
.kp-page a { color: inherit; }
.kp-page a:hover { opacity: 0.75; }
.kp-page p { margin: 0; }

/* Page-wide colour settings (used by the mobile menu and accents) */
.kp-page--home      { --kp-accent: #c9dc5e; --kp-on-accent: #1f2a23; --kp-menu-bg: #d4d9c7; --kp-menu-fg: #1f2a23; }
.kp-page--weddings  { --kp-accent: #c9dc5e; --kp-on-accent: #1f2a23; --kp-menu-bg: #e3e8db; --kp-menu-fg: #1f2a23; }
.kp-page--commercial{ --kp-accent: #c8102e; --kp-on-accent: #ffffff; --kp-menu-bg: #ffffff; --kp-menu-fg: #0a0a0a; }
.kp-page--social    { --kp-accent: #ff7a2f; --kp-on-accent: #14112b; --kp-menu-bg: #ffc2df; --kp-menu-fg: #14112b; }

/* ------------------------------------------------------------------
   2. Sections and their colours
   ------------------------------------------------------------------ */

.kp-sec { padding-block: clamp(88px, 9vw, 128px); color: var(--kp-fg); background: var(--kp-bg); }
.kp-sec--tight { padding-block: clamp(64px, 7vw, 104px); }
.kp-sec--flush-top { padding-top: 0; }
.kp-sec--flush { padding-block: 0; }
.kp-sec > * { margin-block: 0 !important; }

.kp-wrap {
	max-width: 1440px;
	margin-inline: auto;
	padding-inline: clamp(16px, 3vw, 40px);
	box-sizing: border-box;
}

/* Homepage — sage */
.kp-sec--sage   { --kp-bg: #d4d9c7; --kp-fg: #1f2a23; --kp-muted: #46524a; --kp-line: #aab39b; }
.kp-sec--lichen { --kp-bg: #c3cab4; --kp-fg: #1f2a23; --kp-muted: #3f4b42; --kp-line: #96a089; }
/* Weddings — alternating sage */
.kp-sec--pale   { --kp-bg: #e3e8db; --kp-fg: #1f2a23; --kp-muted: #3f4b42; --kp-line: #b9c3ad; }
.kp-sec--deep   { --kp-bg: #b2bfa6; --kp-fg: #1f2a23; --kp-muted: #2c3830; --kp-line: #8d9c82; }
/* Commercial — black, white, crimson */
.kp-sec--white  { --kp-bg: #ffffff; --kp-fg: #0a0a0a; --kp-muted: #4d4d4d; --kp-line: #d4d4d4; }
.kp-sec--black  { --kp-bg: #0a0a0a; --kp-fg: #ffffff; --kp-muted: #a3a3a3; --kp-line: #3d3d3d; }
/* Social — pink, cobalt, tangerine */
.kp-sec--pink      { --kp-bg: #ffc2df; --kp-fg: #14112b; --kp-muted: #4a3b55; --kp-line: #e08fb6; }
.kp-sec--cobalt    { --kp-bg: #2b3cff; --kp-fg: #ffffff; --kp-muted: #dfe2ff; --kp-line: #8a94ff; }
.kp-sec--tangerine { --kp-bg: #ff7a2f; --kp-fg: #14112b; --kp-muted: #14112b; --kp-line: #14112b; }
.kp-sec--night     { --kp-bg: #14112b; --kp-fg: #ffc2df; --kp-muted: #ffc2df; --kp-line: #3a3460; }

/* ------------------------------------------------------------------
   3. Type
   ------------------------------------------------------------------ */

.kp-page h1, .kp-page h2, .kp-page h3 { margin: 0; color: inherit; text-wrap: balance; }

.kp-wordmark {
	font-family: var(--wp--preset--font-family--sans) !important;
	font-weight: 500 !important;
	font-size: clamp(72px, 13.8vw, 199px) !important;
	line-height: 0.8 !important;
	letter-spacing: -0.016em !important;
	text-transform: uppercase;
}
.kp-wordmark--md { font-size: clamp(56px, 10vw, 150px) !important; line-height: 0.82 !important; letter-spacing: -0.02em !important; }
.kp-wordmark--color { color: var(--kp-title, inherit) !important; }
.kp-page--social .kp-wordmark--color { --kp-title: #2b3cff; }

.kp-display { font-size: clamp(56px, 8vw, 115px); line-height: 0.85; letter-spacing: -0.04em; }
.kp-display--tight { line-height: 0.8; }
.kp-h2 { font-size: clamp(50px, 5vw, 69px); line-height: 0.9; letter-spacing: -0.04em; }
.kp-h3 { font-size: clamp(40px, 3.6vw, 50px); line-height: 0.95; letter-spacing: -0.03em; }
.kp-h3--lg { font-size: clamp(44px, 4.4vw, 65px); line-height: 0.88; letter-spacing: -0.04em; }
.kp-serif-lead {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: clamp(34px, 3.4vw, 50px);
	line-height: 0.95;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	max-width: 680px;
}
.kp-price-big {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: clamp(64px, 8vw, 115px);
	line-height: 0.8;
	letter-spacing: -0.04em;
	text-transform: uppercase;
}

.kp-label { font-size: 12px; text-transform: uppercase; letter-spacing: -0.012em; color: var(--kp-muted, inherit); }
.kp-lead { font-size: 26px; line-height: 1.2; letter-spacing: -0.006em; }
.kp-note { font-size: 13px; color: var(--kp-muted); }
.kp-muted { color: var(--kp-muted); }
.kp-max { max-width: 620px; }
.kp-cta-link { font-size: 14px; text-transform: uppercase; }
.kp-cta-link a { text-underline-offset: 4px; }
.kp-page--commercial .kp-cta-link a { text-decoration-color: #c8102e; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.kp-accent-text { color: var(--kp-accent); }

/* ------------------------------------------------------------------
   4. Layout helpers
   ------------------------------------------------------------------ */

.kp-stack { display: flex; flex-direction: column; gap: 20px; }
.kp-stack--lg { gap: 40px; }
.kp-stack--xl { gap: 64px; }
.kp-stack > * { margin: 0 !important; }

.kp-split { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-end; }
.kp-split > * { margin: 0 !important; }
.kp-split > :first-child { flex: 2 1 520px; }
.kp-split > :last-child { flex: 1 1 340px; }
.kp-split--even > :first-child, .kp-split--even > :last-child { flex: 1 1 400px; }
.kp-split--center { align-items: center; }
.kp-split--top { align-items: flex-start; }

.kp-grid { display: grid; gap: 24px; }
.kp-grid > * { margin: 0 !important; }
.kp-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px 64px; }
.kp-grid--2-tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.kp-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.kp-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.kp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.kp-head > * { margin: 0 !important; }
.kp-head--ruled { border-bottom: 1px solid var(--kp-line); padding-bottom: 24px; }

.kp-ruled { border-top: 1px solid var(--kp-line); padding-top: 20px; }
.kp-ruled--strong { border-top: 1px solid var(--kp-fg); padding-top: 24px; }
.kp-page--commercial .kp-ruled--strong { border-top: 2px solid #c8102e; }

.kp-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--kp-line); padding-top: 12px; }
.kp-caption > * { margin: 0 !important; }
.kp-caption__title {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: 26px;
	text-transform: uppercase;
	letter-spacing: -0.006em;
}

/* ------------------------------------------------------------------
   5. Photos (swap the placeholders for your own images)
   ------------------------------------------------------------------ */

.kp-photo { margin: 0 !important; }
.kp-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.kp-photo--tall img { aspect-ratio: 3 / 4; }
.kp-photo--land img { aspect-ratio: 4 / 3; }
.kp-photo--wide img { aspect-ratio: 21 / 9; }
.kp-photo--phone img { aspect-ratio: 9 / 16; }

.kp-card-photo { display: flex; flex-direction: column; gap: 14px; }
.kp-card-photo > * { margin: 0 !important; }
.kp-card-photo__name {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: 34px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: -0.02em;
}

.kp-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.kp-phones > * { margin: 0 !important; }
.kp-phones > :nth-child(2) { margin-bottom: 48px !important; }
.kp-phones--framed .kp-photo img { outline: 1px solid var(--kp-fg); outline-offset: -1px; }

/* ------------------------------------------------------------------
   6. Hero (the photo at the top of a page)
   ------------------------------------------------------------------ */

.kp-hero.wp-block-cover { padding: 0; align-items: stretch; color: #f3f5ef; }
.kp-hero .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	max-width: none;
	color: inherit;
}
.kp-hero .wp-block-cover__inner-container > * { margin: 0 !important; }
.kp-hero__bottom { padding: 0 clamp(16px, 3vw, 40px) clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 20px; }
.kp-hero__bottom > * { margin: 0 !important; }

.kp-util {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 14px clamp(16px, 3vw, 40px);
	font-size: 12px;
	text-transform: uppercase;
}
.kp-util > * { margin: 0 !important; }
.kp-util a { text-decoration: none; }
.kp-util--onphoto { border-bottom: 1px solid rgba(243, 245, 239, 0.35); }
.kp-util--black { background: #0a0a0a; color: #ffffff; }
.kp-util--night { background: #14112b; color: #ffc2df; }

.kp-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding: 20px clamp(16px, 3vw, 40px);
	font-size: 14px;
	text-transform: uppercase;
}
.kp-bar > * { margin: 0 !important; }
.kp-bar--ruled { border-bottom: 1px solid var(--kp-line); }
.kp-brand { font-weight: 700; letter-spacing: 0.02em; }
.kp-brand a { text-decoration: none; }
.kp-brand span { font-weight: 500; opacity: 0.8; }
.kp-page--social .kp-brand span { color: #2b3cff; opacity: 1; }

.kp-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; font-size: 12px; text-transform: uppercase; }
.kp-meta > * { margin: 0 !important; }

/* Menus */
.kp-nav .wp-block-navigation__container { gap: 8px 28px; }
.kp-nav .wp-block-navigation-item__content { color: inherit; text-decoration: none; font-size: 14px; text-transform: uppercase; }
.kp-nav .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--kp-menu-bg) !important;
	color: var(--kp-menu-fg) !important;
	padding: 24px;
}
.kp-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 22px; }
.kp-nav .wp-block-navigation__responsive-container-open,
.kp-nav .wp-block-navigation__responsive-container-close { color: inherit; }

/* ------------------------------------------------------------------
   7. Buttons, chips and small details
   ------------------------------------------------------------------ */

.kp-buttons { margin: 0 !important; }
.kp-btn .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	border: 1px solid currentColor;
	border-radius: 3px;
	background: transparent;
	color: inherit;
	font-size: 14px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0;
	text-decoration: none;
	box-sizing: border-box;
}
.kp-btn--solid .wp-block-button__link { background: var(--kp-fg); color: var(--kp-bg); border-color: var(--kp-fg); }
.kp-btn--light .wp-block-button__link { background: #f3f5ef; color: #1f2a23; border-color: #f3f5ef; }
.kp-btn--accent .wp-block-button__link { background: var(--kp-accent); color: var(--kp-on-accent); border-color: var(--kp-accent); }
.kp-page--social .kp-btn--accent .wp-block-button__link { border-color: #14112b; }
.kp-btn--cobalt .wp-block-button__link { background: #2b3cff; color: #ffffff; border-color: #2b3cff; }

.kp-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	align-self: flex-start;
	padding: 8px 12px;
	border-radius: 3px;
	font-size: 13px;
	text-transform: uppercase;
}
.kp-chip--lime { background: #c9dc5e; color: #1f2a23; }
.kp-chip--pine { background: #1f2a23; color: #e3e8db; font-size: 12px; }
.kp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--kp-accent); vertical-align: middle; margin-right: 8px; }
.kp-chip .kp-dot { margin-right: 0; }
.kp-dot--pine { background: #1f2a23; }
.kp-dot--lime { background: #c9dc5e; }

/* The 7-date calendar for the year */
.kp-dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.kp-dates span { height: 44px; border: 1px solid var(--kp-fg); }
.kp-dates span.is-booked { background: var(--kp-fg); }

/* Scrolling place names */
.kp-marquee { overflow: hidden; border-block: 1px solid var(--kp-line); padding-block: 20px; }
.kp-marquee__track {
	display: block;
	width: max-content;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: clamp(34px, 3.6vw, 50px);
	line-height: 1;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	animation: kp-marquee 40s linear infinite;
}
@keyframes kp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .kp-marquee__track { animation: none; } }

/* ------------------------------------------------------------------
   8. Lists: menu rows, inclusions, steps, specs
   ------------------------------------------------------------------ */

.kp-rows { border-top: 1px solid var(--kp-line); }
.kp-rows--strong { border-top: 2px solid var(--kp-fg); }
.kp-page--commercial .kp-rows--strong { border-top-color: #0a0a0a; }
.kp-rows > * { margin: 0 !important; }
.kp-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; padding: 28px 0; border-bottom: 1px solid var(--kp-line); }
.kp-row > * { margin: 0 !important; }
.kp-row__num { font-size: 13px; color: var(--kp-muted); min-width: 32px; }
.kp-page--social .kp-row__num { color: #2b3cff; }
.kp-row__title {
	flex: 2 1 320px;
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 300;
	font-size: clamp(34px, 3.4vw, 50px);
	line-height: 0.9;
	letter-spacing: -0.03em;
	text-transform: uppercase;
}
.kp-row__title a { text-decoration: none; }
.kp-row__desc { flex: 2 1 320px; }
.kp-row__price { font-size: 14px; text-transform: uppercase; }

.kp-incl { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--kp-line); }
.kp-incl > * { margin: 0 !important; }
.kp-incl > :last-child { font-size: 12px; text-transform: uppercase; color: var(--kp-muted); }

.kp-card { border: 1px solid var(--kp-line); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.kp-card > * { margin: 0 !important; }
.kp-card > :first-child { font-size: 14px; text-transform: uppercase; }
.kp-card > :last-child { font-size: 13px; color: var(--kp-muted); }

.kp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 24px; }
.kp-steps > * { margin: 0 !important; }
.kp-step { border-top: 1px solid var(--kp-line); padding: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.kp-step > * { margin: 0 !important; }
.kp-step__num { font-family: var(--wp--preset--font-family--serif); font-weight: 300; font-size: 50px; line-height: 0.9; }
.kp-step__title { font-size: 14px; text-transform: uppercase; }
.kp-step__text { font-size: 15px; color: var(--kp-muted); }

.kp-spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #0a0a0a; border-top: 3px solid #c8102e; }
.kp-spec > * { margin: 0 !important; }
.kp-spec__item { padding: 24px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid #d4d4d4; }
.kp-spec__item:nth-child(odd) { border-right: 1px solid #d4d4d4; }
.kp-spec__item:nth-last-child(-n+2) { border-bottom: 0; }
.kp-spec__item > * { margin: 0 !important; }
.kp-spec__value { font-family: var(--wp--preset--font-family--serif); font-weight: 300; font-size: clamp(30px, 3vw, 42px); line-height: 1; text-transform: uppercase; }

.kp-month { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border-top: 1px solid var(--kp-line); border-left: 1px solid var(--kp-line); }
.kp-month > * { margin: 0 !important; }
.kp-month__cell { border-right: 1px solid var(--kp-line); border-bottom: 1px solid var(--kp-line); padding: 24px; min-height: 220px; display: flex; flex-direction: column; gap: 12px; }
.kp-month__cell > * { margin: 0 !important; }
.kp-month__cell--hot { background: #ff7a2f; color: #14112b; --kp-muted: #14112b; }
.kp-month__title { font-family: var(--wp--preset--font-family--serif); font-weight: 300; font-size: 42px; line-height: 0.95; text-transform: uppercase; }

.kp-topline { border-top: 2px solid var(--kp-fg); padding-top: 12px; }
.kp-topline--cobalt { border-top-color: #2b3cff; }
.kp-topline--tangerine { border-top-color: #ff7a2f; }

/* Testimonial */
.kp-quote { border-block: 1px solid var(--kp-line); padding: 52px 28px 32px; display: flex; flex-direction: column; gap: 24px; }
.kp-quote > * { margin: 0 !important; }
.kp-quote__text { font-size: 26px; line-height: 1.25; letter-spacing: -0.006em; max-width: 880px; }

/* FAQ (Details blocks) */
.kp-faq { border-top: 1px solid var(--kp-fg); }
.kp-faq > * { margin: 0 !important; }
.kp-faq .wp-block-details { border-bottom: 1px solid var(--kp-line); padding: 20px 0; }
.kp-faq summary { font-size: 18px; cursor: pointer; }
.kp-faq .wp-block-details > p { margin-top: 12px; color: var(--kp-muted); max-width: 640px; }

/* Where your contact form goes */
.kp-form-slot { border: 1px dashed var(--kp-fg); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 12px; }
.kp-form-slot > * { margin: 0 !important; }

/* Footer row */
.kp-foot { padding-block: 32px; }
.kp-foot .kp-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; font-size: 13px; text-transform: uppercase; }
.kp-foot .kp-wrap > * { margin: 0 !important; }
.kp-foot a { text-decoration: none; }
.kp-foot__links a { margin-right: 24px; }
.kp-foot__links a:last-child { margin-right: 0; }
.kp-foot--ruled { border-top: 1px solid var(--kp-line); }

/* ------------------------------------------------------------------
   9. Simple header and footer for blog posts and other pages
   ------------------------------------------------------------------ */

.kp-site-header { background: #d4d9c7; color: #1f2a23; border-bottom: 1px solid #aab39b; --kp-menu-bg: #d4d9c7; --kp-menu-fg: #1f2a23; }
.kp-site-footer { background: #b2bfa6; color: #1f2a23; }
.kp-site-header .wp-block-site-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; margin: 0; }
.kp-site-header .wp-block-site-title a { text-decoration: none; color: inherit; }
.kp-article { padding-block: clamp(64px, 7vw, 104px); padding-inline: clamp(16px, 3vw, 40px); }
.kp-article .wp-block-post-title { font-size: clamp(44px, 5vw, 69px); }

/* ------------------------------------------------------------------
   10. Extra helpers
   ------------------------------------------------------------------ */

.kp-pad-top { padding-top: 48px; }
.kp-pad-bottom { padding-bottom: clamp(88px, 9vw, 128px); }
.kp-hero__top > * { margin: 0 !important; }
.kp-head-block { background: var(--kp-bg); color: var(--kp-fg); }
.kp-head-block > * { margin: 0 !important; }
.kp-hero-plain { padding-top: clamp(40px, 5vw, 80px); }
.kp-foot { background: var(--kp-bg); color: var(--kp-fg); }
.kp-grid--cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; }
.kp-split--rev > :first-child { flex: 1 1 320px; }
.kp-split--rev > :last-child { flex: 2 1 560px; }
.kp-rows--plain > * { margin: 0 !important; padding: 12px 0; border-bottom: 1px solid var(--kp-line); }
.kp-topline--ink { border-top-color: #14112b; }

@media (max-width: 600px) {
	.kp-phones > :nth-child(2) { margin-bottom: 24px !important; }
	.kp-spec { grid-template-columns: 1fr; }
	.kp-spec__item:nth-child(odd) { border-right: 0; }
	.kp-spec__item:nth-last-child(2) { border-bottom: 1px solid #d4d4d4; }
}
