﻿/*
Theme Name: BO habitat locatif
Description: Thème pour BO habitat locatif
Version: 1.0
Author: agence m
*/


/* FONTS
   ----------------------------- */

@font-face {
   font-family: 'Bebas Neue';
   font-style: normal;
   font-weight: 400;
   font-display: block;
   src: url('fonts/bebas-neue-400.woff2') format('woff2');
}

@font-face {
   font-family: 'Satoshi';
   font-style: normal;
   font-weight: 400;
   font-display: block;
   src: url('fonts/satoshi-400.woff2') format('woff2');
}

@font-face {
   font-family: 'Satoshi';
   font-style: normal;
   font-weight: 500;
   font-display: block;
   src: url('fonts/satoshi-500.woff2') format('woff2');
}

@font-face {
   font-family: 'Satoshi';
   font-style: normal;
   font-weight: 700;
   font-display: block;
   src: url('fonts/satoshi-700.woff2') format('woff2');
}


/* VARIABLES
   ----------------------------- */

:root {

   /* Colors */
   --white: #FFF;
   --soft-white: #F9F8F6;
   --off-white: #F7F5F2;
   --blue-lightest: #C9CFD5;
   --blue-light: #9EA9B3;
   --blue: #677989;
   --blue-dark: #4F6272;
   --blue-darkest: #404E5C;
   --red: #D00000;

   --dark-border: rgba(64, 78, 92, 0.20);
   --light-border: rgba(255, 255, 255, 0.20);
   --field-bg: var(--white);
   --field-border: rgba(64, 78, 92, 0.15);

   /* TYPE SCALE — direct clamp(), 320px → 1440px (20rem → 90rem)
      Formula: slope = (max - min) / 70; intercept = min - slope * 20
      Max values come from the 1440px design. Mobile mins chosen per token.
      ----------------------------- */
   --impact-size: clamp(2.5rem, calc(1.429rem + 5.357vw), 6.25rem); /* 40 → 100px */
   --h1-size: clamp(2.25rem, calc(1.321rem + 4.643vw), 5.5rem); /* 36 → 88px */
   --h2-size: clamp(1.875rem, calc(1.018rem + 4.286vw), 4.875rem); /* 30 → 78px */
   --h3-size: clamp(1.625rem, calc(1.411rem + 1.071vw), 2.375rem); /* 26 → 38px */
   --h4-size: clamp(1.25rem, calc(1.214rem + 0.179vw), 1.375rem); /* 20 → 22px */
   --h5-size: clamp(1.125rem, calc(1.089rem + 0.179vw), 1.25rem); /* 18 → 20px */
   --h6-size: clamp(0.9375rem, calc(0.92rem + 0.089vw), 1rem); /* 15 → 16px */
   --paragraph-size: clamp(0.9375rem, calc(0.902rem + 0.179vw), 1.0625rem); /* 15 → 17px */
   --small-text-size: clamp(0.8125rem, calc(0.795rem + 0.089vw), 0.875rem); /* 13 → 14px */

   /* BUTTON
      ----------------------------- */
   --btn-size: clamp(0.8125rem, calc(0.7768rem + 0.179vw), 0.9375rem); /* 13 → 15px */
   --btn-padding: clamp(0.8125rem, calc(0.7411rem + 0.357vw), 1.0625rem) clamp(1.25rem, calc(1.1429rem + 0.536vw), 1.625rem); /* 13→17px vertical · 20→26px horizontal, fully fluid */

   /* SPACING — same clamp formula, 320 → 1440px. Maxes from project spec.
      ----------------------------- */
   --container-padding: clamp(1.25rem, calc(0.375rem + 3vw), 3rem); /* 20 → 48px */
   --row-padding-xs: clamp(2.25rem, calc(1.821rem + 2.143vw), 3.75rem); /* 36 → 60px */
   --row-padding-s: clamp(2.5rem, calc(2.054rem + 2.232vw), 4.0625rem); /* 40 → 65px */
   --row-padding-l: clamp(3.125rem, calc(2.054rem + 5.357vw), 6.875rem); /* 50 → 110px */
   --row-padding-xl: clamp(3.75rem, calc(2.679rem + 5.357vw), 7.5rem); /* 60 → 120px */
   --row-padding-xxl: clamp(5.625rem, calc(3.839rem + 8.929vw), 11.875rem); /* 90 → 190px */
   --size-wrap: 100rem; /* 1600px fixed */
   --gap-m: clamp(1.25rem, min(calc(0.984rem + 0.8511vw), calc(1.5893rem + 0.1786vw)), 1.875rem);
   --radius: 0.75rem;
   --radius-pill: 999px;
   --overlay: rgba(32, 39, 46, 0.5);

   /* FONTS
      ----------------------------- */
   --font-main: "Satoshi", sans-serif;
   --font-titles: "Bebas Neue", "Arial Narrow", sans-serif;
}

/* BASE
   ----------------------------- */

html {
   background-color: var(--off-white);
   scrollbar-gutter: stable;
}

html.nav-locked {
   overflow: hidden;
   overscroll-behavior: none;
}

body {
   font-size: 1rem;
   line-height: 1.33;
   font-family: var(--font-main);
   font-weight: 400;
   color: var(--blue-darkest);
   background-color: var(--off-white);
}

sup {
   font-size: 0.7em;
   font-style: normal;
   vertical-align: super;
   color: inherit;
}



/* COOKIEYES
   ----------------------------- */

body .cky-overlay,
body .cky-btn-revisit-wrapper,
body .cky-consent-container,
body .cky-modal {
   z-index: 120 !important;
}

body .cky-btn-revisit-wrapper {
	background-color: var(--blue) !important;
}

.cky-revisit-bottom-left:hover::before,
.cky-revisit-bottom-left:hover::after {
	display: none !important;
}

body [data-cky-tag="powered-by"],
body [data-cky-tag="detail-powered-by"] {
   display: none !important;
}

body .cky-consent-bar > div:has(> [data-cky-tag="powered-by"]),
body .cky-footer-wrapper > div:has(> [data-cky-tag="detail-powered-by"]) {
   padding: 0 !important;
}

body .cky-accordion-header .cky-always-active {
   color: var(--blue) !important;
}

body .cky-consent-container {
   width: 28.125rem;
}

body .cky-box-bottom-right {
   bottom: 1.25rem;
   right: 1.25rem;
}

body .cky-consent-bar .cky-notice-content-wrapper {
   padding: 1.5625rem;
}

body .cky-notice .cky-title {
   margin: 0 0 0.3125rem 0;
   font-family: var(--font-main);
   font-weight: 500;
   color: var(--blue-darkest) !important;
}

body .cky-notice-des * {
   font-size: var(--small-text-size);
   line-height: 1.35;
   color: var(--blue-darkest) !important;
}

body button.cky-show-desc-btn {
   color: var(--blue-darkest) !important;
}

body .cky-btn {
   font-family: var(--font-main);
   font-size: var(--btn-size);
   font-weight: 500;
   text-transform: none;
   line-height: 1;
   height: 2.5rem;
   padding: 0 1rem;
   border-radius: 6.25rem;
   border: 1px solid var(--dark-border) !important;
   background: transparent !important;
   color: var(--blue-darkest) !important;
   cursor: pointer;
   transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

body .cky-btn.cky-btn-accept-all,
body .cky-btn.cky-btn-accept {
   background: var(--blue) !important;
   border-color: var(--blue) !important;
   color: var(--soft-white) !important;
}

body .cky-notice-btn-wrapper {
   display: flex;
   flex-wrap: wrap;
   gap: 0.5rem;
   margin-top: 1.125rem;
}

body .cky-consent-container .cky-consent-bar {
   border: 0;
   box-shadow: 0 0 10px rgba(64, 78, 92, 0.12);
   border-radius: 0.75rem;
}

@media (hover: hover) and (pointer: fine) {

   body .cky-btn:hover {
      background: var(--blue-dark) !important;
      color: var(--soft-white) !important;
      border-color: var(--blue-dark) !important;
      opacity: 1;
   }
}

@media (max-width: 767px) {

   body .cky-consent-container {
      width: calc(100% - 2.5rem);
   }

   body .cky-box-bottom-right {
      right: 1.25rem;
      left: 1.25rem;
   }

   body .cky-consent-bar .cky-notice-content-wrapper {
      padding: 1.25rem;
      text-align: center;
   }
}

@media (max-width: 479px) {

   body .cky-consent-container {
      width: 100%;
   }

   body .cky-consent-container .cky-consent-bar {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
   }

   body .cky-box-bottom-right {
      left: 0;
      right: 0;
      bottom: 0;
   }

   body .cky-consent-container .cky-consent-bar .cky-notice-content-wrapper {
      padding: 1.125rem 0;
   }

   body .cky-notice-des {
      max-height: none;
      overflow-y: auto;
   }

   body .cky-custom-brand-logo-wrapper,
   body .cky-notice .cky-title,
   body .cky-notice-des,
   body .cky-notice-btn-wrapper {
      padding: 0 1.25rem !important;
   }

   body .cky-notice-btn-wrapper {
      gap: 0.3125rem;
   }

   body .cky-notice .cky-title {
      margin: -0.3125rem 0 0.3125rem 0;
   }
}



/* TYPOGRAPHY
   ----------------------------- */

h1,
h2,
h3,
h4,
h5,
h6,
p {
   word-wrap: break-word;
   overflow-wrap: break-word;
   word-break: break-word;
}


.impact {
   font-family: var(--font-titles);
   font-size: var(--impact-size);
   line-height: 0.95;
   font-weight: 400;
   letter-spacing: 0.015em;
   text-transform: uppercase;
   color: var(--blue);
}

h1, .h1 {
   font-family: var(--font-titles);
   font-size: var(--h1-size);
   line-height: 0.98;
   font-weight: 400;
   letter-spacing: 0.015em;
   text-transform: uppercase;
   color: var(--blue);
}

h2, .h2 {
   font-family: var(--font-titles);
   font-size: var(--h2-size);
   line-height: 1.02;
   font-weight: 400;
   letter-spacing: 0.015em;
   text-transform: uppercase;
   color: var(--blue);
}

h3, .h3 {
   font-family: var(--font-titles);
   font-size: var(--h3-size);
   line-height: 1.05;
   font-weight: 400;
   letter-spacing: 0.02em;
   text-transform: uppercase;
   color: var(--blue);
}

h4, .h4 {
   font-family: var(--font-main);
   font-size: var(--h4-size);
   line-height: 1.16;
   font-weight: 500;
   color: var(--blue-darkest);
}

h5, .h5 {
   font-family: var(--font-main);
   font-size: var(--h5-size);
   line-height: 1.4;
   font-weight: 500;
   color: var(--blue-darkest);
}

h6, .h6 {
   font-family: var(--font-main);
   font-size: var(--h6-size);
   line-height: 1.375;
   font-weight: 500;
   color: var(--blue-darkest);
}

p {
   font-size: var(--paragraph-size);
   line-height: 1.4;
   font-family: var(--font-main);
   font-weight: 400;
}

strong, b {
   font-weight: 700;
}

.tagline {
   font-family: var(--font-main);
   font-size: clamp(0.75rem, calc(0.732rem + 0.089vw), 0.8125rem);
   font-weight: 400;
   line-height: 1;
   letter-spacing: 0.06em;
   text-transform: uppercase;
}

.small-text {
   font-family: var(--font-main);
   font-size: var(--small-text-size);
   line-height: 1.3;
   font-weight: 400;
}


/* ACCESSIBILITY
   ----------------------------- */

.skip-link {
   position: absolute;
   left: -9999px;
   top: auto;
   width: 1px;
   height: 1px;
   overflow: hidden;
   z-index: 9999;
   padding: 0.75rem 1.5rem;
   background: var(--blue);
   color: var(--soft-white);
   font-size: var(--small-text-size);
   text-decoration: none;
   border-radius: 6.25rem;
}

.skip-link:focus {
   position: fixed;
   top: 0.5rem;
   left: 0.5rem;
   width: auto;
   height: auto;
   overflow: visible;
}

:focus-visible:not(.btn-swap) {
   outline: 2px solid var(--blue);
   outline-offset: 2px;
   box-shadow: 0 0 0 2px var(--white);
}

#main-content:focus {
   outline: none;
}


/* GENERAL
   ----------------------------- */

a {
   transition: color 0.2s ease;
}

a[href^="tel"] {
   color: inherit;
   text-decoration: none;
}

.paragraph {
   font-size: var(--paragraph-size);
   line-height: 1.55;
}

.paragraph p {
   padding-bottom: 0.9375rem;
}

.paragraph p:last-child {
   padding-bottom: 0;
}

.image-wrap {
   overflow: hidden;
}

.image-wrap .image {
   display: block;
   width: 100%;
   height: 100%;
   object-fit: cover;
}

.c-wrap {
   max-width: var(--size-wrap);
   padding: 0 var(--container-padding);
   margin: 0 auto;
   width: 100%;
}

img {
   width: 100%;
   max-width: 100%;
   display: block;
   height: auto;
}


/* 404
   ----------------------------- */

body.error404 {
   display: flex;
   flex-direction: column;
   min-height: 100svh;
}

body.error404 #main-content {
   flex: 1 0 auto;
   display: flex;
   flex-direction: column;
   justify-content: center;
}

body.error404 footer.footer {
   flex-shrink: 0;
}

section.error-404 {
   padding: var(--row-padding-l) 0;
}

section.error-404 .info {
   display: flex;
   flex-direction: column;
   align-items: center;
   text-align: center;
   gap: 1.5rem;
   max-width: 40rem;
   margin: 0 auto;
}

section.error-404 h1 {
   max-width: 10em;
}


/* UNDERLINE LINKS
   ----------------------------- */

.underline-link {
   color: inherit;
   font-size: 1em;
   line-height: 1.25;
}

[data-underline-link] {
   text-decoration: none;
   position: relative;
}

[data-underline-link]::before,
[data-underline-link="alt"]::before,
[data-underline-link="alt"]::after {
   content: "";
   position: absolute;
   bottom: -0.0625em;
   left: 0;
   width: 100%;
   height: 0.0625em;
   background-color: currentColor;
   transition: transform 0.735s cubic-bezier(0.625, 0.05, 0, 1);
   transform-origin: right;
   transform: scaleX(0) rotate(0.001deg);
}

[data-underline-link="alt"]::before {
   transform-origin: left;
   transform: scaleX(1) rotate(0.001deg);
   transition-delay: 0.3s;
}

[data-underline-link="alt"]::after {
   transform-origin: right;
   transform: scaleX(0) rotate(0.001deg);
   transition-delay: 0s;
}

@media (hover: hover) and (pointer: fine) {
   [data-hover]:hover [data-underline-link]::before,
   [data-underline-link]:hover::before {
      transform-origin: left;
      transform: scaleX(1) rotate(0.001deg);
   }

   [data-hover]:hover [data-underline-link="alt"]::before,
   [data-underline-link="alt"]:hover::before {
      transform-origin: right;
      transform: scaleX(0) rotate(0.001deg);
      transition-delay: 0s;
   }

   [data-hover]:hover [data-underline-link="alt"]::after,
   [data-underline-link="alt"]:hover::after {
      transform-origin: left;
      transform: scaleX(1) rotate(0.001deg);
      transition-delay: 0.3s;
   }
}


/* HIGHLIGHT MARKER REVEAL
   ----------------------------- */

[data-highlight-marker-reveal] {
   visibility: hidden;
}

[data-highlight-marker-reveal] .highlight-marker-line {
   width: auto;
   display: inline-block !important;
   margin: -0.055em 0px;
}

.highlight-marker-bar {
   position: absolute;
   inset: -0.12em 0px;
   z-index: 1;
   pointer-events: none;
}


/* CF7 FORMS
   ----------------------------- */

.wpcf7-form {
   display: flex;
   justify-content: space-between;
   flex-wrap: wrap;
}

.wpcf7-form label,
.wpcf7-form legend {
   font-size: 0.6875rem;
   font-family: var(--font-main);
   text-transform: uppercase;
   letter-spacing: 0.5px;
   color: var(--blue-dark);
   line-height: 1.15;
}

.wpcf7-form fieldset {
   border: none;
   padding: 0;
}

.wpcf7-form fieldset.control-group {
   margin-top: 1rem;
}

.wpcf7-form .wpcf7-checkbox {
   display: flex;
   flex-wrap: wrap;
   gap: 0.375rem 1.125rem;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item {
   margin: 0;
}

.wpcf7-form .wpcf7-checkbox label {
   text-transform: none;
   letter-spacing: 0;
   font-size: var(--small-text-size);
   color: var(--blue-darkest);
   display: flex;
   align-items: center;
   gap: 0.5rem;
   padding-block: 0.25rem;
   line-height: 1.2;
   cursor: pointer;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"] {
   appearance: none;
   -webkit-appearance: none;
   width: 1.125rem;
   height: 1.125rem;
   background: var(--field-bg);
   border: 1px solid var(--field-border);
   border-radius: 0.125rem;
   margin: 0;
   flex-shrink: 0;
   cursor: pointer;
   transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wpcf7-form .wpcf7-checkbox input[type="checkbox"]:checked {
   background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.8 9 10 3.5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 0.625rem no-repeat;
   border-color: var(--blue);
}

.wpcf7-form .wpcf7-form-control-wrap {
   display: block;
   margin-top: 0.375rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
   width: 100%;
   font-family: var(--font-main);
   font-size: var(--small-text-size);
   font-weight: 400;
   line-height: 1;
   color: var(--blue-darkest);
   background: var(--field-bg);
   padding: 0.875rem 1.1875rem;
   border: 1px solid var(--field-border);
   border-radius: 0.25rem;
   transition: border-color 0.2s ease;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
   outline: none;
   box-shadow: none;
   border-color: var(--blue);
}

html[data-input="keyboard"] .wpcf7-form input:focus-visible,
html[data-input="keyboard"] .wpcf7-form textarea:focus-visible {
   outline: 2px solid var(--blue-darkest);
   outline-offset: 2px;
   box-shadow: 0 0 0 2px var(--white);
}

.wpcf7-form textarea {
   height: 11.25rem;
   line-height: 1.4;
   resize: none;
}

.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
   color: var(--blue-dark);
   opacity: 0.7;
}

.wpcf7-form .control-group {
   position: relative;
   width: 100%;
   margin: 0.5rem 0;
   user-select: none;
}

.wpcf7-form .control-group.mid {
   width: calc(50% - 0.5rem);
}

.wpcf7-form .submit-wrap {
   width: 100%;
   margin-top: 1.25rem;
   display: flex;
   align-items: center;
   gap: 1.25rem;
   justify-content: flex-start;
}

.wpcf7-form .submit-wrap .btn-swap {
   align-self: flex-end;
   order: 1;
}

.wpcf7-form .submit-wrap .wpcf7-spinner {
   order: 2;
}

.wpcf7-form .submit-wrap input[type="submit"] {
   display: none;
}

.wpcf7-form .note {
   width: 100%;
   font-size: var(--small-text-size);
   opacity: 0.5;
   margin: 0;
   margin-top: 0.75rem;
}

.wpcf7-form .wpcf7-not-valid-tip {
   display: none;
}

.wpcf7-form input[type="text"].wpcf7-not-valid,
.wpcf7-form input[type="email"].wpcf7-not-valid,
.wpcf7-form input[type="tel"].wpcf7-not-valid,
.wpcf7-form textarea.wpcf7-not-valid {
   border-color: var(--red) !important;
}

.wpcf7-form .wpcf7-response-output {
   font-size: var(--small-text-size);
   line-height: 1.4;
   background: transparent;
   border: 0 !important;
   padding: 2.5rem 0 0 !important;
   margin: 0 auto !important;
   width: 100%;
   text-align: center;
}

.wpcf7-spinner::before {
   display: none;
}

.wpcf7-spinner {
   margin: 0 !important;
   background-image: url('images/loader.svg') !important;
   background-color: transparent !important;
   background-size: contain;
   background-repeat: no-repeat;
   width: 1.5rem !important;
   height: 1.5rem !important;
   display: block;
   flex-shrink: 0;
}

@media (max-width: 1024px) {
   .wpcf7-form input[type="text"],
   .wpcf7-form input[type="email"],
   .wpcf7-form input[type="tel"],
   .wpcf7-form textarea {
      padding: 0.75rem 1rem;
   }

   .wpcf7-form textarea {
      height: 10rem;
   }
}

@media (max-width: 640px) {
   .wpcf7-form .control-group {
      margin: 0.25rem 0;
   }

   .wpcf7-form .control-group.mid {
      width: 100%;
   }
}

@media (max-width: 479px) {}


/* FOOTER
   ----------------------------- */

footer.footer {
   position: relative;
   z-index: 2;
   background-color: var(--blue-darkest);
   color: var(--soft-white);
}

footer.footer .main {
   display: flex;
   justify-content: space-between;
   align-items: center;
   gap: 2.5rem;
   padding-top: var(--row-padding-xs);
   padding-bottom: var(--row-padding-xs);
}

footer.footer .brand {
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: clamp(1rem, calc(0.821rem + 0.893vw), 1.625rem); /* 16 → 26px */
}

footer.footer .brand .logo {
   margin: 0;
}

footer.footer .brand .logo a {
   display: block;
}

footer.footer .brand .logo svg,
footer.footer .brand .logo img {
   display: block;
   width: auto;
   height: clamp(2rem, calc(1.857rem + 0.714vw), 2.5rem); /* 32 → 40px */
}

footer.footer .brand .logo svg,
footer.footer .brand .logo svg [fill="#010202"] {
   fill: var(--soft-white);
}

footer.footer .menu-links {
   list-style: none;
   display: flex;
   flex-wrap: wrap;
   justify-content: flex-end;
   text-align: right;
   gap: 0.75rem 1.125rem;
   margin: 0;
   padding: 0;
}

footer.footer .menu-links a {
   color: inherit;
   font-size: clamp(0.875rem, calc(0.857rem + 0.089vw), 0.9375rem);
   line-height: 1.2;
}

footer.footer .sub {
   display: flex;
   justify-content: space-between;
   align-items: center;
   gap: 0.75rem 3.75rem;
   font-size: clamp(0.75rem, calc(0.732rem + 0.089vw), 0.8125rem);
   line-height: 1.3;
   border-top: 1px solid var(--light-border);
   padding-top: 1.625rem;
   padding-bottom: 1.625rem;
}

footer.footer .credits {
   text-align: right;
}

footer.footer .sub a,
footer.footer .sub button {
   color: inherit;
   line-height: 1.2;
}

footer.footer .sub button {
   background: none;
   border: none;
   padding-inline: 0;
   font: inherit;
   cursor: pointer;
}

@media (max-width: 767px) {
   footer.footer .main {
      flex-direction: column;
      align-items: center;
      gap: 1.5rem;
   }

   footer.footer .brand {
      align-items: center;
      text-align: center;
   }

   footer.footer .menu-links {
      justify-content: center;
      text-align: center;
   }

   footer.footer .sub {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 0.5rem;
   }

   footer.footer .credits {
      text-align: center;
   }
}


/* BUTTON SWAP
   ----------------------------- */

:root {
  --btn-swap-color: var(--soft-white);
  --btn-swap-color-background: var(--blue);
  --btn-swap-hover-color: var(--soft-white);
  --btn-swap-hover-color-background: var(--blue-dark);
  --btn-swap-color-focus: var(--blue-darkest);
  --btn-swap-border-radius: 2.5em;
  --btn-swap-hover-border-radius: 2.5em;
  --btn-swap-origin: center top;
  --btn-swap-hover-origin: center bottom;
  --btn-swap-padding: var(--btn-padding);
  --btn-swap-focus-inset: -0.125em;
  --btn-swap-click-scale: 0.955 0.925;
  --btn-swap-ease-hover: cubic-bezier(0.32, 0.72, 0, 1);
  --btn-swap-ease-click: cubic-bezier(0.4, 0, 0.2, 1);
  --btn-swap-ease-focus: cubic-bezier(0.32, 0.72, 0, 1);
}

.btn-swap {
  font-family: var(--font-main);
  font-size: var(--btn-size);
  font-weight: 500;
  -webkit-user-select: none;
  user-select: none;
  background-color: #0000;
  outline-style: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  text-decoration: none;
  display: inline-grid;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: scale 0.15s var(--btn-swap-ease-click);
}

.btn-swap::after {
  content: '';
  display: block;
  position: absolute;
  inset: var(--btn-swap-focus-inset);
  border-radius: var(--btn-swap-hover-border-radius);
  transition: box-shadow 0.3s var(--btn-swap-ease-focus);
  pointer-events: none;
  z-index: 1;
}

.btn-swap:is(:focus-visible)::after {
  box-shadow: 0 0 0 0.125em var(--white), 0 0 0 0.25em var(--btn-swap-color-focus);
}

.btn-swap:active {
  scale: var(--btn-swap-click-scale);
}

.btn-swap .inner {
  pointer-events: none;
  color: var(--btn-swap-color);
  background-color: var(--btn-swap-color-background);
  padding: var(--btn-swap-padding);
  border-radius: var(--btn-swap-border-radius);
  z-index: 1;
  transform-origin: var(--btn-swap-origin);
  grid-area: 1 / 1;
  transition: transform 0.45s var(--btn-swap-ease-hover), color 0.15s 0.075s ease-out;
  transform: scale(1) translateZ(0);
}

.btn-swap .inner .text {
  transition: opacity 0.15s 0.075s ease-out;
}

.btn-swap .inner-hover {
  pointer-events: none;
  background-color: var(--btn-swap-hover-color-background);
  color: var(--btn-swap-hover-color);
  border-radius: var(--btn-swap-hover-border-radius);
  transform-origin: var(--btn-swap-hover-origin);
  padding: var(--btn-swap-padding);
  grid-area: 1 / 1;
  transition: transform 0.45s var(--btn-swap-ease-hover);
  transform: scale(0) translateZ(0);
}

.btn-swap .inner-hover .text {
  transition: opacity 0.15s 0.05s ease-out;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .btn-swap::after {
    border-radius: var(--btn-swap-border-radius);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn-swap:is(:hover, :focus-visible) .inner,
  [data-hover]:is(:hover, :focus-visible) .btn-swap .inner {
    transition: transform 0.5s 0.05s var(--btn-swap-ease-hover);
    transform: scale(0) translateZ(0);
  }

  .btn-swap:is(:hover, :focus-visible) .inner .text,
  [data-hover]:is(:hover, :focus-visible) .btn-swap .inner .text {
    transition: opacity 0.15s 0.05s ease-out;
    opacity: 0;
  }

  .btn-swap:is(:hover, :focus-visible) .inner-hover,
  [data-hover]:is(:hover, :focus-visible) .btn-swap .inner-hover {
    transition: transform 0.5s 0.05s var(--btn-swap-ease-hover);
    transform: scale(1) translateZ(0);
  }

  .btn-swap:is(:hover, :focus-visible) .inner-hover .text,
  [data-hover]:is(:hover, :focus-visible) .btn-swap .inner-hover .text {
    transition: opacity 0.15s 0.075s ease-out;
    opacity: 1;
  }
}

/* Glass variant */

.btn-swap.is-glass {
  --btn-swap-color: var(--soft-white);
  --btn-swap-hover-color: var(--soft-white);
  --btn-swap-color-background: var(--blue);
  --btn-swap-hover-color-background: var(--blue-dark);
  --btn-swap-color-focus: var(--white);
  --btn-swap-padding: 1em 1.571em;
  font-family: var(--font-main);
  font-size: clamp(0.75rem, calc(0.684rem + 0.213vw), 0.875rem);
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn-swap.is-glass:focus-visible:not(:hover) .inner {
    transition: none;
    transform: scale(1) translateZ(0);
  }

  .btn-swap.is-glass:focus-visible:not(:hover) .inner .text {
    transition: none;
    opacity: 1;
  }

  .btn-swap.is-glass:focus-visible:not(:hover) .inner-hover {
    transition: none;
    transform: scale(0) translateZ(0);
  }

  .btn-swap.is-glass:focus-visible:not(:hover) .inner-hover .text {
    transition: none;
    opacity: 0;
  }
}

html.nav-locked .btn-swap.is-glass,
html.nav-locked .btn-swap.is-glass .inner,
html.nav-locked .btn-swap.is-glass .inner-hover,
html.nav-locked .btn-swap.is-glass .inner .text,
html.nav-locked .btn-swap.is-glass .inner-hover .text {
   transition: none;
}

/* Icon variant */

.btn-swap.is-icon {
  --btn-swap-color: var(--blue-darkest);
  --btn-swap-color-background: var(--white);
  --btn-swap-hover-color: var(--soft-white);
  --btn-swap-hover-color-background: var(--blue-darkest);
  --btn-swap-color-focus: var(--blue-darkest);
  --btn-swap-border-radius: 50%;
  --btn-swap-hover-border-radius: 50%;
  --btn-swap-padding: 0;
}

.btn-swap.is-icon .inner,
.btn-swap.is-icon .inner-hover {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-swap.is-icon .text {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-swap.is-icon svg {
  display: block;
  width: 0.8125rem;
  height: 0.8125rem;
}
