@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/inter-tight-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/inter-tight-v9-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

@font-face {
  font-family: Raleway;
  src: url('../fonts/raleway-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Raleway;
  src: url('../fonts/raleway-semibold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

:root {
  --rgs-ink: #11232f;
  --rgs-paper: #faf7f2;
  --rgs-button: #ede9e8;
  --rgs-blue: #1b476a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--rgs-ink);
  font-family: Raleway,Arial,sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a,
a:visited {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 0.1875rem solid #4ba6db;
  outline-offset: 0.3125rem;
}

button {
  font: inherit;
}

[hidden] {
  display: none!important;
}

.rgs-container {
  width: calc(100% - 4rem);
  max-width: 87.5rem;
  margin-inline: auto;
}

.rgs-header {
  position: fixed;
  inset: var(--rgs-toolbar-offset, 0rem) 0 auto;
  z-index: 10;
  padding-top: 1.625rem;
  transform: translateY(var(--rgs-header-offset, 0rem));
  will-change: transform;
}

body:not(.home) .site {
  padding-top: var(--rgs-header-space, 5.375rem);
}

.rgs-header__inner {
  display: flex;
  gap: 0.3125rem;
  align-items: stretch;
}

.rgs-header__panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  min-height: 3.75rem;
  padding: 0.5rem 1rem;
  background: url('../images/header-panel.svg') center/100% 100% no-repeat;
  position: relative;
}

.rgs-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.rgs-brand img {
  width: 2.8125rem;
  height: 2.8125rem;
  object-fit: contain;
}

.rgs-brand__text {
  display: flex;
  flex-direction: column;
}

.rgs-brand__name {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.rgs-brand__tagline {
  font-size: 0.625rem;
  font-weight: 600;
  color: #8f99a1;
  line-height: 1.4;
}

.rgs-nav {
  position: relative;
  margin-inline: auto;
}

.rgs-nav__list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rgs-nav a {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.25s ease;
}

.rgs-nav a:hover,
.rgs-nav a:focus-visible {
  color: var(--rgs-blue);
  text-decoration: none;
}

.rgs-nav__indicator {
  position: absolute;
  left: 0;
  top: 0;
  height: 0.0625rem;
  background: var(--rgs-blue);
  pointer-events: none;
  opacity: 0;
}

.rgs-header__action {
  width: 14.4375rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.9375rem;
  background: url('../images/header-action.svg') center/100% 100% no-repeat;
  position: relative;
}

.rgs-header__action:before {
  content: '';
  position: absolute;
  left: -0.625rem;
  top: 50%;
  width: 0.8125rem;
  height: 0.25rem;
  background: var(--rgs-blue);
  border-radius: 0.1875rem;
  transform: translateY(-50%);
}

.rgs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.5rem;
  border: 0.0625rem solid transparent;
  border-radius: 0.25rem;
  background: var(--rgs-button);
  color: var(--rgs-ink)!important;
  text-decoration: none;
  font: 600 1rem/1.4 Raleway,Arial,sans-serif;
  text-align: center;
  transition: background .2s,color .2s;
}

.rgs-button:hover {
  background: #fff;
}

.rgs-header__action .rgs-button {
  width: 100%;
}

.rgs-button--outline {
  border-color: rgba(255,255,255,.75);
  background: transparent;
  color: #fff!important;
}

.rgs-button--outline:hover {
  background: rgba(255,255,255,.15);
}

.rgs-menu-toggle {
  position: relative;
  width: 3rem;
  height: 3rem;
  border: 0;
  background: transparent;
  padding: 0.75rem;
  cursor: pointer;
}

.rgs-menu-toggle span {
  position: absolute;
  top: calc(50% - 0.0625rem);
  left: 0.75rem;
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  background: var(--rgs-ink);
  margin: 0;
  transform: translateY(-0.25rem);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.rgs-menu-toggle span:last-child {
  transform: translateY(0.25rem);
}

.rgs-menu-toggle[aria-expanded="true"] span:first-child {
  transform: rotate(45deg);
}

.rgs-menu-toggle[aria-expanded="true"] span:last-child {
  transform: rotate(-45deg);
}

@media (max-width: 1024px) {
  .rgs-container {
    width: calc(100% - 2.5rem);
  }

  .rgs-header {
    padding-top: 1.25rem;
  }

  .rgs-header__panel {
    flex-wrap: wrap;
    background: var(--rgs-paper);
    border-radius: 0.25rem;
  }

  .rgs-menu-toggle:not([hidden]) {
    display: block;
  }

  .rgs-nav {
    width: 100%;
    margin: 0;
    padding: 1.25rem 0 0.75rem;
  }

  .rgs-nav--collapsible {
    display: grid;
    grid-template-rows: 0fr;
    padding-block: 0;
    visibility: hidden;
    transition: grid-template-rows 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s 0.35s;
  }

  .rgs-nav--collapsible.is-open {
    grid-template-rows: 1fr;
    padding-block: 1.25rem 0.75rem;
    visibility: visible;
    transition-delay: 0s;
  }

  .rgs-nav--collapsible .rgs-nav__list {
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .rgs-nav--collapsible.is-open .rgs-nav__list {
    opacity: 1;
    transform: translateY(0);
  }

  .rgs-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .rgs-nav a {
    display: block;
    padding: 0.75rem;
    font-size: 1rem;
  }

  .rgs-header__inner {
    align-items: flex-start;
  }

  .rgs-header__action {
    min-height: 3.8125rem;
  }

  .rgs-nav__indicator {
    display: none;
  }
}

@media (max-width: 768px) {
  .rgs-container {
    width: calc(100% - 2rem);
  }

  .rgs-header {
    padding-top: 1rem;
  }

  .rgs-header__action {
    display: none;
  }

  .rgs-header__panel {
    padding: 0.5rem 1rem;
  }

  .rgs-brand img {
    width: 2.375rem;
    height: 2.375rem;
  }

  .rgs-brand__name {
    font-size: 1.125rem;
  }

  .rgs-brand__tagline {
    font-size: 0.5625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *:before,
  *:after {
    transition: none!important;
  }
}

/* Footer */
.rgs-footer {
  padding-bottom: 3rem;
  background: #e9e5e4;
  scroll-margin-top: 6rem;
}

.rgs-footer__panel {
  overflow: hidden;
  border-radius: 0.75rem;
  background: #f9f6f1;
}

.rgs-footer__hero {
  position: relative;
  overflow: hidden;
  min-height: 27.25rem;
  background: radial-gradient(ellipse at 58% 25%, #e6cacc, transparent 55%);
}

.rgs-footer__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 27.25rem;
  width: 40%;
  padding: 2.5rem;
}

.rgs-footer__logo img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
}

.rgs-footer h2 {
  margin: 0 0 1.25rem;
  font-family: 'Inter Tight', Arial, sans-serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
  white-space: pre-line;
}

.rgs-footer__copy p {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  line-height: 1.4;
  white-space: pre-line;
}

.rgs-footer__team {
  mix-blend-mode: multiply;
  position: absolute;
  top: 0;
  right: 5%;
  width: 60%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  max-width: none;
  pointer-events: none;
}

.rgs-footer__contacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-inline: 2.5rem;
  padding-block: 1.5rem;
  border-top: 0.0625rem solid #ede9e8;
  font-size: 1.25rem;
}

.rgs-footer__contacts > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.rgs-footer__contacts > div:last-child {
  text-align: right;
}

.rgs-footer__contacts a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.rgs-footer__contacts a:hover {
  color: var(--rgs-blue);
}

.rgs-footer__contacts span {
  display: block;
  margin-top: 0.5rem;
  color: #899197;
  font-size: 1rem;
}

.rgs-footer__bottom,
.rgs-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.rgs-footer__bottom {
  justify-content: space-between;
  margin-top: 1.5rem;
  color: #899197;
  font-size: 0.875rem;
}

.rgs-footer__legal span,
.rgs-footer__legal a {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .rgs-footer__copy {
    width: 50%;
    padding: 2rem;
  }

  .rgs-footer__team {
    right: -10%;
  }

  .rgs-footer__contacts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: 2rem;
  }

  .rgs-footer__contacts > div:last-child {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .rgs-footer {
    padding-bottom: 2.5rem;
  }

  .rgs-footer__copy {
    width: 100%;
    min-height: 24rem;
    padding: 1.5rem;
    gap: 2rem;
  }

  .rgs-footer__copy p {
    font-size: 1rem;
  }

  .rgs-footer__team {
    position: relative;
    display: block;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center bottom;
  }

  .rgs-footer__contacts {
    grid-template-columns: minmax(0, 1fr);
    margin-inline: 1.5rem;
    font-size: 1.125rem;
  }
}

/* Shared news cards */
.rgs-news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem 0.75rem;
}

.rgs-news-card {
  min-width: 0;
}

.rgs-news-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #d4d8da;
}

.rgs-news-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rgs-news-card__image:hover img {
  transform: scale(1.035);
}

.rgs-news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 1rem 0 0.625rem;
  color: #697780;
  font-size: 0.8125rem;
}

.rgs-news-card a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.rgs-news-card a:hover {
  color: var(--rgs-blue);
}

.rgs-news-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  line-height: 1.25;
  font-weight: 600;
}

.rgs-news-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .rgs-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .rgs-news-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rgs-news-card__image img {
    transition: none;
  }
}


/* Shared calculation form: landing and popup. */
.rgs-calculation__form {
  min-width: 0;
}

.rgs-calculation__form .wpcf7,
.rgs-calculation__form .wpcf7-form {
  height: 100%;
}

.rgs-calculation__form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rgs-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

/* CF7 adds paragraph and line-break wrappers to the native form template. */
.rgs-calculation__form .wpcf7-form > p,
.rgs-form__fields > p {
  display: contents;
}

.rgs-calculation__form p {
  margin: 0;
}

.rgs-form__fields br {
  display: none;
}

.rgs-form__field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.625rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: var(--rgs-paper);
  font-size: 1rem;
  line-height: 1;
  color: #69757c;
}

.rgs-form__field .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.rgs-form__field input,
.rgs-form__field select,
.rgs-form__field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--rgs-ink);
  background: transparent;
  font: 400 1.25rem/1.3 Raleway, Arial, sans-serif;
  outline: none;
  box-shadow: none;
}

.rgs-form__field select {
  font-size: 1rem;
}

.rgs-form__field input::placeholder,
.rgs-form__field textarea::placeholder {
  color: #69757c;
  opacity: 1;
}

.rgs-form__field input:focus-visible,
.rgs-form__field select:focus-visible,
.rgs-form__field textarea:focus-visible {
  outline: none;
}

.rgs-form__field input,
.rgs-form__field select {
  height: 1.625rem;
  min-height: 1.625rem;
}

.rgs-form__field input::-webkit-date-and-time-value {
  min-height: 1.625rem;
  text-align: left;
}

.rgs-form__field--message {
  flex: 1;
}

.rgs-form__field textarea {
  min-height: 7rem;
  resize: vertical;
}

.rgs-form__count {
  margin-top: auto;
  text-align: right;
  font-size: 0.875rem;
}

.rgs-form__consent {
  font-size: 0.875rem;
  line-height: 1.4;
}

.rgs-form__consent .wpcf7-list-item {
  margin: 0;
}

.rgs-form__consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.rgs-form__consent input {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: var(--rgs-blue);
}

.rgs-form__submit {
  position: relative;
}

.rgs-calculation__form input[type='submit'] {
  width: 100%;
  min-height: 4rem;
  padding: 1rem 2rem;
  border: 0;
  border-radius: 0.25rem;
  background: var(--rgs-blue);
  color: #fff;
  font: 600 1rem/1.4 Raleway, Arial, sans-serif;
  cursor: pointer;
}

.rgs-calculation__form input[type='submit']:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rgs-calculation__form .wpcf7-spinner {
  position: absolute;
  right: 0.5rem;
  top: 1.25rem;
  margin: 0;
}

.rgs-calculation__form .wpcf7-response-output {
  margin: 0;
  padding: 1rem;
  font-size: 1rem;
}

.rgs-calculation__form .wpcf7-not-valid-tip {
  padding-top: 0.5rem;
  font-size: 0.875rem;
}



/* Global calculation popup. */
.rgs-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(17, 35, 47, 0.55);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 300ms;
}

.rgs-popup.popup_overlay_show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.rgs-popup__panel {
  position: relative;
  width: 100%;
  max-width: 48rem;
  margin-block: auto;
  padding: 2.5rem;
  border-radius: 0.75rem;
  background: #e9e5e4;
  transform: translateY(1.5rem);
  transition: transform 300ms ease;
}

.popup_overlay_show .rgs-popup__panel {
  transform: translateY(0);
}

.rgs-popup__panel:focus {
  outline: none;
}

.rgs-popup__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rgs-ink);
  font: 400 2rem/1 Arial, sans-serif;
  cursor: pointer;
}

.rgs-popup h2 {
  margin: 0 2rem 1rem 0;
  font-family: 'Inter Tight', Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.rgs-popup__description {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.4;
}

.rgs-popup .wpcf7,
.rgs-popup .wpcf7-form {
  height: auto;
}

@media (max-width: 768px) {
  .rgs-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .rgs-popup {
    padding: 1rem 0.5rem;
  }

  .rgs-popup__panel {
    padding: 2rem 1rem 1rem;
  }

  .rgs-popup h2 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rgs-popup,
  .rgs-popup__panel {
    transition: none;
  }
}
