/*
 Theme Name:   Kadence Child (RC Studio)
 Theme URI:    https://rcstudio.com.my/
 Description:  Child theme for RC Studio's Kadence install. Carries the three
               custom landing-page templates (hub homepage, corporate,
               weddings) built from the validated rc-studio-hub-v3,
               rc-studio-corporate-landing, and rc-studio-weddings-landing
               mockups.
 Author:       RC Studio
 Template:     kadence
 Version:      1.0.0
 Text Domain:  kadence-child
*/

/* =========================================================================
 * RC Studio brand system — site-wide, for every normal Kadence-chrome page
 * (About Us, Services, Contact Us, blog posts, portfolio/service detail
 * pages, etc). Same palette/type already used on the three custom landing
 * templates (hub, corporate, weddings) — see assets/landing-pages.css —
 * not a new design, just extended to Kadence's own default nav/footer/
 * page-title/typography, which those three templates don't use at all
 * (they render their own <nav> and skip Kadence's chrome entirely, so
 * none of this touches them). The typography/color rules below are
 * additionally scoped with :not(.rc-tpl-hub):not(.rc-tpl-landing) as a
 * belt-and-braces guard against ever bleeding onto those three pages.
 * ========================================================================= */

:root {
	--rc-charcoal: #1b1815;
	--rc-charcoal-2: #23201b;
	--rc-champagne: #e9dfc7;
	--rc-gold: #a8813f;
	--rc-gold-bright: #c79a52;
	--rc-bone: #f7f4ec;
	--rc-ink: #2a241d;
}

/* ---- Typography + base colors, site-wide (excludes the 3 custom templates) ---- */
body:not(.rc-tpl-hub):not(.rc-tpl-landing),
body:not(.rc-tpl-hub):not(.rc-tpl-landing) input,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) select,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) optgroup,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) textarea {
	font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--rc-ink);
}
body:not(.rc-tpl-hub):not(.rc-tpl-landing) {
	background: var(--rc-bone);
}
body:not(.rc-tpl-hub):not(.rc-tpl-landing) .content-bg,
body:not(.rc-tpl-hub):not(.rc-tpl-landing).content-style-unboxed .site {
	background: var(--rc-bone);
}
body:not(.rc-tpl-hub):not(.rc-tpl-landing) h1,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) h2,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) h3,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) h4,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) h5,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) h6 {
	font-family: 'Fraunces', Georgia, serif;
	color: var(--rc-ink);
}
body:not(.rc-tpl-hub):not(.rc-tpl-landing) .entry-content a,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) .footer-html-inner a,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) a:not(.wp-block-button__link):not(.wpcf7-submit) {
	color: var(--rc-gold-bright);
}
body:not(.rc-tpl-hub):not(.rc-tpl-landing) .entry-content a:hover,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) .footer-html-inner a:hover,
body:not(.rc-tpl-hub):not(.rc-tpl-landing) a:not(.wp-block-button__link):not(.wpcf7-submit):hover {
	color: var(--rc-gold);
}

/* ---- Nav bar (site-wide; the 3 custom templates render their own <nav>
   and never contain #masthead, so these rules simply don't match there) ---- */
#masthead.site-header {
	background: var(--rc-charcoal);
}
#masthead .site-title,
#masthead .site-title-wrap p,
#masthead .site-title a,
#masthead .brand {
	color: var(--rc-champagne) !important;
}
/* Same treatment as .nav-links a on the custom templates: champagne text
   at reduced opacity, full opacity + a gold-bright underline slide-in on
   hover — not a color swap. */
#masthead #primary-menu > li > a,
#masthead #mobile-menu > li > a,
#masthead .menu-item a {
	position: relative;
	color: var(--rc-champagne);
	opacity: 0.85;
	transition: opacity 0.2s ease;
}
#masthead #primary-menu > li > a::after,
#masthead .menu-item a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: -2px;
	height: 1px;
	background: var(--rc-gold-bright);
	transition: right 0.25s ease;
}
#masthead #primary-menu > li > a:hover,
#masthead #primary-menu > li.current-menu-item > a,
#masthead .menu-item a:hover {
	color: var(--rc-champagne);
	opacity: 1;
}
#masthead #primary-menu > li > a:hover::after,
#masthead #primary-menu > li.current-menu-item > a::after,
#masthead .menu-item a:hover::after {
	right: 0;
}
#masthead .sub-menu {
	background: var(--rc-charcoal-2);
}
#masthead .sub-menu a {
	color: var(--rc-champagne);
	opacity: 0.85;
}
#masthead .sub-menu a:hover {
	opacity: 1;
}
#masthead .kadence-svg-icon {
	color: var(--rc-champagne);
}

/* ---- Footer (site-wide; same rationale as nav above) ---- */
#colophon.site-footer {
	background: var(--rc-charcoal);
	color: var(--rc-champagne);
}
#colophon .rc-footer-brand {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 1.1rem;
	letter-spacing: 0.04em;
	color: var(--rc-champagne);
	margin-bottom: 0.75rem;
}
#colophon .rc-footer-brand span {
	color: var(--rc-gold-bright);
}
#colophon .footer-html-inner p {
	color: var(--rc-champagne);
	opacity: 0.85;
}
/* Same treatment as .footer-social a on the custom templates: champagne,
   underlined, a subtle opacity dim on hover — not a color swap. */
#colophon a {
	color: var(--rc-champagne);
	text-decoration: underline;
	text-underline-offset: 2px;
	opacity: 0.85;
}
#colophon a:hover {
	opacity: 0.65;
}

/* ---- Page title band (e.g. "Wedding Cinematography Director Cut") ----
   Kadence uses a different modifier class per context — page-hero-section
   for pages, post-hero-section for single blog posts,
   post-archive-hero-section for category/tag archive listings — so all
   three need covering for genuinely site-wide coverage. */
.entry-hero.page-hero-section,
.entry-hero.post-hero-section,
.entry-hero.post-archive-hero-section {
	background: var(--rc-charcoal) !important;
}
.entry-hero .entry-title {
	font-family: 'Fraunces', Georgia, serif;
	color: var(--rc-champagne) !important;
}
.entry-hero .kadence-breadcrumbs,
.entry-hero .kadence-breadcrumbs a {
	color: var(--rc-champagne);
	opacity: 0.75;
}

/* Single blog posts on this install use Kadence's "Normal" title layout
   (content-title-style-normal), not the "Above"/hero layout pages use —
   confirmed via computed styles, not assumed — so .entry-header.post-title
   renders inline inside the white content card, with no .entry-hero
   wrapper to target above. Styled as its own dark band (full-bleed via
   negative margins matching .entry-content-wrap's own padding) so blog
   posts still get a matching page-title treatment. */
.entry-header.post-title {
	background: var(--rc-charcoal);
	margin: -2rem -2rem 2rem;
	padding: 2.5rem 2rem;
}
@media all and (max-width: 767px) {
	.entry-header.post-title {
		margin: -1.5rem -1.5rem 1.5rem;
		padding: 2rem 1.5rem;
	}
}
.entry-header.post-title .entry-title {
	font-family: 'Fraunces', Georgia, serif;
	color: var(--rc-champagne);
}
.entry-header.post-title .entry-meta {
	color: var(--rc-champagne);
	opacity: 0.7;
}
.entry-header.post-title .entry-meta a {
	color: var(--rc-champagne);
}

/* ---------------------------------------------------------------------
 * Contact Us — Contact Form 7 styling to match the site's established
 * brand palette (charcoal / gold / champagne / bone). Scoped to CF7's
 * own markup so it only affects the contact form, not other content.
 * ------------------------------------------------------------------- */
.wpcf7-form {
	max-width: 640px;
	margin: 2rem auto 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
}
.wpcf7-form .form-1-column,
.wpcf7-form .form-2-column {
	flex: 1 1 240px;
	margin: 0 0 1.1rem;
}
.wpcf7-form .form-full {
	flex: 1 1 100%;
	margin: 0 0 1.1rem;
}
.wpcf7-form label {
	display: block;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #a8813f;
	margin-bottom: 0.4rem;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
	width: 100%;
	padding: 0.7rem 0.9rem;
	background: #f7f4ec;
	border: 1px solid rgba(42, 36, 29, 0.18);
	border-radius: 3px;
	font-size: 0.95rem;
	color: #2a241d;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
	border-color: #a8813f;
	background: #fff;
	outline: none;
}
.wpcf7-form textarea {
	min-height: 130px;
	resize: vertical;
}
.wpcf7-form .wpcf7-list-item {
	margin: 0 0.6rem 0 0;
}
.wpcf7-form input[type="checkbox"] {
	accent-color: #a8813f;
	margin-right: 0.4rem;
}
/* Same specificity trap as .btn-outline in landing-pages.css: the reset rule
   `body:not(.rc-tpl-hub):not(.rc-tpl-landing) input` is (0,2,2) and beat this
   selector at (0,2,1), so the Send button inherited --rc-ink (#2a241d) over its
   own #1b1815 background — ~1.05:1, unreadable. `html body` prefix lifts this to
   (0,2,3). Scoped to .wpcf7-form, and only one CF7 form exists site-wide. */
html body .wpcf7-form input[type="submit"] {
	background: #1b1815;
	color: #e9dfc7;
	border: 1px solid #a8813f;
	padding: 0.75rem 2rem;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
html body .wpcf7-form input[type="submit"]:hover {
	background: #c79a52;
	color: #1b1815;
}
.wpcf7-form .wpcf7-not-valid-tip {
	color: #b3261e;
	font-size: 0.8rem;
	margin-top: 0.3rem;
}
.wpcf7-response-output {
	max-width: 640px;
	margin: 1rem auto 0;
	padding: 0.8rem 1rem;
	border-radius: 3px;
	font-size: 0.9rem;
}


/* ---------------------------------------------------------------------
 * FLOATING WHATSAPP BUTTON — site-wide.
 * Lives here rather than in landing-pages.css because that file is only
 * enqueued on the hub/corporate/weddings/feature-work templates, while the
 * button now renders on every page via wp_footer. style.css is the only
 * child-theme stylesheet loaded unconditionally.
 * Uses --rc-gold-bright: the landing pages' --gold-bright is not defined
 * outside them, so referencing it here would silently fall back to nothing.
 * z-index 60 clears the landing nav's 50 and Kadence's own sticky header.
 * ------------------------------------------------------------------- */
.wa-fab {
	position: fixed; right: clamp(16px, 2vw, 28px); bottom: clamp(16px, 2vw, 28px);
	z-index: 60; width: 68px; height: 68px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #25d366; color: #fff; text-decoration: none;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
	transition: transform .2s ease, box-shadow .2s ease;
}
/* fill is set explicitly rather than via currentColor: the FAB is an <a>, and
   both stylesheets recolour links with far higher specificity than .wa-fab —
   `body:not(.rc-tpl-hub):not(.rc-tpl-landing) a:not(...)` (0,4,2) on Kadence
   pages and `body.rc-tpl-landing a { color: inherit }` (0,1,2) on the landing
   pages. Either one turned the glyph gold or ink instead of white. Setting
   fill directly takes the link cascade out of the picture; the colour rule
   below is belt-and-braces for anything else inheriting from the anchor. */
.wa-fab svg { width: 38px; height: 38px; fill: #fff; display: block; }
html body a.wa-fab { color: #fff; }
.wa-fab:hover { transform: scale(1.07); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45); }
.wa-fab:focus-visible { outline: 3px solid var(--rc-gold-bright, #c79a52); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .wa-fab { transition: none; } }
@media (max-width: 600px) {
	.wa-fab { width: 60px; height: 60px; }
	.wa-fab svg { width: 34px; height: 34px; }
}

/* Keep each footer's right-hand content clear of the button. Without this the
   FAB sat on top of the landing footer's "YouTube" link (~537px² of it) at
   1920/1440/1024 — an unclickable link, not a cosmetic overlap. Applied to the
   landing footers and Kadence's own, since the button is now on every page. */
@media (min-width: 601px) {
	body.rc-tpl-landing > footer,
	body.rc-tpl-hub > footer,
	.site-footer .site-container,
	.site-footer .site-info { padding-right: 96px; }
}
