/* Theme-wide layout helpers that don't belong in theme.json.
 * Per-block visuals live next to their block.json under /blocks/.
 */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---- Section eyebrow (italic Sansita, mixed-case) ---- */
/* Used above every section heading. Matches the prototype's voice: warm,
   italic, never shouty. Replaces the earlier uppercase/letter-spaced variant. */
.ange-eyebrow {
	font-family: Sansita, serif;
	font-style: italic;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.2;
	color: var(--wp--preset--color--sun-deep, #F08A3E);
	margin: 0 0 0.6rem;
	letter-spacing: 0;
	text-transform: none;
}

/* ---- Amenity pills (used in welcome + bathamn patterns) ---- */
.amenity-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.amenity-pills .pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1rem;
	border-radius: 999px;
	background: rgba(28, 61, 90, 0.08);
	color: #1C3D5A;
	font-size: 0.92rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.2;
}
.amenity-pills--bordered .pill {
	background: var(--wp--preset--color--paper, #FFFBF1);
	border: 1.5px solid #D9C896;
}
.amenity-pills .pill svg {
	width: 16px;
	height: 16px;
	flex: none;
	color: #2F6B3D; /* forest */
}

/* ---- Welcome card (quote + CTA) ---- */
.welcome-card {
	position: relative;
	box-shadow:
		0 0 0 1px rgba(217, 200, 150, 0.55),
		0 6px 0 -2px rgba(217, 200, 150, 0.45),
		0 30px 50px -20px rgba(240, 138, 62, 0.18),
		0 40px 80px -30px rgba(28, 61, 90, 0.22);
}
.welcome-card::before {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: 28px;
	background: linear-gradient(135deg, transparent 0%, transparent 55%, #F0B93B 100%);
	opacity: 0.18;
	pointer-events: none;
	z-index: 0;
}
.welcome-card > * { position: relative; z-index: 1; }
.welcome-card .quote {
	font-family: Sansita, serif;
	font-style: italic;
	font-weight: 700;
	font-size: clamp(1.25rem, 2.2vw, 1.65rem);
	line-height: 1.35;
	color: var(--wp--preset--color--navy, #14304A);
	margin: 0.25rem 0 0;
	position: relative;
	padding-left: 0.1em;
}
.welcome-card .quote::before {
	content: "\201C";
	position: absolute;
	top: -0.7em;
	left: -0.1em;
	font-family: Sansita, serif;
	font-style: italic;
	font-weight: 900;
	font-size: 4.5rem;
	line-height: 1;
	color: var(--wp--preset--color--sun-deep, #F08A3E);
	opacity: 0.95;
	pointer-events: none;
}
.welcome-card .welcome-card__sep {
	border: 0;
	height: 1.5px;
	background-image: repeating-linear-gradient(to right, #D9C896 0 12px, transparent 12px 20px);
	background-repeat: no-repeat;
	background-size: 100% 1.5px;
	background-position: 0 center;
	width: auto;
	margin-left: 0;
	margin-right: 0;
}
.welcome-card__phone {
	letter-spacing: 0.01em;
	margin: 0.25rem 0 0.5rem;
}
.welcome-card__email a {
	color: var(--wp--preset--color--sun-deep, #F08A3E);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s;
}
.welcome-card__email a:hover { border-bottom-color: currentColor; }

/* ---- Pattern anchor offset so sticky header doesn't cover section top ---- */
section[id] { scroll-margin-top: 88px; }

/* ---- Sticky header ----
 * The template-part wrapper (<header class="wp-block-template-part">) sits
 * between .wp-site-blocks and our sticky header, which breaks WP's built-in
 * rule (.wp-site-blocks > .is-position-sticky) AND makes the wrapper the
 * sticky containing block (same height as the header → sticky releases
 * immediately). Promote the wrapper out of layout so our nav becomes a
 * direct child of wp-site-blocks and sticks against the viewport. */
.wp-site-blocks > header.wp-block-template-part {
	display: contents;
}
.ange-nav.is-position-sticky {
	position: sticky;
	top: 0;
	z-index: 20;
	box-shadow: 0 1px 0 rgba(28, 61, 90, 0.06), 0 8px 24px -18px rgba(28, 61, 90, 0.25);
}

/* ---- Force hamburger overlay for the header nav at tablet widths so the
   logo + nav never wrap onto two rows. WP defaults to 600px; the 7-item
   Swedish menu doesn't fit until ~900px alongside the logo. ---- */
@media (max-width: 900px) {
	.ange-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
	.ange-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open):not(.always-shown) {
		display: none;
	}
	.ange-nav .wp-block-navigation__responsive-container.is-menu-open {
		display: flex;
	}
}

/* ---- No block-gap between site-level blocks (header / main / footer) ---- */
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---- Close subpixel seams between stacked full-bleed sections ---- */
/* Fractional layout positions (e.g. flexible hero heights) can leave a 1px
   body-colour sliver between adjacent full-bleed patterns. Pull each one
   up by 1px to guarantee an overlap. */
.ange-facts,
#valkommen,
#boende,
#omradet,
#aktuellt,
#bathamn,
#konstpark,
#bilder,
#kontakt { margin-top: -1px; }

/* ---- Subtle contrast line between sections ---- */
/* Every top-level themed section gets a hair-thin rule at the top so the
   transitions between cream-paper / paper / navy / lake-gradient feel crisp.
   Colour auto-adapts: light sections use a warm sand line, dark ones a
   translucent cream line. */
section[id]::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 1px;
	background: rgba(28, 61, 90, 0.08);
	pointer-events: none;
}
/* Dark sections get a cream hairline for contrast against navy. */
section[id].has-navy-deep-background-color::before,
section[id].has-navy-background-color::before,
section[id].has-hero-navy-gradient-background::before,
section[id].has-hero-lake-gradient-background::before {
	background: rgba(246, 237, 214, 0.12);
}
/* Hero itself doesn't need a top rule — it sits below the sticky nav. */
.wp-block-group.has-hero-sunset-gradient-background::before { content: none; }

/* ---- Bathamn boat illustration ---- */
.ange-boat-illus { margin: 0; }
.ange-boat-illus svg {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 18px;
	filter: drop-shadow(0 10px 28px rgba(20, 48, 74, 0.12));
}

/* ---- Shared empty-state card (aktuellt etc.) ---- */
.ange-empty-card {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	max-width: fit-content;
	margin: var(--wp--preset--spacing--40, 1.8rem) 0 0;
	padding: 0.85rem 1.25rem;
	border: 1.5px dashed #D9C896;
	border-radius: 999px;
	background: rgba(217, 200, 150, 0.08);
}
.ange-empty-card svg {
	width: 20px;
	height: 20px;
	color: #D9C896;
	flex: none;
}
.ange-empty-card p {
	margin: 0;
	font-family: Sansita, serif;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--wp--preset--color--ink-muted, #5a6a7d);
	letter-spacing: 0.01em;
}

/* ---- Empty gallery placeholder inside Bilder section ---- */
.wp-block-gallery.has-nested-images:empty {
	position: relative;
	min-height: 220px;
	border: 1.5px dashed #D9C896;
	border-radius: 18px;
	background: rgba(217, 200, 150, 0.06);
}
.wp-block-gallery.has-nested-images:empty::before {
	content: "Fler bilder på väg!";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: Sansita, serif;
	font-weight: 700;
	color: var(--wp--preset--color--ink-muted);
	font-size: 1.1rem;
	letter-spacing: 0.02em;
}

/* Respect reduced motion for the subtle animations we add via Interactivity API. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
