/*
 * Showcase Landscaping: global design system.
 * Hand-authored (no build step). Enqueued on the front end AND inside the block
 * editor (add_editor_style), so blocks look identical in both. Per-block
 * style.scss files consume the --sc-* custom properties below.
 *
 * TOKENS ARE THE DESIGN'S OWN NAMES. The homepage mockup
 * (designs/showcase-landscaping/assets/css/showcase.css) already uses the --sc-
 * prefix, so its section CSS ports into block style.scss files without renaming.
 * The starter's semantic names (--sc-dark, --sc-accent-ink, …) are kept as
 * ALIASES at the bottom of :root so the shared editor chrome keeps resolving.
 * Change a colour in the first block; never in the alias block.
 *
 * ONE NAME CHANGED MEANING: --sc-text is the BODY FONT (the design's name), not
 * the text colour. Text colour is --sc-ink.
 *
 * Fonts: the @font-face rules come from theme.json (settings.typography
 * .fontFamilies[].fontFace), which WordPress prints on the front end and inside
 * the editor iframe. Do not add a second @font-face here.
 */

:root {
	/* --- Colour --- */
	--sc-forest: #22351a;      /* dark bands, headings */
	--sc-forest-2: #2d4522;    /* forest hover / second dark ground */
	--sc-forest-deep: #17240f; /* footer ground */
	--sc-olive: #506038;       /* logo olive: rules, icons, accent text on light */
	--sc-leaf: #88c040;        /* logo lime: thin accents on DARK only */
	--sc-sun: #e8893b;         /* the primary action fill (ink text on it) */
	--sc-sun-hover: #f09a50;
	--sc-gold: #e8c068;        /* review stars only */
	--sc-ink: #1b2414;         /* text */
	--sc-ink-2: #4b5443;       /* secondary text on light */
	--sc-on-dark: #ffffff;
	--sc-on-dark-2: #d5dccb;   /* secondary text on forest */
	--sc-stone: #f2f4ef;       /* alt light ground */
	--sc-white: #ffffff;
	--sc-line: #dfe3d8;
	--sc-line-dark: rgba(255, 255, 255, 0.14);

	/* --- Type --- */
	--sc-display: "Wix Madefor Display", "Segoe UI", system-ui, sans-serif;
	--sc-text: "Wix Madefor Text", "Segoe UI", system-ui, sans-serif;

	--sc-step--1: 0.875rem;
	--sc-step-0: 1.0625rem;
	--sc-step-1: 1.25rem;
	--sc-step-2: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
	--sc-step-3: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem);
	--sc-step-4: clamp(2.15rem, 1.6rem + 2.6vw, 4rem);

	/* --- Space + shape --- */
	--sc-gutter: clamp(16px, 4vw, 40px);
	--sc-max: 1240px;
	--sc-section: clamp(64px, 8vw, 112px);
	--sc-radius: 8px;
	--sc-radius-lg: 14px;
	--sc-shadow: 0 1px 2px rgba(27, 36, 20, 0.06), 0 8px 24px -8px rgba(27, 36, 20, 0.16);
	--sc-shadow-lg: 0 2px 4px rgba(27, 36, 20, 0.06), 0 24px 48px -16px rgba(27, 36, 20, 0.28);
	--sc-ease: cubic-bezier(0.16, 1, 0.3, 1);

	/* Sticky header height. Anchor targets subtract it (scroll-padding-top). */
	--sc-header-h: 76px;

	/* Scrollbar width, published by theme.js. */
	--sc-sbw: 0px;

	/* --- Starter aliases (editor chrome + older helpers). Do not edit. --- */
	--sc-dark: var(--sc-forest);
	--sc-dark-deep: var(--sc-forest-deep);
	--sc-dark-line: var(--sc-line-dark);
	--sc-accent: var(--sc-leaf);
	--sc-accent-deep: var(--sc-forest-2);
	--sc-accent-ink: var(--sc-olive);
	--sc-tint: var(--sc-stone);
	--sc-tint-mid: var(--sc-line);
	--sc-paper: var(--sc-white);
	--sc-ink-soft: var(--sc-ink-2);
	--sc-bg: var(--sc-white);
	--sc-border: var(--sc-line);
	--sc-muted: var(--sc-ink-2);
	--sc-font-display: var(--sc-display);
	--sc-font-body: var(--sc-text);
	--sc-font-spec: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--sc-r-sm: var(--sc-radius);
	--sc-r-md: var(--sc-radius);
	--sc-r-lg: var(--sc-radius-lg);
	--sc-r-pill: 999px;
	--sc-wrap: var(--sc-max);
	--sc-container: var(--sc-max);
	--sc-pad: var(--sc-gutter);
}

@media (max-width: 640px) {
	:root {
		--sc-header-h: 64px;
	}
}

/* --- Base reset (WordPress ships none of this on the front end, SETUP §9) --- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--sc-header-h) + 16px);
}

body {
	margin: 0;
	background: var(--sc-white);
	color: var(--sc-ink);
	font: 400 var(--sc-step-0) / 1.6 var(--sc-text);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	/* clip, not hidden: hidden would make <body> a scroll container and break
	   the sticky header. */
	overflow-x: clip;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Form controls don't inherit font-family from body. */
button,
input,
select,
textarea,
optgroup {
	font-family: inherit;
}

a {
	color: var(--sc-forest);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

a:where(:not(.sc-btn, .sc-skip)):hover {
	color: var(--sc-olive);
}

::selection {
	background: var(--sc-leaf);
	color: var(--sc-ink);
}

:focus-visible {
	outline: 3px solid var(--sc-sun);
	outline-offset: 2px;
	border-radius: 4px;
}

h1,
h2,
h3,
h4 {
	font-family: var(--sc-display);
	color: var(--sc-forest);
	line-height: 1.12;
	letter-spacing: -0.02em;
	margin: 0;
	text-wrap: balance;
}

h2 {
	font-size: var(--sc-step-3);
	font-weight: 700;
}

h3 {
	font-size: var(--sc-step-1);
	font-weight: 650;
	letter-spacing: -0.01em;
}

p {
	margin: 0;
}

/* Locks page scroll while the mobile drawer is open (theme.js puts the class on
   <html> AND <body>: iOS Safari needs both). */
.sc-no-scroll,
.sc-no-scroll body {
	overflow: hidden;
	overscroll-behavior: none;
}

/* Skip link: visible only when focused. */
.sc-skip {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	background: var(--sc-sun);
	color: var(--sc-ink);
	padding: 10px 16px;
	border-radius: var(--sc-radius);
	font-weight: 700;
	text-decoration: none;
}

.sc-skip:focus,
.sc-skip:focus-visible {
	top: 12px;
}

.sc-skip:hover {
	color: var(--sc-ink);
}

/* --- Layout helpers --- */
.sc-wrap,
.sc-container {
	width: min(100% - 2 * var(--sc-gutter), var(--sc-max));
	margin-inline: auto;
}

.sc-icon {
	width: 1.15em;
	height: 1.15em;
	flex: none;
}

.sc-tnum {
	font-variant-numeric: tabular-nums;
}

/* --- Sections --- */
.sc-section {
	padding-block: var(--sc-section);
}

/* The three grounds the design uses. A block's `background` attribute resolves
   to one of these, validated against a PHP allowlist first (inc/partials.php →
   showcase_section_bg). */
.sc-section--white {
	background: var(--sc-white);
}

.sc-section--stone {
	background: var(--sc-stone);
}

.sc-section--forest {
	position: relative;
	background: var(--sc-forest);
	color: var(--sc-on-dark);
}

.sc-section--forest h2,
.sc-section--forest h3 {
	color: var(--sc-on-dark);
}

/* Signature: the logo's three swooshes as the top edge of a forest band.
   Rendered by showcase_swoosh() / <Swoosh>; sits ABOVE the section, over the
   bottom of the one before it. */
.sc-swoosh {
	display: block;
	width: 100%;
	height: clamp(28px, 4vw, 52px);
	margin-top: -1px;
}

.sc-swoosh--top {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	transform: translateY(calc(-100% + 2px));
	pointer-events: none;
}

/* Section heading: h2 + supporting line, optionally beside a button. */
.sc-head {
	display: grid;
	gap: 14px;
	max-width: 720px;
	margin-bottom: clamp(32px, 4vw, 52px);
}

.sc-head p {
	color: var(--sc-ink-2);
	font-size: var(--sc-step-1);
	line-height: 1.5;
}

.sc-section--forest .sc-head p {
	color: var(--sc-on-dark-2);
}

.sc-head--row {
	max-width: none;
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.sc-head--row > div {
	display: grid;
	gap: 14px;
	max-width: 720px;
}

/* Small olive label above a list ("Popular projects", "What we build"). */
.sc-label {
	font: 700 var(--sc-step--1) / 1.3 var(--sc-text);
	color: var(--sc-olive);
	letter-spacing: 0.01em;
	margin: 0 0 14px;
}

.sc-label--dark,
.sc-section--forest .sc-label {
	color: var(--sc-leaf);
}

/* --- Buttons ---
   .sc-btn             base
   .sc-btn--primary    sun fill, ink text: the main action
   .sc-btn--ghost      white hairline on a photo / dark ground
   .sc-btn--forest     forest fill
   .sc-btn--outline    forest hairline on light
   .sc-btn--sm, --block
   Variants are written .sc-btn.sc-btn--x so a later padding shorthand can't
   beat them (SETUP §9, specificity). */
.sc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 10px 26px;
	border-radius: var(--sc-radius);
	text-align: center;
	font: 700 1.0625rem / 1.2 var(--sc-text);
	text-decoration: none;
	letter-spacing: 0.005em;
	border: 2px solid transparent;
	cursor: pointer;
	transition: background-color 0.2s var(--sc-ease), color 0.2s var(--sc-ease), border-color 0.2s var(--sc-ease), transform 0.2s var(--sc-ease), box-shadow 0.2s var(--sc-ease);
}

.sc-btn:active {
	transform: translateY(1px);
}

.sc-btn.sc-btn--primary {
	background: var(--sc-sun);
	color: var(--sc-ink);
	box-shadow: 0 2px 6px -2px rgba(16, 24, 12, 0.35);
}

.sc-btn.sc-btn--primary:hover {
	background: var(--sc-sun-hover);
	color: var(--sc-ink);
}

.sc-btn.sc-btn--ghost {
	color: var(--sc-on-dark);
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(16, 24, 12, 0.25);
}

.sc-btn.sc-btn--ghost:hover {
	background: var(--sc-white);
	color: var(--sc-forest);
	border-color: var(--sc-white);
}

.sc-btn.sc-btn--forest {
	background: var(--sc-forest);
	color: var(--sc-on-dark);
}

.sc-btn.sc-btn--forest:hover {
	background: var(--sc-forest-2);
	color: var(--sc-on-dark);
}

.sc-btn.sc-btn--outline {
	color: var(--sc-forest);
	border-color: var(--sc-forest);
	background: transparent;
}

.sc-btn.sc-btn--outline:hover {
	background: var(--sc-forest);
	color: var(--sc-on-dark);
}

.sc-btn.sc-btn--sm {
	min-height: 44px;
	padding: 0 18px;
	font-size: 1rem;
}

.sc-btn.sc-btn--block {
	width: 100%;
}

/* Text link with a sliding arrow ("Read all reviews →"). */
.sc-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	text-decoration: none;
	min-height: 44px;
}

.sc-link-arrow svg {
	transition: transform 0.25s var(--sc-ease);
}

.sc-link-arrow:hover svg {
	transform: translateX(4px);
}

/* --- Ratings: 5 stars, the last one partly filled for a fractional score.
   showcase_stars() sets --sc-star-fill on the last star (e.g. 70%). --- */
.sc-rating-num {
	font: 750 1.5rem / 1 var(--sc-display);
}

.sc-stars {
	display: inline-flex;
	gap: 2px;
	color: var(--sc-gold);
}

.sc-stars svg {
	width: 18px;
	height: 18px;
}

.sc-stars .sc-star--part {
	color: transparent;
	background: linear-gradient(90deg, var(--sc-gold) var(--sc-star-fill, 100%), var(--sc-star-track, rgba(255, 255, 255, 0.5)) var(--sc-star-fill, 100%));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.5.8-4.8 4.5 1.2 6.5L12 17.2l-5.8 3.2 1.2-6.5L2.6 9.4l6.5-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6 6.5.8-4.8 4.5 1.2 6.5L12 17.2l-5.8 3.2 1.2-6.5L2.6 9.4l6.5-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Tick lists (service categories, anything else that wants them) --- */
.sc-ticks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.sc-ticks li {
	position: relative;
	padding-left: 28px;
	color: var(--sc-ink);
	line-height: 1.5;
}

.sc-ticks li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.3em;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--sc-olive) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.3 2.2 4.7-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.sc-ticks--x li::before {
	background: #8d4a1a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.3 5.3l5.4 5.4M10.7 5.3l-5.4 5.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* --- Reduced motion. `transition: none`, NOT a 0.01ms duration: the tiny
   duration leaves the closed drawer's `visibility: hidden` on its children for
   a frame and focus() silently fails in WebKit (mobile-menu-pattern.md). --- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
