/* ==========================================================================
   Cube — GLOBAL stylesheet (loaded site-wide)

   Scope discipline, on purpose:
   - NO CSS reset / normalize. Nothing here resets margins, box-sizing or
     typography globally, so Kadence and WooCommerce keep their own styling on
     /shop/, /cart/, /checkout/ and /my-account/.
   - Every rule is either a design token on :root, or scoped under a .cube-*
     class that only appears in this theme's header, footer and buttons.

   Landing-page layout lives in landing.css, which loads ONLY on the landing
   page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens — ported verbatim from app/globals.css
   "Daylight" premium ecommerce system: off-white paper, soft gray cards,
   minimal black ink, dark close.
   -------------------------------------------------------------------------- */
:root {
	--paper: #f6f6f2;      /* page background */
	--soft: #ebece8;       /* soft section background */
	--card: #ffffff;       /* card background */
	--card-alt: #f1f1ed;   /* alt card / panel */
	--ink: #111111;        /* main text */
	--ink-2: #777771;      /* secondary text */
	--muted: #b8b8b0;      /* muted text / placeholders */
	--line: #d8d8d2;       /* hairline borders */

	--dark: #141414;       /* dark CTA background */
	--dark-soft: #1d1d1c;  /* dark raised surface */
	--dark-text: #f3f3ed;  /* text on dark */
	--dark-line: rgba(243, 243, 237, 0.14);

	--accent: #7c8a4e;     /* muted olive-lime — tiny touches only */

	--gutter: clamp(1.25rem, 5vw, 4.5rem);
	--section-y: clamp(4.5rem, 10vh, 8rem);

	--radius: 18px;        /* cards */
	--radius-lg: 28px;     /* image panels */
	--shadow: 0 30px 60px -32px rgba(17, 17, 17, 0.18);

	--cube-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--cube-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--cube-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--cube-max: 72rem;     /* = Tailwind max-w-6xl */
}

/* --------------------------------------------------------------------------
   Shared primitives (used by header, footer AND the landing page)
   -------------------------------------------------------------------------- */

/* Scoped box-sizing. Deliberately NOT applied to * — a global reset here would
   change Kadence/WooCommerce layout on shop and checkout pages. */
.cube-header,
.cube-header *,
.cube-header *::before,
.cube-header *::after,
.cube-footer,
.cube-footer *,
.cube-footer *::before,
.cube-footer *::after,
.cube-error-banner,
.cube-error-banner * {
	box-sizing: border-box;
}

/* Mono micro-label, kerned uppercase. */
.eyebrow {
	display: inline-block;
	font-family: var(--cube-mono);
	font-size: 0.7rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--ink-2);
	line-height: 1.4;
}

/* Buttons — pill, no gradients. */
.cube-site .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	border-radius: 999px;
	padding: 0.9rem 1.6rem;
	font-family: var(--cube-font);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition:
		transform 0.3s var(--cube-ease),
		background-color 0.3s ease,
		border-color 0.3s ease,
		color 0.3s ease;
}

/* on light */
.cube-site .btn-primary {
	background: var(--ink);
	color: var(--paper);
}
.cube-site .btn-primary:hover {
	background: #000;
	color: var(--paper);
	transform: translateY(-2px);
}
.cube-site .btn-primary:active {
	transform: translateY(0) scale(0.985);
}

.cube-site .btn-ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}
.cube-site .btn-ghost:hover {
	background: var(--soft);
	color: var(--ink);
	transform: translateY(-2px);
}

/* on dark */
.cube-site .btn-light {
	background: var(--dark-text);
	color: var(--ink);
}
.cube-site .btn-light:hover {
	background: #fff;
	color: var(--ink);
	transform: translateY(-2px);
}

.cube-site .btn-outline-dark {
	background: transparent;
	color: var(--dark-text);
	border-color: var(--dark-line);
}
.cube-site .btn-outline-dark:hover {
	background: rgba(243, 243, 237, 0.08);
	color: var(--dark-text);
	transform: translateY(-2px);
}

/* Accent bullet used in callout / benefit cards. */
.cube-accent-dot {
	display: inline-block;
	flex: none;
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 999px;
	background: var(--accent);
}

/* Max-width shell. */
.cube-shell {
	width: 100%;
	max-width: var(--cube-max);
	margin-inline: auto;
}

/* Brand wordmark. */
.cube-brand-logo {
	display: block;
	width: auto;
	height: 2rem;
}
.cube-brand-logo.is-inverted {
	filter: invert(1);
}
.cube-brand-fallback {
	font-family: var(--cube-font);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ink);
}
.cube-brand-fallback.is-dark {
	color: var(--dark-text);
}

/* Skip link. */
.cube-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--cube-font);
	font-size: 0.875rem;
	border-radius: 0 0 8px 0;
}
.cube-skip-link:focus {
	left: 0;
}

/* --------------------------------------------------------------------------
   SITE-WIDE HEADER — ported from the nav in components/Hero.tsx
   -------------------------------------------------------------------------- */
.cube-header {
	position: relative;
	z-index: 40;
	background: var(--paper);
	padding: 1.5rem var(--gutter) 0;
	font-family: var(--cube-font);
}

.cube-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 0.5rem;
	max-width: none;
}

.cube-nav-brand {
	display: inline-flex;
	align-items: center;
	flex: none;
	text-decoration: none;
}
.cube-nav-brand .cube-brand-logo {
	height: 2rem;
}

/* Centre links — hidden below md, matching the original `hidden md:flex`. */
.cube-nav-links {
	display: none;
}

.cube-nav-list {
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.cube-nav-list li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.cube-nav-list a {
	font-size: 0.875rem;
	color: var(--ink-2);
	text-decoration: none;
	transition: color 0.3s ease;
}
.cube-nav-list a:hover,
.cube-nav-list .current-menu-item > a {
	color: var(--ink);
}

.cube-nav-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex: none;
}

/* Compact Buy Now in the nav (matches !px-5 !py-2.5 text-sm). */
.cube-site .cube-nav-buy {
	padding: 0.625rem 1.25rem;
	font-size: 0.875rem;
}

/* Mobile menu toggle. */
.cube-nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0.6rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
}
.cube-nav-toggle span {
	display: block;
	height: 1.5px;
	width: 100%;
	background: var(--ink);
	transition: transform 0.3s var(--cube-ease), opacity 0.2s ease;
}
.cube-nav-toggle[aria-expanded="true"] span:first-child {
	transform: translateY(3.25px) rotate(45deg);
}
.cube-nav-toggle[aria-expanded="true"] span:last-child {
	transform: translateY(-3.25px) rotate(-45deg);
}

.cube-mobile-menu {
	padding: 0.5rem 0 1rem;
	border-top: 1px solid var(--line);
	margin-top: 0.75rem;
}
.cube-mobile-menu[hidden] {
	display: none;
}
.cube-mobile-menu .cube-nav-list {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
}
.cube-mobile-menu .cube-nav-list a {
	display: block;
	padding: 0.65rem 0;
	font-size: 1rem;
	color: var(--ink);
}

@media (min-width: 768px) {
	.cube-nav-links {
		display: flex;
		justify-content: center;
	}
	.cube-nav-toggle,
	.cube-mobile-menu {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
   Buy Now error banner
   -------------------------------------------------------------------------- */
.cube-error-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: var(--cube-max);
	margin: 1rem auto 0;
	padding: 0.85rem 1.25rem;
	border: 1px solid #e6c9c9;
	border-radius: var(--radius);
	background: #fbf1f1;
	color: #8a2b2b;
	font-family: var(--cube-font);
	font-size: 0.9rem;
}
.cube-error-banner a {
	color: inherit;
	text-decoration: none;
	font-size: 1.25rem;
	line-height: 1;
	opacity: 0.6;
}
.cube-error-banner a:hover {
	opacity: 1;
}

/* --------------------------------------------------------------------------
   Content area
   -------------------------------------------------------------------------- */
.cube-site-content {
	background: var(--paper);
}

/* Padding shell for store pages only — the landing page manages its own. */
.cube-store .cube-site-content > .cube-shell {
	padding: clamp(2rem, 5vw, 4rem) var(--gutter);
}

/* --------------------------------------------------------------------------
   SITE-WIDE FOOTER — ported from components/Footer.tsx
   -------------------------------------------------------------------------- */
.cube-footer {
	border-top: 1px solid var(--dark-line);
	background: var(--dark);
	color: var(--dark-text);
	padding: 4rem var(--gutter);
	font-family: var(--cube-font);
}

.cube-footer-grid {
	display: grid;
	gap: 2.5rem;
	max-width: var(--cube-max);
	margin-inline: auto;
	grid-template-columns: 1fr;
}

.cube-footer-brand .cube-brand-logo {
	height: 2rem;
}

.cube-footer-site {
	margin: 1rem 0 0;
	font-size: 0.875rem;
	color: rgba(243, 243, 237, 0.5);
}

.cube-footer-heading {
	color: rgba(243, 243, 237, 0.55);
}

.cube-footer-list {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}
.cube-footer-list li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.cube-footer-list a {
	font-size: 0.875rem;
	color: rgba(243, 243, 237, 0.75);
	text-decoration: none;
	transition: color 0.3s ease;
}
.cube-footer-list a:hover {
	color: var(--dark-text);
}

.cube-footer-base {
	max-width: var(--cube-max);
	margin: 3rem auto 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--dark-line);
	font-size: 0.875rem;
	color: rgba(243, 243, 237, 0.45);
}

@media (min-width: 640px) {
	.cube-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.cube-footer-grid {
		grid-template-columns: 1.4fr repeat(3, 1fr);
	}
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.cube-site .btn {
		transition: none;
	}
	.cube-site .btn:hover {
		transform: none;
	}
}
