/*
 * Site chrome (docs/INFRAESTRUCTURA.md §6.1): the one header and footer, the skip link and the 404
 * view. Always the last stylesheet. Every selector targets .sc-* classes and no page stylesheet
 * touches them.
 *
 * Header and footer of Jose's approved home design (docs/design/package/inmercost-web-daci-2026-11-04,
 * no top bar): the design's inline styles, moved here as .sc-* classes with the same values. The
 * chrome sets its own font, size and colours, because on pages other than the home no design wrapper
 * gives them. Links repeat their colour on :hover so a page rule such as a:hover never recolours them
 * (in the design, their inline colour always won).
 */

/*
 * Atkinson Hyperlegible Next (SIL Open Font License,
 * docs/design/package/inmercost-web-daci-2026-11-04/inmercost-web/fuentes): the @font-face rules of the
 * approved design's css/estilos.css with the paths of /assets/fonts. Here, because this is the one
 * stylesheet every page links and every page uses the font.
 */
@font-face{font-family:'Atkinson Hyperlegible Next';font-style:normal;font-weight:200 800;font-display:swap;src:url('/assets/fonts/atkinson-next-latin-ext-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Atkinson Hyperlegible Next';font-style:normal;font-weight:200 800;font-display:swap;src:url('/assets/fonts/atkinson-next-latin-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Atkinson Hyperlegible Next';font-style:italic;font-weight:200 800;font-display:swap;src:url('/assets/fonts/atkinson-next-latin-ext-cursiva.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Atkinson Hyperlegible Next';font-style:italic;font-weight:200 800;font-display:swap;src:url('/assets/fonts/atkinson-next-latin-cursiva.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
/*
 * Atkinson Hyperlegible Next Fallback (§6.6): Arial resized to the widths of Atkinson Hyperlegible Next,
 * so the swap to the web font does not move the layout (CLS). Listed right after
 * 'Atkinson Hyperlegible Next' in every font stack. The web font is variable (weights 200 to 800) and
 * grows wider with the weight, so each weight the site uses has its own face: size-adjust is the ratio
 * of the rendered widths (Atkinson / Arial, Google Chrome, 2026-11-04) of the strings that weight sets
 * above the fold (400 the hero text, 500 the menu, 600 the hero badge and credentials, 700 the buttons,
 * 800 the <h1>; italic, the body text). ascent-override and descent-override are Atkinson's (984 and
 * 316 of 1000 units, no line gap) divided by size-adjust, as next/font computes them. The unicode-range
 * is the web font's (its two subsets): a character the web font does not cover (→, ★) skips this face
 * and is drawn by the next fonts of the stack, as in the design.
 */
@font-face{font-family:'Atkinson Hyperlegible Next Fallback';font-style:normal;font-weight:1 450;src:local('Arial'),local('ArialMT');size-adjust:97.00%;ascent-override:101.44%;descent-override:32.58%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Atkinson Hyperlegible Next Fallback';font-style:normal;font-weight:451 550;src:local('Arial'),local('ArialMT');size-adjust:100.75%;ascent-override:97.67%;descent-override:31.36%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Atkinson Hyperlegible Next Fallback';font-style:normal;font-weight:551 650;src:local('Arial Bold'),local('Arial-BoldMT');size-adjust:99.13%;ascent-override:99.26%;descent-override:31.88%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Atkinson Hyperlegible Next Fallback';font-style:normal;font-weight:651 750;src:local('Arial Bold'),local('Arial-BoldMT');size-adjust:98.68%;ascent-override:99.72%;descent-override:32.02%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Atkinson Hyperlegible Next Fallback';font-style:normal;font-weight:751 1000;src:local('Arial Bold'),local('Arial-BoldMT');size-adjust:101.63%;ascent-override:96.82%;descent-override:31.09%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Atkinson Hyperlegible Next Fallback';font-style:italic;font-weight:1 1000;src:local('Arial Italic'),local('Arial-ItalicMT');size-adjust:98.46%;ascent-override:99.94%;descent-override:32.09%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD,U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
.sc-skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sc-skip:focus {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #1b3d14;
  outline: 2px solid #1b3d14;
}

.sc-header,
.sc-footer {
  font-family: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible Next Fallback', 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

.sc-header a,
.sc-footer a {
  text-decoration: none;
}

/* Header: logo, main menu and the header button. */
.sc-header {
  background: #fff;
  border-bottom: 1px solid #d3e5cb;
  color: #1b3d14;
}

.sc-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}

.sc-brand {
  display: flex;
  align-items: center;
}

.sc-brand__logo {
  display: block;
  height: 60px;
  width: auto;
}

.sc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  font-size: 16px;
  font-weight: 500;
}

.sc-nav__link,
.sc-nav__link:hover {
  color: #1b3d14;
}

.sc-cta,
.sc-cta:hover {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 20px;
  background: #1b3d14;
  color: #eef6ea;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}

/* «Valora tu inmueble en 3 minutos» (APPROVALS.md 2026-11-18) is longer than the old button: on a wide
   screen the menu links sit a little closer, so the logo, the menu and the button keep one line. */
@media (min-width: 1100px) {
  .sc-header__inner {
    column-gap: 20px;
  }

  .sc-nav {
    column-gap: 18px;
  }

  .sc-cta,
  .sc-cta:hover {
    padding: 0 18px;
  }
}

/* Footer. */
.sc-footer {
  background: #10260c;
  color: #c6ddbc;
}

.sc-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px clamp(20px, 4vw, 48px) 32px;
}

.sc-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 32px;
}

.sc-footer__about {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sc-footer__logo {
  display: block;
  height: 64px;
  width: auto;
}

.sc-footer__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.sc-footer__motto {
  font-style: italic;
  color: #eef6ea;
}

.sc-footer__contact,
.sc-footer__contact:hover {
  color: #eef6ea;
  font-size: 16px;
}

.sc-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.sc-footer__social-link,
.sc-footer__social-link:hover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(238, 246, 234, 0.24);
  border-radius: 999px;
  color: #eef6ea;
}

.sc-footer__social-link:hover {
  border-color: #8cc474;
  color: #8cc474;
}

.sc-footer__registration {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* "nº 1736" never breaks across two lines. */
.sc-nowrap {
  white-space: nowrap;
}

.sc-footer__menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
}

.sc-footer__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #8cc474;
}

.sc-footer__link,
.sc-footer__link:hover {
  color: #c6ddbc;
}

.sc-footer__zones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.sc-footer__bottom {
  margin-top: 44px;
  padding-top: 20px;
  /* Room for the floating WhatsApp link (56 px high, 24 px from the bottom): at the end of the page it
     never covers the legal links. */
  padding-bottom: 56px;
  border-top: 1px solid rgba(238, 246, 234, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: 14px;
}

.sc-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* A focused element is never scrolled under the floating WhatsApp link (WCAG 2.4.11). */
html:has(.sc-float) {
  scroll-padding-bottom: 96px;
}

/* Floating WhatsApp link (inside the footer, fixed to the corner of the window). */
.sc-float,
.sc-float:hover {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  max-width: calc(100vw - 48px);
  padding: 0 22px 0 4px;
  white-space: nowrap;
  background: #4c9d33;
  color: #10260c;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(16, 38, 12, 0.3);
  font-size: 17px;
  font-weight: 700;
}

/* «Configurar cookies» in the footer: a button that looks like the legal links; cookies.js shows it. */
.sc-cookies-abrir {
  padding: 0;
  border: 0;
  background: none;
  color: #c6ddbc;
  font: inherit;
  cursor: pointer;
}

.sc-cookies-abrir[hidden] {
  display: none;
}

/* Cookie banner (APPROVALS.md 2026-11-18): bottom left, above the page; «Rechazar» and «Aceptar» weigh the same. */
.sc-cookies {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 30;
  box-sizing: border-box;
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  background: #fff;
  color: #1b3d14;
  border: 1px solid #d3e5cb;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(10, 30, 8, 0.25);
  font-size: 15px;
  line-height: 1.45;
}

.sc-cookies[hidden],
.sc-cookies__panel[hidden] {
  display: none;
}

.sc-cookies__t {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.sc-cookies__txt {
  margin: 0;
}

.sc-cookies__txt a {
  color: #2f6b20;
  font-weight: 700;
  text-decoration: underline;
}

.sc-cookies__panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d3e5cb;
}

.sc-cookies__opcion {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sc-cookies__opcion input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: #2f6b20;
}

.sc-cookies__botones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sc-cookies__btn {
  flex: 1 1 0;
  min-height: 46px;
  padding: 0 18px;
  border: 2px solid #1b3d14;
  border-radius: 999px;
  background: #1b3d14;
  color: #eef6ea;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sc-cookies__btn:hover {
  background: #2f6b20;
  border-color: #2f6b20;
}

.sc-cookies__config {
  flex-basis: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #2f6b20;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.sc-cookies button:focus-visible,
.sc-cookies a:focus-visible,
.sc-cookies input:focus-visible,
.sc-cookies-abrir:focus-visible {
  outline: 3px solid #4c9d33;
  outline-offset: 2px;
}

/* Where the banner could meet the floating WhatsApp link, the link waits until the choice is made. */
@media (max-width: 760px) {
  html.sc-cookies-abierto .sc-float {
    visibility: hidden;
  }
}

/* Naiara's face on the floating link (2026-11-15): a 48 px circle with a white ring and a small WhatsApp badge. */
.sc-float__cara {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
}

.sc-float__cara img {
  display: block;
  width: 48px;
  height: 48px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
}

.sc-float__wa {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid #4c9d33;
  border-radius: 50%;
  background: #eef6ea;
  color: #10260c;
}

.sc-float__wa svg {
  width: 13px;
  height: 13px;
}

/* Below 340 px the text does not fit next to the face: only the face shows (font-size 0 hides the text, which
   screen readers still read), so the link never wraps nor reaches the left edge. */
@media (max-width: 339px) {
  .sc-float,
  .sc-float:hover {
    gap: 0;
    padding: 0 4px;
    font-size: 0;
  }
}

/* Read by screen readers only: who answers and where. */
.sc-float__oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/*
 * The header's «Valora tu casa gratis» and the floating WhatsApp link keep the browser's own focus ring on
 * every page, as on the home, which loads no base.css (docs/design/APPROVALS.md 2026-11-05). On the other
 * pages base.css draws the ring in the element's own text colour (`2px solid currentColor`), which on these
 * two buttons is their background's neighbour: #eef6ea over the white header (1.1:1) and #10260c over the
 * footer (1:1), so the focus could not be seen (WCAG 2.4.7).
 */
.sc-cta:focus-visible,
.sc-float:focus-visible {
  outline: revert;
  outline-offset: revert;
}

/*
 * The home keeps the floating link off «Ver cuánto vale» (public/assets/js/inicio.js, docs/design/APPROVALS.md
 * 2026-11-05). While the link would cover the button the script adds .sc-float--hidden: at once not visible,
 * not clickable, not focusable and out of the accessibility tree. It marks its first decision with
 * .sc-float--placed and only then adds .sc-float--fade, so the first decision never fades. The fade (0.2 s,
 * none with reduced motion) only runs when the link shows again: hiding is instant, so the link is never
 * drawn over the button while it goes. Until the first decision a page may keep the link waiting with
 * --sc-float-wait, an animation that hides it (the home sets it in inicio.css). No other page sets the
 * property or the classes, so the link stays as it was everywhere else.
 */
.sc-float:not(.sc-float--placed) {
  animation: var(--sc-float-wait, none);
}

.sc-float--hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.sc-float--fade {
  transition:
    opacity 0.2s,
    visibility 0.2s;
}

.sc-float--fade.sc-float--hidden {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .sc-float--fade {
    transition: none;
  }
}

/* 404 view: the site font and colours of the design. */
.sc-notfound {
  max-width: 1240px;
  min-height: 50vh;
  margin: 0 auto;
  padding: 3rem clamp(20px, 4vw, 48px);
  font-family: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible Next Fallback', 'Helvetica Neue', Arial,
    sans-serif;
  color: #1b3d14;
}

.sc-notfound a {
  color: #3a7a26;
}
