/*
 * novità, site.css
 *
 * This file carries only what cannot be written inline on an element, and nothing else:
 *
 *   1. the design's @keyframes, copied from its <helmet> block;
 *   2. the handful of base rules in that same block (box-sizing, link colour), which apply to
 *      every element and so have nowhere else to live;
 *   3. the design's style-hover and style-focus attributes, which are hover and focus states;
 *   4. the app cards' flex behaviour, which the design drives from JavaScript state;
 *   5. the responsive rules, which the design derives from its own `wide = w > 900` test;
 *   6. the reduced-motion guard.
 *
 * Everything else is an inline style on the element, exactly as the design writes it. That is
 * deliberate: it is how the design is authored, and it means no stylesheet loaded after this one,
 * from a plugin or anywhere else, can recolour a heading or re-centre a flex box.
 *
 * Bump the ?v= on the enqueue when this changes. (functions.php does it from the file's mtime.)
 */

/* ── 1. keyframes, from the design's helmet ─────────────────────────────── */

@keyframes nvDrift1 { 0%, 100% { transform: translate(-10%, -6%) scale(1); }   50% { transform: translate(12%, 8%) scale(1.25); } }
@keyframes nvDrift2 { 0%, 100% { transform: translate(10%, 10%) scale(1.1); }  50% { transform: translate(-14%, -4%) scale(0.9); } }
@keyframes nvSpin   { to { transform: rotate(360deg); } }
@keyframes nvSpinR  { to { transform: rotate(-360deg); } }
@keyframes nvDash   { 0% { stroke-dashoffset: 880; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -880; } }
@keyframes nvPulse  { 0% { transform: scale(.8); opacity: .6; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes nvFloatA { 0%, 100% { transform: translateY(0) rotate(-6deg); }     50% { transform: translateY(-18px) rotate(-4deg); } }
@keyframes nvFloatB { 0%, 100% { transform: translateY(-10px) rotate(6deg); }  50% { transform: translateY(12px) rotate(8deg); } }
@keyframes nvWord   { 0%, 22% { transform: translateY(0); } 25%, 47% { transform: translateY(-25%); } 50%, 72% { transform: translateY(-50%); } 75%, 97% { transform: translateY(-75%); } 100% { transform: translateY(-75%); } }
@keyframes nvScan   { 0% { transform: translateY(-120%); } 100% { transform: translateY(520%); } }
@keyframes nvBar    { 0%, 100% { transform: scaleX(.3); } 50% { transform: scaleX(1); } }
@keyframes nvIn     { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ── 2. the design's base rules ─────────────────────────────────────────── */

* { box-sizing: border-box; }

a { color: #A78BFA; text-decoration: none; }
a:hover { color: #C4B1FC; }

input, select, textarea { font-family: inherit; }

/* The skip link is not in the design, which has no keyboard target to skip to. It is here because
   a fixed header over a full-height hero is otherwise a long tab through motion to reach content. */
.nv-skip {
	position: absolute;
	left: -9999px;
	z-index: 40;
	padding: 12px 18px;
	border-radius: 0 0 999px 0;
	background: #6633FF;
	color: #FFFFFF;
	font-weight: 600;
}
.nv-skip:focus { left: 0; top: 0; color: #FFFFFF; }

/* The design was drawn for a mouse and carries no focus styles, so everything focusable has
   been falling back to whatever ring the browser draws. That does pass 2.4.7 -- Chrome's
   `outline: auto` is built to stay visible on any background -- but it is the browser's
   decision, not ours, and it changes between versions and engines. State it once, in the
   design's own violet. The field, pick and app-card rules further down are more specific and
   still win where they apply. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid #A78BFA;
	outline-offset: 3px;
}

/* ── 3. the design's hover and focus states ─────────────────────────────── */

.nv-nav-link:hover { color: #FFFFFF; }

.nv-btn:hover { background: #5225E0; color: #FFFFFF; }

.nv-btn-alt:hover { border-color: #A78BFA; color: #F3F1F8; }

.nv-btn-outline:hover { border-color: #A78BFA; color: #F3F1F8; }

.nv-link:hover { color: #C4B1FC; }

.nv-foot-link:hover { color: #FFFFFF; }

.nv-social:hover { color: #F3F1F8; }

/* Cards keep their text colour on hover: the design moves the border, not the type. */
.nv-card:hover,
.nv-app:hover,
.nv-row:hover,
.nv-tile:hover { color: #F3F1F8; }

.nv-app:hover,
.nv-app:focus-visible,
.nv-row:hover,
.nv-tile:hover,
.nv-slab:hover { border-color: #4A3D7A; }

.nv-plan-btn:hover { color: #FFFFFF; border-color: #A78BFA; }

.nv-field:focus { border-color: #A78BFA; }

/* A select left alone renders with the platform's own chrome: on macOS a grey gradient capsule
   with double arrows, which is nothing like the rest of the form. appearance:none strips that
   and draws the design's single chevron instead. color-scheme keeps the dropdown itself dark. */
select.nv-field {
	appearance: none;
	-webkit-appearance: none;
	color-scheme: dark;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C9C5D6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px 16px;
	cursor: pointer;
}

/* The contact form's project-type pills are radios, so the selected one is styled off :checked
   rather than a class. Without script the form still works and the choice still shows. */
.nv-pick input:checked + span { background: #6633FF; border-color: #6633FF; }
.nv-pick:hover span { border-color: #A78BFA; }
.nv-pick input:focus-visible + span { outline: 2px solid #A78BFA; outline-offset: 2px; }

/* The accordion's + turns into a x when the row opens. */
.nv-faq[open] > summary .nv-faq-sign { transform: rotate(45deg); }
.nv-faq > summary::-webkit-details-marker { display: none; }
.nv-faq > summary::marker { content: ""; }

/* ── 4. the app cards' flex behaviour ──────────────────────────────────────
   The design keeps the open card in state (S.app) and gives it flex 2.4 against the others' 1,
   transitioning over .7s. Hover and keyboard focus do the same job here, so the first card is
   open on load and pointing at any card opens that one instead. */

.nv-apps { flex-direction: row; }

.nv-app {
	flex: 1 1 0;
	height: 560px;
	transition: flex .7s cubic-bezier(.2, .8, .2, 1);
}
.nv-app.is-open { flex: 2.4 1 0; }

.nv-apps:hover .nv-app.is-open,
.nv-apps:focus-within .nv-app.is-open { flex: 1 1 0; }

.nv-apps .nv-app:hover,
.nv-apps .nv-app:focus-within { flex: 2.4 1 0; }

.nv-app-more { display: none; }

.nv-app.is-open .nv-app-more,
.nv-apps .nv-app:hover .nv-app-more,
.nv-apps .nv-app:focus-within .nv-app-more {
	display: flex;
	animation: nvIn .5s ease both;
}

.nv-apps:hover .nv-app.is-open .nv-app-more,
.nv-apps:focus-within .nv-app.is-open .nv-app-more { display: none; }

.nv-apps .nv-app:hover .nv-app-more,
.nv-apps .nv-app:focus-within .nv-app-more { display: flex; }

/* ── 5. responsive, at the design's own 900px line ──────────────────────── */

/* Wide: the nav is links, and the Menu button and its drop-down are not rendered. */
.nv-nav-toggle,
.nv-nav-menu { display: none; }

@media (max-width: 900px) {
	.nv-nav-wide { display: none !important; }
	.nv-nav-toggle { display: block; }
	.nv-nav-menu.is-open { display: flex; }

	/* The design stacks the cards and opens every one, because there is no hover to open with. */
	.nv-apps { flex-direction: column; }
	.nv-app,
	.nv-app.is-open,
	.nv-apps:hover .nv-app.is-open,
	.nv-apps .nv-app:hover,
	.nv-apps .nv-app:focus-within { flex: 1 1 auto; height: 460px; }
	.nv-app-more,
	.nv-apps:hover .nv-app.is-open .nv-app-more { display: flex; }

	/* heroMotion: ring = min(300, w * 0.7), pushed off the right edge and dimmed.
	   --ring is declared inline on the element, where the wide formula lives, and an inline
	   custom property outranks a stylesheet one, so the narrow value has to say so. */
	.nv-hero-ring {
		--ring: min(300px, 70vw) !important;
		top: 84px !important;
		right: -22% !important;
		opacity: .85;
	}

	/* innerMotion: r = 220. */
	.nv-inner-ring {
		--ring: 220px !important;
		right: -38% !important;
	}
}

/* Our Apps alternates which side the artwork sits on, which the design does with order:2 on
   every second row. Only while the grid is actually two columns: once it stacks, the artwork
   belongs back on top, which is what order:0 at the narrow width gives. */
@media (min-width: 901px) {
	.nv-row:nth-child(even) .nv-row-art { order: 2; }
}

/* The inner hero reserves room for the ring on a wide screen, as the design's heroPadR does. */
@media (min-width: 901px) {
	.nv-inner-hero { padding-right: max(24px, 32%); }
}

/* ── 6. reduced motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

/* ── 7. the currency a visitor sees ──────────────────────────────────────── */

/* A currency code in front of a figure, where the dollar has a symbol. At the two display sizes
   it is set smaller than the number, so "AED 10,850" still fits inside a 320px card at 64px
   type where "AED 10,850" at full size would not. assets/js/pricing.js writes it. */
.nv-cur { font-weight: 700; }
.nv-money-lg .nv-cur,
.nv-money-xl .nv-cur { font-size: .56em; letter-spacing: .01em; }

/* The care card's figure is 64px in the design, drawn around "$50". A currency code plus a long
   figure does not fit that: "LKR 1,400,000" needs roughly 300px inside a card whose content box
   is 254px at phone width. Setting it a step down only when it is a code keeps the dollar price
   exactly as the design draws it and keeps every other currency inside the card. The one-off
   list's 22px figure is left alone, because "AED 31,200" measures 150px there and fits. */
.nv-money-xl.nv-money-code { font-size: .66em; }

/* The USD / AED / SAR switch, which is the contact form's project-type pills a size down. It
   ships with display:none and pricing.js unhides it, so there are never three dead buttons. */
.nv-cur-switch { flex: none; }

/* The one control in this theme whose colours are NOT written inline on the element, and it has
   to be: which pill is selected is a state, and an inline background would outrank every rule
   here and leave the selected one looking like the other two. That is exactly what it did. The
   resting colours therefore live here with the pressed and hover ones, so all three are decided
   in the same place. White on #6633FF is 6:1, the same pairing the design already uses for the
   primary button and the "Most Chosen" pill. */
.nv-cur-btn { background: transparent; color: #C9C5D6; }
.nv-cur-btn:hover { color: #F3F1F8; }
.nv-cur-btn[aria-pressed="true"] { background: #6633FF; color: #FFFFFF; }

/* A drawn currency sign, for the riyal and the dirham. Both have an official symbol now and
   neither renders as type on any device we tested, so inc/pricing.php draws them from outlines
   instead of writing the character and hoping. .nv-sr carries the three-letter code off screen
   beside each one, so a screen reader still says "AED 10,850" and a copied price still pastes
   as words rather than as a bare number. */
.nv-sym { fill: currentColor; }

.nv-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── 8. the floating WhatsApp button ─────────────────────────────────────── */

/* Everything with one value is inline on the element. These are the three things that cannot be:
   the width it drops its label at, the focus ring, and the hover state.

   No transform anywhere, on purpose. Section 6 above already stops every transition and animation
   for anyone who has asked for less motion, but a transform applied on hover is not a transition
   and would still jump. A shadow and a shade are enough to say the thing is live. */

.nv-wa:hover {
	background: #1FBB59;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.46);
}

.nv-wa:focus-visible {
	outline: 2px solid #A78BFA;
	outline-offset: 3px;
}

/* Icon only on a phone, where a label beside it would reach a third of the way across the screen
   and sit over whatever is underneath. Tucked in closer to the corner at the same time. */
@media (max-width: 640px) {
	.nv-wa {
		right: 16px !important;
		bottom: 16px !important;
		padding: 14px !important;
		gap: 0 !important;
	}

	.nv-wa-label {
		display: none;
	}
}

/* The invitation above the button. Its own fixed element, so the button keeps the geometry that
   was measured against the enquiry form and the menu.

   Hidden rather than absent until script shows it: a card already there when the page paints reads
   as part of the page rather than as an offer. Section 6 kills the transition for anyone who has
   asked for less motion, which leaves it simply appearing, and that is the right outcome. */

.nv-wa-bubble {
	position: fixed;
	right: 24px;
	bottom: 88px;
	z-index: 19;
	max-width: 276px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease;
}

.nv-wa-bubble.is-on {
	opacity: 1;
	visibility: visible;
}

/* The card is the link, so the whole of it is the target rather than the words inside it. */
.nv-wa-bubble-link {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 16px 11px 11px;
	border-radius: 16px;
	background: #171320;
	border: 1px solid #2E2740;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
	color: #E8E5F0;
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}

.nv-wa-bubble-link:hover {
	background: #1E1830;
	border-color: #3A3450;
}

/* The mark where those widgets put a photograph, and the dot that says somebody is at the other
   end of it. Fixed width and height on both the box and the image, so the card does not reflow
   into its final shape once the PNG arrives. */
.nv-wa-face {
	position: relative;
	flex: none;
	display: block;
	width: 40px;
	height: 40px;
}

.nv-wa-face img {
	display: block;
	width: 40px;
	height: 40px;
	padding: 5px;
	box-sizing: border-box;
	border: 1px solid #2E2740;
	border-radius: 50%;
	background: #0B0A10;
}

.nv-wa-dot {
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #25D366;
	border: 2px solid #171320;
}

.nv-wa-say {
	display: block;
	min-width: 0;
}

.nv-wa-head {
	display: block;
	color: #F3F1F8;
	font-weight: 600;
}

.nv-wa-sub {
	display: block;
	color: #B9B3CA;
}

.nv-wa-bubble-link:focus-visible {
	outline: 2px solid #A78BFA;
	outline-offset: 2px;
}

/* With no button under it the card takes the corner itself, at the spacing the button used. */
.nv-wa-bubble--solo {
	bottom: 24px;
}

/* Nothing closes the card, so on a phone it is on screen for the whole visit. Narrower here than
   the width the text would take, to leave the page readable beside it. */
@media (max-width: 640px) {
	.nv-wa-bubble {
		right: 16px;
		bottom: 80px;
		max-width: min(280px, calc(100vw - 32px));
	}

	.nv-wa-bubble--solo {
		bottom: 16px;
	}
}
