/*
Theme Name:     r5-child
Description:    Bloom's $5K Fall Haul (built on the R5 starter).
Author:         Raven5
Template:       r5-base
Version:        1.0
*/

/* ==========================
   Tokens: the ONLY place a new campaign should need to rebrand
========================== */

:root {
	/* type: swap the stacks, add @font-face blocks below */
	--font-display: "Oswald", "Arial Narrow", sans-serif;
	--font-body: "proxima-nova", "Proxima Nova", "Helvetica Neue", Arial, sans-serif;

	/* brand */
	--brand: #032947;
	--brand-rgb: 3, 41, 71;
	--brand-dark: #021d33;
	--accent: #75ccee;
	--accent-light: #8fc9ec;
	--ink: #032947;
	--bg: #fefefe;
	--bg-alt: #eeeeee;
	--white: #ffffff;
	--error: #b00020;

	/* form */
	--field-bg: #f3f4f6;
	--field-border: rgba(17, 17, 17, .2);
	--field-radius: 8px;
	--label: #697281;
	--field-height: 44px;

	/* Bootstrap hooks */
	--bs-primary: var(--brand);
	--bs-primary-rgb: var(--brand-rgb);
	--bs-body-font-family: var(--font-body);
}

/* ==========================
   @font-face (drop woff2 files in assets/fonts/)
========================== */

@font-face {
	font-family: "Oswald";
	src: url("assets/fonts/oswald-latin-500-normal.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

/* Proxima Nova is licensed and not bundled. Drop woff2 files in assets/fonts/
   and uncomment. Until then the body falls back to Helvetica Neue / Arial.
*/

/* ==========================
   Base
========================== */

body {
	font-family: var(--font-body);
	font-weight: 400;
	background: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); color: var(--brand); }
a { color: inherit; }
.bg-alt { background: var(--bg-alt); }
.content { overflow: hidden; }

/* ==========================
   Buttons
========================== */

.btn { padding: 12px 24px; border-radius: 0; font-weight: 700; border-width: 2px; transition: background-color .2s ease, transform .08s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-cta { background: var(--brand); border-color: var(--brand); color: var(--white); }
.btn-cta:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--white); }
.btn-cta:focus-visible { box-shadow: 0 0 0 .25rem rgba(var(--brand-rgb), .35); }

/* ==========================
   Header + offcanvas nav
========================== */

.r5-header { position: relative; z-index: 10; background: var(--white); display: flex; align-items: center; justify-content: center; min-height: 51px; padding: 5px 0; }
.r5-header__brand img { display: block; height: 41px; width: auto; }
.r5-menu-btn img { width: 25px; height: 18px; }
.r5-header__brand { font-family: var(--font-display); font-weight: 700; text-decoration: none; }

.r5-menu-btn { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); padding: 8px 0; border: 0; background: transparent; line-height: 0; }
.r5-menu-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.r5-menu-btn__bars, .r5-menu-btn__bars::before, .r5-menu-btn__bars::after { display: block; width: 25px; height: 3px; background: var(--brand); content: ""; }
.r5-menu-btn__bars { position: relative; }
.r5-menu-btn__bars::before { position: absolute; top: -7px; }
.r5-menu-btn__bars::after { position: absolute; top: 7px; }

.r5-offcanvas { max-width: 320px; background: var(--brand); color: var(--white); }
.r5-offcanvas .btn-close { filter: invert(1); opacity: .9; }
.r5-offcanvas .nav-link { color: var(--white); font-family: var(--font-display); font-size: 1.4rem; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.r5-offcanvas .nav-link:hover { opacity: .8; }

/* ==========================
   Layout blocks
========================== */

.r5-section { padding: 48px 0; }
.r5-form-card { padding: 28px 32px; background: var(--white); border-radius: 6px; color: #000; }
.r5-page { padding: 48px 20px; }
.r5-page__inner { max-width: 848px; margin: 0 auto; }

/* ==========================
   Gravity Forms (2.9+ framework theme)
   Scoped to .r5-form so it never leaks into other forms.
   Tip: set field Width = Half in the GF editor for two-up rows.
========================== */

.r5-form .gform_wrapper { margin: 0; }
.r5-form .gform_required_legend { display: none; }
.r5-form .gform_fields { column-gap: 12px; row-gap: 16px; }
.r5-form .gfield_required { display: none; }

.r5-form .gfield_label,
.r5-form legend.gfield_label { margin: 0 0 8px; font-size: 15px; font-weight: 500; line-height: 1; color: var(--label); }

.r5-form input[type="text"],
.r5-form input[type="email"],
.r5-form input[type="tel"],
.r5-form input[type="number"],
.r5-form input[type="date"],
.r5-form select {
	width: 100%; height: var(--field-height); padding: 0 16px;
	background: var(--field-bg); border: 1px solid var(--field-border); border-radius: var(--field-radius);
	font-family: var(--font-body); font-size: 16px; color: #000; box-shadow: none;
}

.r5-form input:focus, .r5-form select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }

.r5-form .ginput_container_consent { display: flex; align-items: flex-start; gap: 12px; }
.r5-form input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; background: var(--field-bg); border: 1px solid rgba(0, 0, 0, .25); border-radius: 2px; }
.r5-form .gfield_consent_label, .r5-form .gfield--type-consent .gform-field-label { font-size: 12px; font-weight: 500; line-height: 18px; color: #000; }
.r5-form .gfield_consent_label a { text-decoration: underline; color: #000; }

.r5-form .gform_footer, .r5-form .gform_page_footer { margin: 16px 0 0; padding: 0; }
.r5-form .gform_button, .r5-form input[type="submit"] {
	width: 100%; padding: 12px 16px; border: 0; border-radius: 0; cursor: pointer;
	background: var(--accent-light); color: #000a23; font-family: var(--font-body); font-size: 19px; font-weight: 700; line-height: normal;
	transition: background-color .2s ease;
}
.r5-form .gform_button:hover, .r5-form input[type="submit"]:hover { background: #75b9e0; }

/* GF 2.9+ framework sets its own gaps/sizes with higher specificity; pin the Figma values here. */
.r5-form .gform_wrapper.gform-theme--framework {
	--gf-form-gap-y: 16px; --gf-form-gap-x: 12px;
	--gf-ctrl-size: 44px; --gf-ctrl-font-size: 16px;
}
.r5-form .gform_wrapper.gform-theme--framework .gform_fields { row-gap: 16px; column-gap: 12px; }
.r5-form .gform_wrapper.gform-theme--framework .gfield { margin: 0; }
.r5-form .gform_wrapper.gform-theme--framework .gfield_label,
.r5-form .gform_wrapper.gform-theme--framework legend.gfield_label { margin: 0 0 11px; padding: 0; font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 15px; color: var(--label); }
.r5-form .gform_wrapper.gform-theme--framework .ginput_container { margin: 0; }
.r5-form .gform_wrapper.gform-theme--framework input[type="text"],
.r5-form .gform_wrapper.gform-theme--framework input[type="email"],
.r5-form .gform_wrapper.gform-theme--framework input[type="tel"],
.r5-form .gform_wrapper.gform-theme--framework input[type="number"],
.r5-form .gform_wrapper.gform-theme--framework input[type="date"],
.r5-form .gform_wrapper.gform-theme--framework select { height: 44px; min-height: 44px; padding: 0 16px; font-size: 16px; line-height: normal; }
.r5-form .gform_wrapper.gform-theme--framework .gfield--type-consent { padding-bottom: 4px; }
.r5-form .gform_wrapper.gform-theme--framework .gform_footer,
.r5-form .gform_wrapper.gform-theme--framework .gform_page_footer { margin: 16px 0 0; padding: 0; }
.r5-form .gform_wrapper.gform-theme--framework .gform_footer .gform_button,
.r5-form .gform_wrapper.gform-theme--framework .gform_footer input[type="submit"],
.r5-form .gform_wrapper.gform-theme--framework .gform_page_footer .button { width: 100% !important; height: auto !important; min-height: 0 !important; padding: 12px 16px !important; border: 0 !important; border-radius: 0 !important; font-family: var(--font-body) !important; font-size: 19px !important; font-weight: 700 !important; line-height: 23px !important; color: #000a23 !important; background: var(--accent-light) !important; }
.r5-form .gform_wrapper.gform-theme--framework .gform_footer .gform_button:hover,
.r5-form .gform_wrapper.gform-theme--framework .gform_footer input[type="submit"]:hover { background: #75b9e0 !important; }

.r5-form .gform_validation_errors, .r5-form .validation_message { color: var(--error); }
.r5-form .gfield_error input, .r5-form .gfield_error select { border-color: var(--error); }

/* ==========================
   Footer
========================== */

.r5-footer { padding: 20px 40px; border-top: 1px solid rgba(0, 0, 0, .25); background: var(--bg); color: #000; }
.r5-footer__legal { margin: 0 0 16px; font-size: 10px; line-height: 1.25; }
.r5-footer__legal a { text-decoration: underline; }
.r5-footer__bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; font-size: 14px; }
.r5-footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.r5-footer__links a { text-decoration: none; }
.r5-footer__links a:hover { text-decoration: underline; }
.r5-footer__powered a, .r5-footer__powered a:hover { text-decoration: none; }

/* ==========================
   Responsive
========================== */

@media (max-width: 767.98px) {
	.r5-form-card { padding: 24px 20px; }
	.r5-footer { padding: 20px 16px; }
	.r5-footer__bar { flex-direction: column; align-items: flex-start; }
	.r5-form .gfield--width-half { grid-column: 1 / -1; }
}


/* ==========================
   Age gate (date of birth)
========================== */

.r5-age-gate { display: none; position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 4, 21, .85); }
html.r5-age-locked .r5-age-gate { display: flex; }
html.r5-age-locked body { overflow: hidden; }
.r5-age-gate[hidden] { display: none !important; }
.r5-age-gate [hidden] { display: none !important; }

.r5-age-gate__box { display: flex; flex-direction: column; align-items: stretch; gap: 20px; width: 100%; max-width: 420px; padding: 32px 24px; background: #fff; border-radius: 16px; text-align: center; color: #333946; }
.r5-age-gate__title { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: normal; color: #000415; }
.r5-age-gate__copy { margin: 0; font-size: 15px; line-height: normal; color: #333946; }
.r5-age-gate__form { display: flex; flex-direction: column; gap: 20px; }

.r5-age-gate__dob { display: flex; gap: 8px; text-align: left; }
.r5-age-gate__field { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.r5-age-gate__field label { font-size: 13px; font-weight: 500; color: var(--label); }
.r5-age-gate__field input { width: 100%; height: 44px; padding: 0 11px; background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 8px; font-family: var(--font-body); font-size: 15px; color: #000; }
.r5-age-gate__field input::placeholder { color: #999ea8; }
.r5-age-gate__field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }

.r5-age-gate__error { margin: -8px 0 0; font-size: 14px; font-weight: 500; color: var(--error); text-align: left; }

.r5-age-gate__btn { height: 47px; padding: 0 16px; border: 0; border-radius: 0; background: var(--accent-light); color: #000a23; font-family: var(--font-body); font-size: 19px; font-weight: 700; cursor: pointer; transition: background-color .2s ease; }
.r5-age-gate__btn:hover { background: #75b9e0; }

.r5-age-gate__under { align-self: center; padding: 0; border: 0; background: none; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--label); text-decoration: underline; cursor: pointer; }
.r5-age-gate__under:hover { color: var(--brand); }

.r5-age-gate__denied { margin: 0; font-size: 18px; font-weight: 700; color: var(--brand); }
.r5-age-gate button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ==========================
   Bloom: $5K Fall Haul
========================== */

.bloom-title { font-family: var(--font-display); font-weight: 500; text-transform: none; }

/* hero */
.bloom-hero { position: relative; overflow: hidden; display: flex; justify-content: center; background: var(--accent); }
/* content is held to the 1024px comp width and centred; the sky-blue stays full-bleed */
.bloom-hero__inner {
	position: relative; flex: 0 1 1024px; width: 100%; max-width: 1024px; min-height: 470px;
	display: flex; align-items: center; justify-content: flex-end; padding: 0 60px;
}

/* badge art: rotated 24.5deg CCW and cropped exactly as in the comp
   (fitted against the Figma render; the Figma code export drops the rotation) */
.bloom-hero__art {
	position: absolute; top: -130px; left: -162px;
	width: 1025px; aspect-ratio: 1920 / 1284;
	background: url("assets/img/hero-bg.webp") center / contain no-repeat;
	transform: rotate(-24.5deg);
	pointer-events: none;
}

.bloom-hero__card {
	position: relative; width: 311px; max-width: 100%; padding: 20px;
	display: flex; flex-direction: column; gap: 10px;
	background: var(--accent); border: 2px solid #fff; border-radius: 10px; color: var(--brand);
}
.bloom-hero__kicker { margin: 0; font-size: 21px; font-weight: 700; line-height: normal; }
.bloom-hero__title { margin: 0; color: #fff; font-size: 63px; line-height: 63px; letter-spacing: -3.15px; }
.bloom-hero__copy { margin: 0; font-size: 20px; line-height: normal; }

.bloom-btn {
	display: flex; align-items: center; justify-content: center; width: 100%;
	padding: 12px 16px; border: 0; border-radius: 0;
	background: var(--brand); color: #fff; font-size: 19px; font-weight: 700; line-height: normal; text-decoration: none;
	transition: background-color .2s ease, transform .08s ease;
}
.bloom-btn:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.bloom-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* details + form */
.bloom-details { position: relative; overflow: hidden; padding: 30px 20px 40px; background: var(--brand); color: #fff; }
.bloom-details::before { content: ""; position: absolute; inset: 0; background: url("assets/img/pattern.jpg") center / cover no-repeat; opacity: .2; pointer-events: none; }
.bloom-details__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 34px; }
.bloom-details__text { width: 100%; max-width: 848px; }
.bloom-details__title { margin: 0 0 40px; color: #fff; font-size: 55px; line-height: 1.1; letter-spacing: -2.75px; }
.bloom-details__text p { margin: 0; color: #fff; font-size: 20px; line-height: normal; }
.bloom-details .r5-form-card { width: 100%; max-width: 468px; scroll-margin-top: 20px; }

@media (min-width: 1200px) {
	.bloom-details { padding: 60px 20px 70px; }
}

@media (max-width: 767.98px) {
	/* keep the tilted, oversized badge; card drops below it */
	.bloom-hero__inner { flex-direction: column; align-items: stretch; justify-content: flex-end; min-height: 0; padding: 285px 16px 24px; }
	.bloom-hero__art { top: -62px; left: -118px; width: 640px; }
	.bloom-hero__card { width: 100%; }
	.bloom-hero__title { font-size: 54px; line-height: 54px; letter-spacing: -2.7px; }
	.bloom-details__title { margin-bottom: 20px; font-size: 44px; letter-spacing: -2.2px; }
	.bloom-details__text p { font-size: 18px; }
}

/* ==========================
   Bloom: light content pages (thank-you + rules, Vers A flow)
========================== */

.bloom-light { position: relative; overflow: hidden; background: var(--brand); color: #fff; padding: 70px 0 80px; }
.bloom-light::before { content: ""; position: absolute; inset: 0; background: url("assets/img/pattern.jpg") center / cover no-repeat; opacity: .2; pointer-events: none; }
.bloom-light__inner { position: relative; width: 100%; max-width: 848px; margin: 0 auto; padding: 0 21px; }
.bloom-light__title { margin: 0 0 20px; font-family: var(--font-display); font-size: 55px; font-weight: 500; line-height: 1.1; letter-spacing: -2.75px; color: #fff; }
.bloom-light p, .bloom-light li { font-size: 20px; line-height: 1.4; color: #fff; }
.bloom-light p { margin: 0 0 24px; }
.bloom-light a:not(.bloom-btn) { color: #fff; text-decoration: underline; }
.bloom-light .bloom-btn--sky { max-width: 468px; margin-top: 24px; }

.bloom-light--page { min-height: 60vh; }
.bloom-btn--sky { background: var(--accent-light); color: #000a23; }
.bloom-btn--sky:hover { background: #75b9e0; color: #000a23; }

@media (max-width: 767.98px) {
	.bloom-light { padding: 50px 0 60px; }
	.bloom-light__title { font-size: 48px; letter-spacing: -2.4px; }
}

/* Coming-soon splash: keep the footer at the bottom, sky blue fills the gap. */
body.page-template-page-splash { display: flex; flex-direction: column; min-height: 100vh; }
body.page-template-page-splash main { flex: 1 0 auto; background: var(--accent); }
body.page-template-page-splash main { display: flex; flex-direction: column; }
body.page-template-page-splash .bloom-hero { flex: 1 0 auto; }
.r5-footer--basic { padding: 14px 40px; }
@media (min-width: 768px) {
	/* splash: badge vertically centred in the sky-blue field (art is ~685px tall at this width) */
	body.page-template-page-splash .bloom-hero__art { top: 50%; margin-top: -343px; }
}
