/* ==========================================================================
   HASCS Elementor child theme
   --------------------------------------------------------------------------
   1. Fonts            5. Reusable helper classes (used from Elementor)
   2. Design tokens    6. Header
   3. Base             7. Footer
   4. Buttons          8. Utilities
   ========================================================================== */

/* 1. Fonts ------------------------------------------------------------------
   Open Sans, self-hosted. Matches the site as it exists today. */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/open-sans-300.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/open-sans-500.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/open-sans-700.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/open-sans-800.woff2") format("woff2"); }

/* 2. Design tokens -------------------------------------------------------- */
:root {
	--hascs-primary: #EA67A7;     /* pink   */
	--hascs-secondary: #232E5D;   /* navy   */
	--hascs-tertiary: #3AB3E5;    /* blue   */
	--hascs-quaternary: #F4B458;  /* yellow */
	--hascs-dark-grey: #454545;
	--hascs-mid-grey: #C1C1C1;
	--hascs-light-grey: #F5F4F4;
	--hascs-white: #FFFFFF;

	--hascs-font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

	/* Fluid spacing scale (same values the site has always used). */
	--hs-s2: 10px;
	--hs-s3: 15px;
	--hs-s4: clamp(0.938rem, 0.865rem + 0.385vw, 1.25rem);
	--hs-s5: clamp(0.938rem, 0.793rem + 0.769vw, 1.563rem);
	--hs-m1: clamp(0.938rem, 0.721rem + 1.154vw, 1.875rem);
	--hs-m3: clamp(1.25rem, 0.962rem + 1.538vw, 2.5rem);
	--hs-m4: clamp(1.563rem, 1.202rem + 1.923vw, 3.125rem);
	--hs-m5: clamp(1.875rem, 1.442rem + 2.308vw, 3.75rem);
	--hs-m6: clamp(1.375rem, 1.043rem + 1.769vw, 2.813rem);
	--hs-l1: clamp(1.563rem, 0.986rem + 3.077vw, 4.063rem);

	--hascs-radius-btn: 6px;
	--hascs-radius-card: 20px;
	--hascs-blob: 58% 42% 61% 39% / 42% 56% 44% 58%;
	--hascs-curve-h: clamp(2.5rem, 1.462rem + 5.538vw, 7rem);
}

/* 3. Base ------------------------------------------------------------------ */
html { scroll-behavior: smooth; }

body {
	font-family: var(--hascs-font);
	color: var(--hascs-secondary);
	background: var(--hascs-white);
	-webkit-font-smoothing: antialiased;
}

/* Hello Elementor wraps page content in .site-main; the Elementor pages control their own width. */
.site-main { max-width: none; padding: 0; margin: 0; }
.page-content { margin: 0; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto; clip-path: none; color: var(--hascs-secondary); display: block; height: auto; left: 8px; top: 8px;
	padding: 12px 20px; width: auto; z-index: 100000; font-weight: 600; text-decoration: none; border-radius: 4px;
}

iframe { border-radius: 20px; }

/* 4. Buttons --------------------------------------------------------------- */
.hascs-btn {
	box-sizing: border-box;
	display: inline-block;
	min-width: 146px;
	padding: 6px 16px;
	border: 1px solid var(--hascs-tertiary);
	border-radius: var(--hascs-radius-btn);
	background: var(--hascs-tertiary);
	color: #fff;
	font: 600 16px/1.6 var(--hascs-font);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
}
.hascs-btn:hover, .hascs-btn:focus-visible { background: transparent; color: var(--hascs-tertiary); }
.hascs-btn.hascs-btn--pink:hover { color: var(--hascs-primary); }

.hascs-btn.hascs-btn--outline { background: transparent; border-color: #fff; }
.hascs-btn.hascs-btn--outline:hover, .hascs-btn.hascs-btn--outline:focus-visible { background: var(--hascs-tertiary); border-color: var(--hascs-tertiary); color: #fff; }

.hascs-btn.hascs-btn--pink { background: var(--hascs-primary); border-color: var(--hascs-primary); }
.hascs-btn.hascs-btn--pink:hover, .hascs-btn.hascs-btn--pink:focus-visible { background: transparent; color: var(--hascs-primary); }

.hascs-btn.hascs-btn--white { background: #fff; border-color: #fff; color: var(--hascs-tertiary); }
.hascs-btn.hascs-btn--white:hover, .hascs-btn.hascs-btn--white:focus-visible { background: transparent; color: #fff; }

/* Elementor Button widgets: same minimum width as every other HASCS button. */
.elementor-widget-button.hascs-button .elementor-button { min-width: 146px; box-sizing: border-box; transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out; }

/* 5. Reusable helper classes (apply in Elementor > Advanced > CSS Classes) --- */

/* Highlighted word: wrap in <span class="hascs-underline hascs-underline--yellow"> inside a heading. */
.hascs-underline { display: inline-block; font-weight: 600; isolation: isolate; position: relative; }
.hascs-underline::before {
	content: ""; position: absolute; bottom: 0; left: -0.15em; width: calc(100% + 0.3em); height: 30%;
	translate: 0 -25% 0; z-index: -1;
}
.hascs-underline--yellow::before { background: var(--hascs-quaternary); }
.hascs-underline--pink::before   { background: var(--hascs-primary); }
.hascs-underline--blue::before   { background: var(--hascs-tertiary); }

/* Wave edge on the bottom / top of a section (add to a Container; the container needs a solid background).
   Uses ::after because Elementor containers already use ::before for background overlays. */
.e-con.hascs-curve--bottom, .e-con.hascs-curve--top { isolation: isolate; }
.e-con.hascs-curve--bottom::after, .e-con.hascs-curve--top::after {
	content: ""; position: absolute; left: 0; width: 100%; height: var(--hascs-curve-h);
	background: url("../images/white-curve.svg") no-repeat; background-size: 100%;
	transform: scaleX(-1); z-index: 99; pointer-events: none;
}
.e-con.hascs-curve--bottom::after { bottom: -1px; background-position: bottom; }
.e-con.hascs-curve--top::after    { top: -1px; background-position: top; rotate: 180deg; }

/* Cards that lift on hover. */
.hascs-lift { transition: translate .2s ease-in-out; }
.hascs-lift:hover { translate: 0 -10px 0; }

/* Organic "blob" crop for photos and icons (Image widget). */
.hascs-blob img { border-radius: var(--hascs-blob); }

/* Square, cropped photo (Image widget). */
.hascs-square img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Elementor text widgets: no trailing paragraph margin (spacing comes from container gaps). */
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* Decorative dots on the bottom-right of a photo (Image widget). */
.hascs-accent { isolation: isolate; position: relative; }
.hascs-accent::before {
	content: ""; position: absolute; right: 4%; bottom: 6%; width: 25%; aspect-ratio: 1.4 / 1; z-index: 99;
	background: url("../images/image-accents.svg") no-repeat; background-size: contain; pointer-events: none;
}

/* Cross-fading rotator. Put 2 or 3 widgets in a container and add .hascs-rotator plus .hascs-rotator--2 or --3.
   Each item holds for 2s and fades for 0.8s, matching the previous site. Motion is off for reduced-motion users
   and while editing in Elementor (items are shown stacked so they can be edited). */
.e-con.hascs-rotator { --display: grid; display: grid; grid-template-columns: minmax(0, 1fr); }
.hascs-rotator > * { grid-area: 1 / 1; opacity: 0; animation-duration: var(--rot-total); animation-iteration-count: infinite; animation-timing-function: ease; animation-fill-mode: both; }
.hascs-rotator--2 { --rot-total: 5.6s; }
.hascs-rotator--3 { --rot-total: 8.4s; }
.hascs-rotator--2 > * { animation-name: hascs-rot-2; }
.hascs-rotator--3 > * { animation-name: hascs-rot-3; }
.hascs-rotator > :nth-child(1) { animation-delay: -0.8s; }
.hascs-rotator > :nth-child(2) { animation-delay: 2s; }
.hascs-rotator > :nth-child(3) { animation-delay: 4.8s; }
@keyframes hascs-rot-2 { 0% { opacity: 0; } 14.29% { opacity: 1; } 50% { opacity: 1; } 64.29% { opacity: 0; } 100% { opacity: 0; } }
@keyframes hascs-rot-3 { 0% { opacity: 0; } 9.52% { opacity: 1; } 33.33% { opacity: 1; } 42.86% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.hascs-rotator > * { animation: none; opacity: 0; }
	.hascs-rotator > :first-child { opacity: 1; }
}
.elementor-editor-active .hascs-rotator > * { animation: none; opacity: 1; }
.elementor-editor-active .e-con.hascs-rotator { --display: flex; display: flex; flex-direction: column; }

/* 6. Header ----------------------------------------------------------------- */
.hascs-header {
	position: fixed; top: 0; left: 0; z-index: 99; width: 100%;
	padding: 0 15px; box-sizing: border-box;
	color: #fff; font-family: var(--hascs-font); font-size: 16px; line-height: 1.6;
}
body.admin-bar .hascs-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hascs-header { top: 46px; } }

:where(.hascs-header, .hascs-menu) a { color: inherit; text-decoration: none; }
.hascs-header ul { list-style: none; margin: 0; padding: 0; }

.hascs-header__inner {
	box-sizing: border-box; display: flex; align-items: center; justify-content: space-between;
	width: 100%; max-width: 1507px; margin: 15px auto 0; padding: 15px clamp(1.563rem, 0.986rem + 3.077vw, 4.063rem);
	border-radius: 100px; background: var(--hascs-secondary);
	transition: background-color .2s ease-in-out;
}
/* Transparent over the hero until the visitor scrolls (the class is toggled by hascs.js). */
.hascs-header--top .hascs-header__inner { background: transparent; }

.hascs-header__logo { flex: 0 0 auto; line-height: 0; }
.hascs-header__logo .custom-logo-link { display: block; line-height: 0; }
.hascs-header__logo img { display: block; width: 150px; height: auto; transition: width .2s ease-in-out; }

.hascs-header__right { display: flex; flex-direction: column; align-items: flex-end; }
.hascs-header__buttons { display: flex; gap: 5px; margin-bottom: 10px; }
.hascs-header__row { display: flex; align-items: center; flex-wrap: nowrap; }

/* Desktop navigation */
.hascs-nav__list { display: flex; align-items: center; gap: 28px; }
.hascs-nav__item { position: relative; display: flex; align-items: center; }
.hascs-nav__link { display: block; font-size: 16px; transition: color .2s ease-in-out; }
.hascs-nav__link:hover, .hascs-nav__link:focus-visible,
.hascs-nav__item.is-open > .hascs-nav__link { color: var(--hascs-primary); }

.hascs-header .hascs-nav__toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 10px; height: 10px; margin: 0 0 0 4px; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; cursor: pointer;
	transition: color .2s ease-in-out;
}
.hascs-header .hascs-nav__toggle:hover, .hascs-header .hascs-nav__toggle:focus-visible { background: none; color: var(--hascs-primary); box-shadow: none; }
.hascs-nav__toggle svg { display: block; width: 10px; height: 10px; transition: rotate .2s ease-in-out; }
.hascs-nav__item.is-open .hascs-nav__toggle svg { rotate: 180deg; }

.hascs-nav__sub {
	position: absolute; top: 100%; right: 0; z-index: 10; min-width: 300px; padding-top: 14px;
	visibility: hidden; opacity: 0; transform: translateY(-4px);
	transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
	font-size: 16px;
}
.hascs-nav__item.is-open > .hascs-nav__sub {
	visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
}
.hascs-nav__sub::before { /* the panel */
	content: ""; position: absolute; inset: 14px 0 0 0; z-index: -1;
	background: #fff; border-radius: 6px;
	box-shadow: rgba(50, 50, 93, .25) 0 50px 100px -20px, rgba(0, 0, 0, .3) 0 30px 60px -30px;
}
.hascs-nav__sub { padding-bottom: 10px; }
.hascs-nav__sub li:first-child { padding-top: 10px; }
.hascs-nav__sub a {
	display: block; padding: 8px 16px; color: var(--hascs-secondary);
	transition: background-color .2s ease-in-out, color .2s ease-in-out;
}
.hascs-nav__sub a:hover, .hascs-nav__sub a:focus-visible { background: var(--hascs-light-grey); color: var(--hascs-primary); }

.hascs-header__icons { display: flex; align-items: center; gap: 19px; padding-left: clamp(0.938rem, 0.865rem + 0.385vw, 1.25rem); }
.hascs-header__icons a { display: flex; align-items: center; line-height: 0; }
.hascs-header__icons img { display: block; height: auto; }

/* Burger + mobile menu (shown below 992px) */
.hascs-header .hascs-burger {
	display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 8px; padding: 0;
	border: 0; border-radius: 0; background: none; color: #fff; cursor: pointer;
}
.hascs-header .hascs-burger:hover, .hascs-header .hascs-burger:focus-visible { background: none; color: var(--hascs-primary); box-shadow: none; }
.hascs-burger svg, .hascs-menu__close svg { fill: currentColor; }

.hascs-menu {
	position: fixed; inset: 0; z-index: 100; overflow-y: auto; box-sizing: border-box;
	padding: 72px 24px 100px; background: var(--hascs-secondary); color: #fff;
}
.hascs-menu[hidden] { display: none; }
.hascs-menu .hascs-menu__close {
	position: absolute; top: 30px; right: 30px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 0; background: none; color: #fff; cursor: pointer;
}
.hascs-menu .hascs-menu__close:hover, .hascs-menu .hascs-menu__close:focus-visible { background: none; color: var(--hascs-primary); box-shadow: none; }
.hascs-menu__list > li { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.hascs-menu__list > li:first-child { padding-top: 0; }
.hascs-menu__list > li:last-child { border-bottom: 0; }
.hascs-menu__list > li > a { display: block; padding: 0 10px; font-size: 16px; }
.hascs-menu__list ul { padding-top: 10px; }
.hascs-menu__list ul li { margin-bottom: 5px; }
.hascs-menu__list ul a { display: block; padding: 0 10px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.hascs-menu__buttons { display: flex; flex-direction: column; gap: 5px; padding: 0 10px; margin-top: 10px; }
.hascs-menu__buttons .hascs-btn { display: block; width: 100%; }
body.hascs-menu-open { overflow: hidden; }

@media (max-width: 991px) {
	.hascs-nav { display: none; }
	.hascs-header .hascs-burger { display: inline-flex; }
	.hascs-header__row { justify-content: flex-end; }
}
@media (max-width: 767px) {
	.hascs-header__buttons { display: none; }
	.hascs-header__inner { padding-top: 10px; padding-bottom: 10px; }
	.hascs-header__logo img { width: 80px; }
	.hascs-header__right { flex-direction: row; align-items: center; }
}

/* 7. Footer ----------------------------------------------------------------- */
.hascs-footer { font-family: var(--hascs-font); font-size: 16px; line-height: 1.6; color: #fff; }
:where(.hascs-footer) a { color: inherit; text-decoration: none; }
.hascs-footer ul { list-style: none; margin: 0; padding: 0; }
.hascs-footer h2, .hascs-footer h4 { margin: 0; font-family: inherit; font-weight: 500; color: inherit; }

/* "Get in touch" banner: blue panel straddling a white / navy split. */
.hascs-cta { background: linear-gradient(to bottom, transparent 50%, var(--hascs-secondary) 50%); padding: 0 15px; }
.hascs-cta__panel {
	box-sizing: border-box; max-width: 1400px; margin: 0 auto; padding: 0 var(--hs-m6);
	background: var(--hascs-tertiary); border-radius: var(--hascs-radius-card);
}
.hascs-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; max-width: 1164px; margin: 0 auto; }
.hascs-cta__text { flex: 0 0 395px; box-sizing: border-box; padding: var(--hs-m6) 0; }
.hascs-cta__text h2 { font-size: clamp(24.034px, 1.502rem + ((1vw - 3.2px) * 1.478), 40px); line-height: 1.25; }
.hascs-cta__text p { margin: var(--hs-s4) 0 0; }
.hascs-cta__text .hascs-btn { margin-top: var(--hs-m1); }
.hascs-cta__image { flex: 0 1 630px; min-width: 0; line-height: 0; }
.hascs-cta__image img { display: block; width: 630px; max-width: 100%; height: auto; margin-left: auto; }

.hascs-footer__main { background: var(--hascs-secondary); padding: 80px 15px var(--hs-s5); }
.hascs-footer__inner {
	display: flex; justify-content: space-between; gap: 40px; max-width: 1164px; margin: 0 auto;
}
.hascs-footer__contact { flex: 0 0 358px; max-width: 100%; }
.hascs-footer__logo { line-height: 0; }
.hascs-footer__logo img { display: block; width: 100%; height: auto; }
.hascs-footer__lead { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.6; }
.hascs-footer__lead:first-of-type { margin-top: 0; }
.hascs-footer__address { margin: var(--hs-s5) 0 0; }
.hascs-footer__side { flex: 0 1 684px; min-width: 0; }

.hascs-footer__newsletter {
	display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: var(--hs-m4);
}
.hascs-footer__newsletter h4 { font-size: 20px; line-height: 1.25; }
.hascs-footer__newsletter .gform_wrapper { margin: 0; }
/* Newsletter form (Gravity Forms #3), same treatment as the previous footer. */
.footer-form-wrapper .gform_wrapper .gform_heading { display: none; }
.footer-form-wrapper .gform_wrapper input:not([type="checkbox"], [type="radio"]),
.footer-form-wrapper .gform_wrapper textarea,
.footer-form-wrapper .gform_wrapper select {
	height: 48px !important; padding: 6px 15px !important; border-radius: 8px !important; box-shadow: unset;
	font-size: 16px; font-weight: 300; line-height: 1.2;
}
.footer-form-wrapper .gform_wrapper .gform_fields { gap: 15px !important; }
.footer-form-wrapper .gform_wrapper .gfield--type-submit { place-items: stretch start !important; }
.footer-form-wrapper .gform_wrapper .gform_footer { display: none; }

.hascs-footer__links { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.hascs-footer__cols { display: flex; gap: 42px; }
.hascs-footer__col { padding-left: var(--hs-s4); }
.hascs-footer__col h4 { margin-bottom: var(--hs-s5); font-size: 20px; line-height: 1.25; }
.hascs-footer__col li a {
	position: relative; display: block; transition: color .2s ease-in-out;
}
.hascs-footer__col li a::before {
	content: ""; position: absolute; left: calc(var(--hs-s4) * -1); top: 50%; width: 10px; height: 10px; border-radius: 2px;
	background: var(--hascs-tertiary); opacity: 0; translate: 0 -50%; transition: opacity .2s ease-in-out;
}
.hascs-footer__col li a:hover, .hascs-footer__col li a:focus-visible { font-weight: 600; }
.hascs-footer__col li a:hover::before, .hascs-footer__col li a:focus-visible::before { opacity: 1; }

.hascs-footer__badges { display: flex; flex-direction: column; align-items: stretch; flex: 0 0 180px; line-height: 0; }
.hascs-footer__badges img { display: block; height: auto; max-width: 100%; }
.hascs-social { display: flex; justify-content: space-between; margin-bottom: 10px; }
.hascs-social a {
	display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
	background: #fff; border-radius: 5px; color: var(--hascs-secondary);
}
.hascs-social svg { fill: var(--hascs-secondary); width: 24px; height: 24px; }

.hascs-footer__legal { max-width: 1164px; margin: var(--hs-m5) auto 0; border-top: 1px solid var(--hascs-mid-grey); }
.hascs-footer__legal-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: var(--hs-s5) 0; }
.hascs-footer__copy { font-size: calc(1em - 1pt); }
.hascs-footer__legal ul { display: flex; gap: 20px; font-size: 14px; }

/* Tablet / mobile footer */
@media (max-width: 1100px) {
	.hascs-footer__inner { flex-direction: column; gap: 40px; }
	.hascs-footer__contact { flex-basis: auto; width: 100%; max-width: 358px; }
	.hascs-footer__side { flex-basis: auto; width: 100%; }
}
@media (max-width: 900px) {
	.hascs-cta__panel { padding-bottom: 0; }
	.hascs-cta__inner { flex-direction: column; align-items: flex-start; gap: 0; }
	.hascs-cta__text { flex: 0 0 auto; width: 100%; max-width: 600px; padding-bottom: var(--hs-m1); }
	.hascs-cta__image { flex: 0 0 auto; align-self: center; width: 100%; max-width: 630px; }
	.hascs-cta__image img { margin: 0 auto; }
}
@media (max-width: 767px) {
	.hascs-footer__main { padding-top: 56px; }
	.hascs-footer__newsletter { flex-direction: column; align-items: flex-start; }
	.hascs-footer__newsletter .gform_wrapper { width: 100%; }
	.hascs-footer__links { flex-direction: column; align-items: flex-start; gap: 30px; }
	.hascs-footer__badges { flex-basis: auto; width: 180px; }
	.hascs-footer__logo { max-width: 280px; }
}

/* 8. Utilities -------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hascs-lift, .hascs-btn, .hascs-nav__sub { transition: none; }
}
