/* Ronald McDonald House - Custom CSS
 *
 * 1. Design tokens
 * 2. Font faces
 * 3. Base
 * 4. Typography (headings + text scale)
 * 5. Links, focus and selection
 * 6. Button typography
 * 7. Color utilities
 * 8. Accessibility
 */

/* ==========================================================================
   1. Design tokens (single source of truth, plugins consume these)
   ========================================================================== */
:root {
  /* Brand colors */
  --rmh-soft-white: #fffde9;
  --rmh-red: #db0007;
  --rmh-black: #000000;
  --rmh-lavender: #d0c9ff;
  --rmh-aqua: #8ee7f8;
  --rmh-lime: #9cd83e;
  --rmh-gold: #ffbc0d;
  --rmh-purple: #92177b; /* Interactive hover color */
  --rmh-grey: #616161;
  --rmh-light-grey: #cfcfcf;

  /* Fonts */
  --rmh-font-default: "Audrey Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rmh-font-display: "Audrey Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Font sizes: clamp(min, fluid, max). Fluid values are based on a 1440px design. */
  --rmh-fs-h1: clamp(2.5rem, 6.67vw, 6rem); /* 40px - 96px */
  --rmh-fs-h2: clamp(2.25rem, 5.56vw, 5rem); /* 36px - 80px */
  --rmh-fs-h3: clamp(1.75rem, 4.44vw, 4rem); /* 28px - 64px */
  --rmh-fs-h4: clamp(1.375rem, 2.22vw, 2rem); /* 22px - 32px */
  --rmh-fs-h5: 1.25rem; /* 20px */
  --rmh-fs-h6: 1rem; /* 16px */
  --rmh-fs-subhead: clamp(1.5rem, 3.125vw, 2.8125rem); /* 24px - 45px */
  --rmh-fs-regular: clamp(1.125rem, 1.8vw, 1.625rem); /* 18px - 26px */
  --rmh-fs-sm: 0.575rem; /* 9.2px */
  --rmh-fs-cta: 0.9375rem; /* 15px */
  --rmh-fs-button: 0.90625rem; /* 14.5px */

  /* Line heights */
  --rmh-lh-h1: 1;
  --rmh-lh-h2: 1;
  --rmh-lh-h3: 1;
  --rmh-lh-heading: 1.2;
  --rmh-lh-h4: 1.3125;
  --rmh-lh-subhead: 1.067;
  --rmh-lh-regular: 1.346;
  --rmh-lh-sm: 1.739;
  --rmh-lh-cta: 1.28;
  --rmh-lh-button: 1.325;
  --rmh-lh-body: 1.5;

  /* Layout and motion */
  --rmh-container-max: 1440px;
  --rmh-header-offset: 0px; /* Set to the sticky header height so anchor links are not hidden */
  --rmh-transition: 0.25s ease;

  /* Legacy aliases (safe to remove once nothing references them) */
  --font-default: var(--rmh-font-default);
  --font-display: var(--rmh-font-display);

  /* space */
  --space-outer: 50px;
}

/* ==========================================================================
   2. Font faces
   Uncomment and adjust once the font files are placed in assets/fonts/.
   ========================================================================== */
/*
@font-face {
  font-family: "Audrey Text";
  src: url("../fonts/AudreyText-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Audrey Text";
  src: url("../fonts/AudreyText-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Audrey Display";
  src: url("../fonts/AudreyDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*/

/* ==========================================================================
   3. Base
   ========================================================================== */
html {
  /* Keep the browser default (16px) so user font-size preferences are respected */
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--rmh-soft-white);
  color: var(--rmh-black);
  font-family: var(--rmh-font-default);
  font-size: 1rem;
  line-height: var(--rmh-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Offset anchor targets for sticky headers */
[id] {
  scroll-margin-top: var(--rmh-header-offset);
}

p {
  text-wrap: pretty;
}

P:last-child {
  margin-block-end: 0;
}

/* Form controls inherit the site typography */
input,
select,
textarea,
button {
  font-family: inherit;
}

/* ==========================================================================
   4. Typography
   Tags and .rmh-h* classes share the same styles, so a visual heading level
   can be applied to any semantic tag (e.g. an h2 styled as .rmh-h3).
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--rmh-font-display);
  line-height: var(--rmh-lh-heading);
  font-weight: bold;
  text-wrap: balance;
}

h1,
.rmh-h1 {
  font-size: var(--rmh-fs-h1);
  line-height: var(--rmh-lh-h1);
}

h2,
.rmh-h2 {
  font-size: var(--rmh-fs-h2);
  line-height: var(--rmh-lh-h2);
}

h3,
.rmh-h3 {
  font-size: var(--rmh-fs-h3);
  line-height: var(--rmh-lh-h3);
}

h4,
.rmh-h4 {
  font-size: var(--rmh-fs-h4);
  line-height: var(--rmh-lh-h4);
}

h5,
.rmh-h5 {
  font-size: var(--rmh-fs-h5);
}

h6,
.rmh-h6 {
  font-size: var(--rmh-fs-h6);
}

/*  */
.relative {
  position: relative;
}
/* Utility classes (safe to use in Elementor's CSS Classes field) */
.rmh-header,
.text-subhead {
  font-size: var(--rmh-fs-subhead);
  line-height: var(--rmh-lh-subhead);
}

.text-regular {
  font-size: var(--rmh-fs-regular);
  line-height: var(--rmh-lh-regular);
}

.text-sm {
  font-size: var(--rmh-fs-sm);
  line-height: var(--rmh-lh-sm);
}

.text-cta {
  font-size: var(--rmh-fs-cta);
  line-height: var(--rmh-lh-cta);
}

.font-default {
  font-family: var(--rmh-font-default);
}

.font-display {
  font-family: var(--rmh-font-display);
}

/* ==========================================================================
   5. Links, focus and selection
   ========================================================================== */
a {
  color: var(--rmh-red);
  transition: color var(--rmh-transition);
}

a:hover,
a:focus-visible {
  color: var(--rmh-red);
}

:focus-visible {
  outline: 2px solid var(--rmh-red);
  outline-offset: 3px;
}

::selection {
  background-color: var(--rmh-gold);
  color: var(--rmh-black);
}

/* ==========================================================================
   6. Button typography
   Colors and layout come from the RMH Elementor Widgets plugin (button.css).
   ========================================================================== */
.rmh-button {
  font-size: var(--rmh-fs-button);
  line-height: var(--rmh-lh-button);
}

/* ==========================================================================
   7. Color utilities
   ========================================================================== */
.rmh-bg-soft-white {
  background-color: var(--rmh-soft-white);
}
.rmh-bg-red {
  background-color: var(--rmh-red);
}
.rmh-bg-black {
  background-color: var(--rmh-black);
}
.rmh-bg-lavender {
  background-color: var(--rmh-lavender);
}
.rmh-bg-aqua {
  background-color: var(--rmh-aqua);
}
.rmh-bg-lime {
  background-color: var(--rmh-lime);
}
.rmh-bg-gold {
  background-color: var(--rmh-gold);
}
.rmh-bg-purple {
  background-color: var(--rmh-purple);
}

.rmh-text-soft-white {
  color: var(--rmh-soft-white);
}
.rmh-text-red {
  color: var(--rmh-red);
}
.rmh-text-black {
  color: var(--rmh-black);
}
.rmh-text-lavender {
  color: var(--rmh-lavender);
}
.rmh-text-aqua {
  color: var(--rmh-aqua);
}
.rmh-text-lime {
  color: var(--rmh-lime);
}
.rmh-text-gold {
  color: var(--rmh-gold);
}
.rmh-text-purple {
  color: var(--rmh-purple);
}

/* ==========================================================================
   8. Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* custom */
header.elementor-location-header .elementor-nav-menu--main > ul > li > a,
header.elementor-location-header .elementor-menu-toggle,
header.elementor-location-header .search-logo a {
  color: inherit !important;
}
header.elementor-location-header .elementor-nav-menu--main > ul > li > a > .sub-arrow > svg,
header.elementor-location-header .elementor-menu-toggle .e-font-icon-svg,
header.elementor-location-header .search-logo a > svg {
  fill: currentColor !important;
}
header.elementor-location-header {
  color: var(--rmh-black);
}
header.elementor-location-header .elementor-nav-menu--main > ul > li > a:hover::after,
header.elementor-location-header .elementor-nav-menu--main > ul > li > a.elementor-item-active::after {
  content: ""!important;
  display: block;
  width: 100%;
  height: 4px;

  background-color: var(--rmh-red);

  -webkit-mask: url("../svg/mark-menu-highlight.svg") center / 100% 100% no-repeat;
  mask: url("../svg/mark-menu-highlight.svg") center / 100% 100% no-repeat;

  position: absolute;
  left: 0;
  bottom: 10px;
}
header.elementor-location-header .elementor-nav-menu--main > ul > li > a.has-submenu:hover::after,
header.elementor-location-header .elementor-nav-menu--main > ul > li > a.has-submenu.elementor-item-active::after {
  width: calc(100% - 28px);
}
header.elementor-location-header ul.elementor-nav-menu--dropdown a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

header.elementor-location-header ul.elementor-nav-menu--dropdown a::after {
  content: "";
  display: block;
  width: 12px;
  height: 8.67px;

  background-color: currentColor;

  -webkit-mask: url("../svg/arrow-right.svg") center / contain no-repeat;
  mask: url("../svg/arrow-right.svg") center / contain no-repeat;
  opacity: 0;
}
header.elementor-location-header ul.elementor-nav-menu--dropdown a:hover::after {
  opacity: 1;
}
header.elementor-location-header ul.elementor-nav-menu--dropdown a,
header.elementor-location-header ul.elementor-nav-menu--dropdown a:focus,
header.elementor-location-header ul.elementor-nav-menu--dropdown a:hover {
  border: none;
}
header.elementor-location-header ul.elementor-nav-menu--dropdown a.elementor-item-active,
header.elementor-location-header ul.elementor-nav-menu--dropdown a:focus,
header.elementor-location-header ul.elementor-nav-menu--dropdown a:hover {
  font-weight: bold;
}

body.header-transparent:not(.elementor-editor-active) .elementor-location-header {
  position: absolute;
  width: 100%;
  z-index: 100;
}

body.header-transparent:not(.home):not(.elementor-editor-active) header.elementor-location-header {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
}

body.header-transparent:not(.home):not(.elementor-editor-active) header.elementor-location-header .elementor-widget-theme-site-logo {
  display: none;
}

body.header-transparent:not(.home):not(.elementor-editor-active) header.elementor-location-header .header-logo-white {
  display: block;
}

.menu-first-item-lead > .elementor-nav-menu--layout-vertical > ul.elementor-nav-menu > .menu-item:first-child > a {
  font-size: 18px;
  font-weight: bold;
  font-family: var(--font-display);
}

.px-wrap {
  padding-inline: var(--space-outer);
}

.py-2xl {
  padding-block: clamp(60px, 7.638vw, 110px);
}

.py-xl {
  padding-block: clamp(40px, 5.556vw, 80px);
}

.py-banner {
  padding-block-start: clamp(210px, 19.4vw, 280px);
  padding-block-end: clamp(110px, 12.5vw, 180px);
}

/*  */

.link-underline a {
  text-decoration: underline;
}

/* responsive */
@media (max-width: 991px) {
  :root {
    --space-outer: 32px;
  }
}
@media (max-width: 767px) {
  :root {
    --space-outer: 20px;
  }
}


/* ==========================================================
   Formidable Forms - default style (RMH)
   Path assumption: this file sits next to ../svg/heart.svg
   ========================================================== */

/* ---------- Layout: row-gap 10px / column-gap 30px ---------- */
.with_frm_style .frm_fields_container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  row-gap: 10px;
  column-gap: 30px;
}

.with_frm_style .frm_form_field {
  margin: 0;
  min-width: 0;
}

/* Formidable layout classes (frm_half, frm_third...) */
.with_frm_style .frm_form_field { grid-column: span 12; }
.with_frm_style .frm_half       { grid-column: span 6; }
.with_frm_style .frm_third      { grid-column: span 4; }
.with_frm_style .frm_two_thirds { grid-column: span 8; }
.with_frm_style .frm_fourth     { grid-column: span 3; }

@media (max-width: 600px) {
  .with_frm_style .frm_half,
  .with_frm_style .frm_third,
  .with_frm_style .frm_two_thirds,
  .with_frm_style .frm_fourth {
    grid-column: span 12;
  }
}

/* ---------- Field labels (e.g. "Last Name") ---------- */
.with_frm_style .frm_primary_label {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  font-size: 15px;
  line-height: 24px;
  color: #1B1B1C;
  margin: 0;
  padding: 0;
}

/* ---------- Input fields (total height 51px) ---------- */
.with_frm_style input[type="text"],
.with_frm_style input[type="email"],
.with_frm_style input[type="tel"],
.with_frm_style input[type="url"],
.with_frm_style input[type="number"],
.with_frm_style input[type="password"],
.with_frm_style input[type="date"],
.with_frm_style select,
.with_frm_style textarea {
  box-sizing: border-box;
  width: 100%;
  background: #FFFDE9;
  border: 1px solid #000000;
  border-radius: 4px;
  color: #1B1B1C;
  font-family: var(--font-default);
}

.with_frm_style input[type="text"],
.with_frm_style input[type="email"],
.with_frm_style input[type="tel"],
.with_frm_style input[type="url"],
.with_frm_style input[type="number"],
.with_frm_style input[type="password"],
.with_frm_style input[type="date"],
.with_frm_style select {
  height: 51px;
  padding: 0 14px; /* padding sized so the box is 51px tall */
}

.with_frm_style textarea {
  padding: 13px 14px;
}

/* ---------- Radios & checkboxes ---------- */
.with_frm_style .frm_radio,
.with_frm_style .frm_checkbox {
  margin: 0;
}

.with_frm_style .frm_radio label,
.with_frm_style .frm_checkbox label {
  display: flex;
  align-items: center;
  gap: 8px; /* circle <-> text */
  font-family: var(--font-default);
  font-style: normal;
  font-weight: 400;
  font-size: 12.6px;
  line-height: 17px;
  color: #1B1B1C;
  cursor: pointer;
}

.with_frm_style .frm_radio input[type="radio"],
.with_frm_style .frm_checkbox input[type="checkbox"] {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin: 0;
}

/* ---------- Submit button ---------- */
.with_frm_style .frm_submit {
  margin-top: 40px;
}

.with_frm_style .frm_submit button.frm_button_submit,
.with_frm_style .frm_submit input[type="submit"].frm_button_submit {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 12px;
  gap: 10px;

  background: var(--rmh-red);
  border: 0;
  border-radius: 6px;

  font-family: var(--font-default);
  font-style: normal;
  font-weight: 700;
  font-size: 15.9px;
  line-height: 24px;
  color: var(--rmh-soft-white);
  cursor: pointer;
  transition: background-color .2s ease;
}

/* Heart icon on the left */
.with_frm_style .frm_submit button.frm_button_submit::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask: url("../svg/rmh-heart-2.svg") no-repeat center / contain;
          mask: url("../svg/rmh-heart-2.svg") no-repeat center / contain;
}

.with_frm_style .frm_submit button.frm_button_submit:hover,
.with_frm_style .frm_submit input[type="submit"].frm_button_submit:hover {
  background: var(--rmh-purple);
}
