/**
 * Van Isle Gift Baskets — design foundation.
 *
 * Stage 1: focus states, form inputs, link/heading refinements.
 * Stage 2: homepage layout helpers (sections, hero, grids, tiles, newsletter).
 * Colour values mirror the theme.json palette. Lightweight — no frameworks.
 */

:root {
	--vigb-deep-kelp: #18302D;
	--vigb-warm-ivory: #F7F3EC;
	--vigb-sea-mist: #E4EAE5;
	--vigb-driftwood: #B9AA97;
	--vigb-cedar: #A56545;
	--vigb-charcoal: #242727;
	--vigb-base-white: #FFFFFF;
}

/* --- Font-size line-heights (theme.json presets can't carry line-height) --- */
.has-display-font-size {
	line-height: 1.05;
}

.has-xx-large-font-size {
	line-height: 1.1;
}

.has-medium-font-size {
	line-height: 1.6;
}

/* --- Links: charcoal, cedar underline on hover, visible keyboard focus --- */
a {
	text-underline-offset: 0.15em;
}

a:hover {
	text-decoration: underline;
	text-decoration-color: var(--vigb-cedar);
	text-decoration-thickness: 1px;
}

a:focus-visible {
	outline: 2px solid var(--vigb-cedar);
	outline-offset: 2px;
	border-radius: 2px;
}

/* --- Buttons: keyboard focus ring --- */
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible {
	outline: 2px solid var(--vigb-cedar);
	outline-offset: 2px;
}

/* --- Form inputs --- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
	background-color: var(--vigb-base-white);
	border: 1px solid var(--vigb-driftwood);
	border-radius: 2px;
	padding: 12px 16px;
	font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 1rem;
	color: var(--vigb-charcoal);
	line-height: 1.4;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--vigb-deep-kelp);
	box-shadow: 0 0 0 2px rgba(24, 48, 45, 0.35);
}

/* Small Manrope 600 field labels */
label,
.wp-block-form-input__label,
.wc-block-components-text-input label {
	font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-weight: 600;
	font-size: 0.875rem;
	letter-spacing: 0.01em;
	color: var(--vigb-charcoal);
}

/* =====================================================================
   Stage 2 — homepage layout
   ===================================================================== */

/* Section vertical rhythm + responsive gutters (96-128 desktop / 56-72 mobile) */
.vigb-section {
	padding: clamp(56px, 9vw, 128px) clamp(24px, 5vw, 32px);
}

.vigb-muted {
	color: rgba(36, 39, 39, 0.72);
}

.vigb-measure {
	max-width: 640px;
	margin-left: 0;
	margin-right: auto;
}

.vigb-eyebrow {
	margin-bottom: 12px;
}

/* Hairline divider */
.vigb-hairline {
	border: 0;
	border-top: 1px solid var(--vigb-driftwood);
	height: 0;
	margin: clamp(28px, 4vw, 44px) 0;
}

/* Shared media figures */
.vigb-media {
	margin: 0;
}

.vigb-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	aspect-ratio: 1 / 1;
}

/* --- 1. Hero: asymmetrical text + full-bleed image --- */
.vigb-hero__inner {
	gap: 0;
	align-items: stretch;
}

.vigb-hero__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(56px, 7vw, 112px) clamp(24px, 5vw, 72px);
}

.vigb-hero__media {
	padding: 0;
}

.vigb-hero__media .vigb-media,
.vigb-hero__media .vigb-media img {
	height: 100%;
}

@media (max-width: 781px) {
	.vigb-hero__inner {
		flex-direction: column-reverse;
	}

	.vigb-hero__media .vigb-media img {
		aspect-ratio: 4 / 3;
		height: auto;
	}

	.vigb-hero__text {
		padding: clamp(40px, 8vw, 56px) 24px;
	}
}

/* --- 2. Featured baskets grid --- */
.vigb-basket-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: clamp(24px, 3vw, 40px);
}

/*
 * These containers are block-editor "flow" groups (is-layout-flow) restyled
 * as CSS grids. WordPress injects `margin-block-start` (blockGap) on every
 * child except the first, which in a grid pushes all-but-the-first item down
 * ~1 line and staggers each row's top baseline. Zero those margins and
 * top-align the cells so every item in a row shares the same top edge.
 */
.vigb-basket-grid,
.vigb-occasions {
	align-items: start;
}

.vigb-basket-grid > *,
.vigb-occasions > * {
	margin-block: 0;
}

.vigb-card__media {
	overflow: hidden;
	margin-bottom: 16px;
}

.vigb-card__media img {
	transition: transform 0.5s ease;
}

.vigb-card:hover .vigb-card__media img,
.vigb-card:focus-within .vigb-card__media img {
	transform: scale(1.04);
}

.vigb-card:hover .vigb-card__name a,
.vigb-card:focus-within .vigb-card__name a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.vigb-card__name a {
	text-decoration: none;
	color: inherit;
}

.vigb-card__link a {
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.875rem;
	letter-spacing: 0.02em;
}

/* --- 3. Shop by occasion: editorial hairline tiles --- */
.vigb-occasions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 0 clamp(24px, 4vw, 56px);
}

.vigb-occasion {
	border-top: 1px solid var(--vigb-driftwood);
}

.vigb-occasion a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 0;
	text-decoration: none;
	color: var(--vigb-charcoal);
}

.vigb-occasion a:hover {
	text-decoration: none;
}

.vigb-occasion a:hover .vigb-occasion__name {
	text-decoration: underline;
	text-decoration-color: var(--vigb-cedar);
	text-underline-offset: 0.15em;
}

.vigb-occasion__name {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 500;
	font-size: 1.5rem;
	line-height: 1.2;
}

.vigb-occasion__arrow {
	color: var(--vigb-cedar);
	font-size: 1rem;
}

/* --- Lifestyle photography: controlled, responsive crops --- */
.vigb-lifestyle {
	margin: 0;
}

.vigb-lifestyle img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	object-position: center;
	border-radius: 2px;
}

/* On mobile the wide images crop to ~4:3, keeping the central subject. */
@media (max-width: 781px) {
	.vigb-lifestyle img {
		aspect-ratio: 4 / 3;
	}
}

/* Presentation-detail close-up keeps its native ratio (tag + card intact). */
.vigb-lifestyle--natural img {
	aspect-ratio: auto;
	object-fit: fill;
}

/* --- 7. Newsletter form --- */
/* Hidden until connected to a real email platform (no fake sign-ups).
   Remove this rule once the newsletter is wired up. See LAUNCH-DECISIONS.md. */
.vigb-section:has(.vigb-newsletter) {
	display: none;
}

.vigb-newsletter {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	max-width: 520px;
}

.vigb-newsletter .vigb-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 240px;
}

.vigb-newsletter input[type="email"] {
	width: 100%;
}

/* =====================================================================
   Stage 3 — header & footer template parts
   ===================================================================== */

/* --- Header --- */
.vigb-header {
	border-bottom: 1px solid var(--vigb-driftwood);
	padding: 16px clamp(24px, 5vw, 48px);
	gap: clamp(16px, 3vw, 32px);
}

.vigb-wordmark {
	margin: 0;
}

.vigb-wordmark a {
	text-decoration: none;
	letter-spacing: 0.01em;
	color: var(--vigb-charcoal);
}

.vigb-nav a {
	text-decoration: none;
}

.vigb-nav a:hover {
	text-decoration: underline;
	text-decoration-color: var(--vigb-cedar);
	text-underline-offset: 0.15em;
}

/* Search rendered as a restrained icon rather than a filled button */
.vigb-nav .wp-block-search__button {
	background-color: transparent;
	color: var(--vigb-charcoal);
	padding: 6px;
	min-width: 0;
	border: 0;
	border-radius: 2px;
}

.vigb-nav .wp-block-search__button:hover,
.vigb-nav .wp-block-search__button:focus {
	background-color: transparent;
	color: var(--vigb-cedar);
}

.vigb-nav .wp-block-search__button svg {
	fill: currentColor;
}

/* --- Footer --- */
.vigb-footer {
	padding: clamp(56px, 7vw, 96px) clamp(24px, 5vw, 48px) clamp(32px, 4vw, 48px);
}

.vigb-footer-wordmark {
	margin: 0 0 clamp(32px, 4vw, 40px);
}

.vigb-footer-wordmark a {
	color: var(--vigb-warm-ivory);
	text-decoration: none;
}

.vigb-foot-head {
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.8rem;
	color: var(--vigb-warm-ivory);
	margin: 0 0 14px;
}

.vigb-foot-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vigb-footer a {
	color: var(--vigb-driftwood);
	text-decoration: none;
}

.vigb-footer a:hover {
	color: var(--vigb-warm-ivory);
	text-decoration: underline;
	text-decoration-color: var(--vigb-warm-ivory);
}

.vigb-footer a:focus-visible {
	outline: 2px solid var(--vigb-warm-ivory);
	outline-offset: 2px;
}

.vigb-footer-hairline {
	border-top-color: rgba(185, 170, 151, 0.4);
	margin: clamp(32px, 4vw, 48px) 0;
}

.vigb-footer-bottom {
	align-items: center;
}

.vigb-muted-ivory {
	color: rgba(247, 243, 236, 0.7);
}

.vigb-copyright {
	color: rgba(247, 243, 236, 0.7);
}

.vigb-footer .wp-block-social-link a {
	color: var(--vigb-driftwood);
}

.vigb-footer .wp-block-social-link a:hover {
	color: var(--vigb-warm-ivory);
}

/* =====================================================================
   Stage B2 — enquiry / contact forms
   ===================================================================== */
.vigb-form {
	max-width: 640px;
}

.vigb-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 20px;
}

.vigb-form input,
.vigb-form select,
.vigb-form textarea {
	width: 100%;
}

.vigb-form textarea {
	resize: vertical;
	min-height: 120px;
}

.vigb-req {
	color: var(--vigb-cedar);
}

.vigb-form__note {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.8rem;
	color: rgba(36, 39, 39, 0.72);
	margin: 4px 0 12px;
}

.vigb-form__privacy {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.8rem;
	color: rgba(36, 39, 39, 0.72);
	margin: 0 0 20px;
	max-width: 640px;
}

.vigb-form__privacy a {
	color: var(--vigb-charcoal);
}

.vigb-form__submit {
	background-color: var(--vigb-deep-kelp);
	color: var(--vigb-warm-ivory);
	border: 0;
	border-radius: 2px;
	padding: 14px 28px;
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.vigb-form__submit:hover {
	background-color: #12241f;
}

.vigb-form__submit:focus-visible {
	outline: 2px solid var(--vigb-cedar);
	outline-offset: 2px;
}

/* Honeypot: present in the DOM but hidden from users and assistive tech */
.vigb-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Inline result messages */
.vigb-form__notice {
	max-width: 640px;
	padding: 14px 18px;
	border-radius: 2px;
	margin-bottom: 24px;
	font-family: Manrope, system-ui, sans-serif;
	line-height: 1.5;
}

.vigb-form__notice--success {
	background-color: var(--vigb-sea-mist);
	border: 1px solid var(--vigb-sea-sage, #7e9b79);
	color: var(--vigb-deep-kelp);
}

.vigb-form__notice--error {
	background-color: #f6e7e0;
	border: 1px solid var(--vigb-cedar);
	color: #7a2f14;
}
