/*
Theme Name:   Divi Dalúa
Theme URI:    http://dalua.local
Description:  Child theme for Dalúa Ibiza — heladería y pastelería artesanal, Santa Eulària des Riu. Carries the brand tokens (sage/moonlit palette, Italiana + Jost) and site-wide typography.
Author:       Dalúa Ibiza
Template:     Divi
Version:      1.1.0
Text Domain:  dalua
*/

/* ==========================================================================
   1. Design tokens
   The palette is anchored on the sage of the wordmark. "Da Lua" means
   "of the moon", so the darks are night values rather than neutral greys.
   ========================================================================== */

:root {
	/* Colour */
	--dalua-sage:        #a9be9c;
	--dalua-sage-deep:   #7e9a70;
	--dalua-sage-tint:   #eaf0e5;
	--dalua-night:       #1f2a2e;
	--dalua-night-soft:  #33454a;
	--dalua-plaster:     #f6f3ec;
	--dalua-plaster-alt: #efe9dd;
	--dalua-blush:       #e8cfc9;
	--dalua-haze:        #c8d6d2;
	--dalua-ink:         #2b3438;
	--dalua-ink-muted:   #6d7b7f;

	/* Type */
	--dalua-font-display: 'Italiana', 'Cormorant Garamond', Georgia, serif;
	--dalua-font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;

	--dalua-step--1: clamp(0.78rem, 0.75rem + 0.15vw, 0.86rem);
	--dalua-step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
	--dalua-step-1:  clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
	--dalua-step-2:  clamp(1.7rem, 1.45rem + 1.2vw, 2.4rem);
	--dalua-step-3:  clamp(2.4rem, 1.9rem + 2.5vw, 4rem);
	--dalua-step-4:  clamp(3.2rem, 2.1rem + 5.4vw, 7rem);

	/* Space + motion */
	--dalua-gutter:  clamp(1.25rem, 0.9rem + 1.7vw, 2.5rem);
	--dalua-section: clamp(3.5rem, 2.5rem + 5vw, 7.5rem);
	--dalua-ease:    cubic-bezier(0.22, 0.61, 0.36, 1);
	--dalua-radius:  2px;
}

/* ==========================================================================
   2. Site typography
   Scoped away from the Divi Builder UI so the admin editor is untouched.
   ========================================================================== */

/* Divi publishes its global font choices as custom properties and its own
   modules read them. With Open Sans no longer loaded those would resolve to
   the Arial fallback, so any Divi module added later would quietly break step
   with the design. `html:root` outranks the `:root` block Divi prints inline. */
html:root {
	--et_global_heading_font: 'Italiana';
	--et_global_body_font: 'Jost';
}

/* Divi's default body face is Open Sans, loaded from Google. That request is
   dequeued in functions.php, so the base stack is repointed at the
   self-hosted Jost here — otherwise everything Divi styles (and nothing we
   style ourselves) would drop to a system fallback. */
body:not(.et-fb),
body:not(.et-fb) input,
body:not(.et-fb) textarea,
body:not(.et-fb) select,
body:not(.et-fb) button {
	font-family: var(--dalua-font-body);
}

body:not(.et-fb) .dalua-display,
body:not(.et-fb) .dalua-section-title {
	font-family: var(--dalua-font-display);
	font-weight: 400;
	letter-spacing: 0.06em;
	line-height: 1.04;
	color: var(--dalua-night);
	text-transform: uppercase;
}

body:not(.et-fb) .dalua-section-title {
	font-size: var(--dalua-step-3);
	margin: 0 0 0.4em;
}

/* Eyebrow: letterspaced utility text, always paired with a moon marker. */
.dalua-eyebrow {
	font-family: var(--dalua-font-body);
	font-size: var(--dalua-step--1);
	font-weight: 400;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--dalua-ink-muted);
	display: inline-flex;
	align-items: center;
	gap: 0.7em;
}

/* --------------------------------------------------------------------------
   Signature: the moon marker.
   A circle lit from one side by an inset shadow. The `data-phase` attribute
   shifts the terminator, so a run of markers reads as a lunar cycle.
   -------------------------------------------------------------------------- */

.dalua-moon {
	inline-size: 0.62em;
	block-size: 0.62em;
	border-radius: 50%;
	flex: none;
	background: var(--dalua-sage);
	box-shadow: inset -0.31em 0 0 0 var(--dalua-night);
}

.dalua-moon[data-phase="new"]     { box-shadow: inset  0     0 0 0 var(--dalua-night); background: var(--dalua-night); }
.dalua-moon[data-phase="crescent"]{ box-shadow: inset -0.42em 0 0 0 var(--dalua-night); }
.dalua-moon[data-phase="half"]    { box-shadow: inset -0.31em 0 0 0 var(--dalua-night); }
.dalua-moon[data-phase="gibbous"] { box-shadow: inset -0.16em 0 0 0 var(--dalua-night); }
.dalua-moon[data-phase="full"]    { box-shadow: none; }

/* ==========================================================================
   3. Site chrome
   The header and footer live in assets/css/chrome.css — they are one system
   with the footer template, so they are kept together rather than split
   across this file.
   ========================================================================== */

/* ==========================================================================
   4. Quality floor
   ========================================================================== */

body:not(.et-fb) a:focus-visible,
body:not(.et-fb) button:focus-visible {
	outline: 2px solid var(--dalua-sage-deep);
	outline-offset: 3px;
	border-radius: var(--dalua-radius);
}

@media (prefers-reduced-motion: reduce) {
	body:not(.et-fb) *,
	body:not(.et-fb) *::before,
	body:not(.et-fb) *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
