/* =================================================================
   ReefDudes — Hero
   The live homepage uses TWO separate Visual Composer rows for the
   hero (one tablet/mobile-hidden, one desktop-hidden). This file
   styles a single .rd-hero block that replaces both. The Visual
   Composer markup that pairs with this is delivered separately in
   /docs/homepage-vc.html for you to paste into page-id-308.

   In the meantime, this file ALSO patches the existing dual-row
   layout so it reads cleanly until you swap to the single block.
   ================================================================= */

/* ----- New single-row hero (preferred) ---------------------------- */

.rd-hero {
	position: relative;
	overflow: hidden;
	min-height: clamp(420px, 60vh, 720px);
	display: flex;
	align-items: center;
	color: #ffffff;
	background-color: #1c3344;
}

.rd-hero__bg {
	position: absolute;
	inset: 0;
	background-position: center 30%;
	background-size: cover;
	background-repeat: no-repeat;
	z-index: 0;
}

/* Tablet/small-laptop crop: at narrower widths the diagonal scrim
   covers most of the visible Mandarin. Shift the bg-position right
   so the fish peeks into frame on the right side of the headline. */
@media (max-width: 900px) {
	.rd-hero__bg {
		background-position: 75% 35%;
	}
}

/* Mobile: pull the fish further right and slightly higher so it
   doesn't get sliced by the CTA buttons. */
@media (max-width: 600px) {
	.rd-hero__bg {
		background-position: 80% 28%;
	}
}

/* Stronger layered veil — the previous version was too subtle.
   The new mix:
   1. Vertical edge fades (top and bottom) to anchor the viewport
   2. A heavy left-side gradient that creates a "reading wall" the
      headline lives against. Hugs the lower-left water/shadow zone
      of the Mandarin photo and extends up the full hero so the type
      sits on a deliberately dark backdrop, not random photo pixels.
   The left edge is dark enough to read as a deliberate composition
   choice ("photo runs to the right of a colored panel"), not a
   photographer mistake. */
.rd-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(12,40,72,0.55) 0%, rgba(12,40,72,0.00) 28%),
		linear-gradient(180deg, rgba(0,0,0,0.00) 50%, rgba(12,40,72,0.65) 100%),
		linear-gradient(95deg, rgba(8,28,55,0.78) 0%, rgba(8,28,55,0.55) 25%, rgba(8,28,55,0.20) 48%, rgba(8,28,55,0.00) 65%);
	z-index: 1;
	pointer-events: none;
}

/* On tablet/mobile the diagonal scrim eats too much photo. Switch to
   a vertical-only scrim that anchors the type but leaves the right
   half of the frame open for the fish. */
@media (max-width: 900px) {
	.rd-hero::after {
		background:
			linear-gradient(180deg, rgba(12,40,72,0.65) 0%, rgba(12,40,72,0.20) 50%, rgba(12,40,72,0.55) 100%);
	}
}

.rd-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(48px, 9vw, 120px) clamp(20px, 5vw, 48px);
}

.rd-hero__eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #ffffff;
	background: rgba(58,142,224,0.65);
	border: 1px solid rgba(255,255,255,0.45);
	padding: 5px 14px;
	border-radius: 999px;
	margin-bottom: clamp(16px, 2vw, 24px);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	box-shadow: 0 2px 8px rgba(8,28,55,0.30);
	text-shadow: 0 1px 1px rgba(8,28,55,0.55);
}

.rd-hero__title {
	font-size: clamp(3rem, 9.5vw, 7.2rem);
	line-height: 0.95;
	font-weight: 900;
	letter-spacing: -0.035em;
	margin: 0 0 clamp(14px, 1.8vw, 24px);
	color: #ffffff;
	text-wrap: balance;
	/* Three-layer shadow stack:
	   1. Tight 1px shadow → crisp letter edges on bright fish patterns
	   2. Mid 4px shadow → physical lift, type feels embossed onto the photo
	   3. Wide 28px halo → atmospheric anchor, ties type to the dark scrim */
	text-shadow:
		0 1px 1px rgba(8,28,55,0.85),
		0 2px 4px rgba(8,28,55,0.65),
		0 6px 28px rgba(8,28,55,0.55);
}

/* "Reefing" — the eye-grabber. Brighter than --actinic with a
   restrained outer glow. Previously was bright enough to outshout
   the Tools grid below; reduced ~30% so the page hierarchy is
   "headline → tools" rather than "headline → blank". */
.rd-hero__title .rd-accent {
	color: #8ec5f5;
	text-shadow:
		0 1px 1px rgba(8,28,55,0.85),
		0 0 14px rgba(120,190,255,0.55),
		0 0 28px rgba(58,142,224,0.30),
		0 6px 28px rgba(8,28,55,0.55);
}

.rd-hero__sub {
	font-size: clamp(1rem, 1.6vw, 1.25rem);
	line-height: 1.5;
	max-width: 38ch;
	color: rgba(255,255,255,0.95);
	margin: 0 0 clamp(24px, 3vw, 36px);
	text-shadow: 0 1px 2px rgba(12,40,72,0.45);
}

.rd-hero__cta {
	display: inline-flex;
	gap: 12px;
	flex-wrap: wrap;
}

.rd-hero__cta .rd-btn-primary {
	background: var(--grad-button);
	color: #ffffff;
	border: 1px solid #2872c0;
	border-radius: 8px;
	padding: 14px 26px;
	font-weight: 700;
	font-size: 17px;
	text-decoration: none;
	box-shadow:
		0 1px 0 rgba(255,255,255,0.20) inset,
		0 4px 14px rgba(28,75,130,0.35);
	transition: filter 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.rd-hero__cta .rd-btn-primary:hover {
	filter: brightness(1.08);
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow:
		0 1px 0 rgba(255,255,255,0.30) inset,
		0 6px 20px rgba(28,75,130,0.45);
}
.rd-hero__cta .rd-btn-primary:active {
	transform: translateY(1px);
}

.rd-hero__cta .rd-btn-ghost {
	background: rgba(255,255,255,0.12);
	color: #ffffff;
	border: 1px solid rgba(255,255,255,0.55);
	border-radius: 8px;
	padding: 14px 26px;
	font-weight: 700;
	font-size: 17px;
	text-decoration: none;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background-color 140ms ease, transform 140ms ease;
}
.rd-hero__cta .rd-btn-ghost:hover {
	background: rgba(255,255,255,0.22);
	color: #ffffff;
	transform: translateY(-1px);
}

/* Scroll-down cue — invites the eye toward the tools grid.
   Softer than the previous version so it complements the heavier
   headline rather than competing with it. */
.rd-hero__scroll-cue {
	position: absolute;
	bottom: clamp(18px, 3vw, 32px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	width: 22px;
	height: 32px;
	border: 1.5px solid rgba(255,255,255,0.40);
	border-radius: 11px;
	pointer-events: none;
	opacity: 0.75;
}
.rd-hero__scroll-cue::after {
	content: "";
	position: absolute;
	top: 5px;
	left: 50%;
	transform: translateX(-50%);
	width: 3px;
	height: 7px;
	background: rgba(255,255,255,0.70);
	border-radius: 2px;
	animation: rd-hero-scroll-bounce 2.2s cubic-bezier(0.4,0,0.2,1) infinite;
}
@keyframes rd-hero-scroll-bounce {
	0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.85; }
	60%      { transform: translateX(-50%) translateY(9px); opacity: 0; }
	61%      { transform: translateX(-50%) translateY(0); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.rd-hero__scroll-cue::after { animation: none; }
}

/* ----- Patch for the current dual-row hero (interim) -------------- */
/* Until you swap in the .rd-hero block above, fix the worst issue:
   the "tablet-hidden mobile-hidden" desktop hero row uses an inline
   95px font-size and white color baked into the page. The 95px is
   too aggressive on smaller laptops. Override.
   The selectors target the existing #row-unique-0 and #row-unique-1
   patterns from page-id-308. */

@media (max-width: 1100px) {
	.theme-uncode #row-unique-0 .h2 span {
		font-size: clamp(2.6rem, 8vw, 5.9rem) !important;
		line-height: 1.05 !important;
	}
}

/* Mobile fallback row gets the same treatment */
.theme-uncode #row-unique-1 p span {
	font-size: clamp(2.4rem, 9vw, 4rem) !important;
	line-height: 1.05 !important;
}

/* NOTE: an earlier version of this file added a brand-tinted gradient
   veil to `#row-unique-0 .row-background::after` and forced its
   parent to `position: relative` to anchor the overlay. That broke
   Uncode's own `.row-background.background-element { position: absolute;
   inset: 0 }` and collapsed the row to 0 height — which made the
   Mandarin goby banner image disappear. Removed.

   The .rd-hero block (top of this file) has the gradient veil baked
   into its own ::after, so the new markup keeps the legibility win
   without touching Uncode's positioning. Once page-id-308 is swapped
   to use .rd-hero, this whole interim section can be deleted. */
