@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --color-background: #0F100D;
  --color-background-2: #F3F1EB;
  --color-background-3: #E7E4DC;
  --color-background-error: rgba(224, 51, 59, 0.1);
  --color-background-success: rgba(30, 158, 90, 0.12);
  --color-main-1: #0F100D;
  --color-main-2: #F3F1EB;
  --color-text: #F3F1EB;
  --color-text-dark: #0F100D;
  --color-muted: #A8A79F;
  --color-muted-2: #C9C7BF;
  --color-muted-dark: #4A4B45;
  --color-line-dark: #DAD7CE;
  --color-link: #F3F1EB;
  --color-label: #A8A79F;
  --color-error: #E0333B;
  --color-success: #1E9E5A;

  /* Brand: one colour per service */
  --color-solar: #1E9E5A;
  --color-gas: #F4C91B;
  --color-air: #7CC6EE;
  --color-water: #2346B3;
  --color-boiler: #E0333B;

  --font-main: 'Host Grotesk', sans-serif;
  --font-title: 'Host Grotesk', sans-serif;
  --font-accent: 'Instrument Serif', serif;
  --font-mono: 'Geist Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-style: normal;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

ul, ol {
  padding-left: 30px;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--color-gas);
  color: var(--color-text-dark);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  color: inherit;
  text-wrap: balance;
}

/* The universal reset beats inheritance, so accents inside headings need
   the accent face set explicitly (CONVENTIONS §11 gotcha). */
h1 em, h2 em, h3 em, h4 em, h5 em, h6 em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 90px;
  @media (max-width: 1024px) {
    font-size: 60px;
  }
}

h2 {
  font-size: 60px;
  @media (max-width: 1024px) {
    font-size: 48px;
  }
}

h3 {
  font-size: 48px;
  @media (max-width: 1024px) {
    font-size: 36px;
  }
}

h4 {
  font-size: 36px;
  @media (max-width: 1024px) {
    font-size: 24px;
  }
}

h5 {
  font-size: 24px;
  @media (max-width: 1024px) {
    font-size: 18px;
  }
}

h6 {
  font-size: 18px;
  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

p, span, li {
  font-size: 16px;
  font-weight: 400;
  line-height: 150%;
  color: inherit;
}

p {
  text-wrap: pretty;
}

/* Small tracked mono label - eyebrows, tags, numbering */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   SPACING SYSTEM
   Halves at 1400px - the container's own edge (1340 + 30 + 30).
   ========================================================================== */

.mt-120 {
  margin-top: 120px;
  @media (max-width: 1400px) {
    margin-top: 60px;
  }
}

.mt-60 {
  margin-top: 60px;
  @media (max-width: 1400px) {
    margin-top: 30px;
  }
}

.mb-120 {
  margin-bottom: 120px;
  @media (max-width: 1400px) {
    margin-bottom: 60px;
  }
}

.mb-60 {
  margin-bottom: 60px;
  @media (max-width: 1400px) {
    margin-bottom: 30px;
  }
}

/* Standard gap between a section's title block and the content after it */
.mb-36 {
  margin-bottom: 36px;
  @media (max-width: 1400px) {
    margin-bottom: 18px;
  }
}

.pt-120 {
  padding-top: 120px;
  @media (max-width: 1400px) {
    padding-top: 60px;
  }
}

.pt-60 {
  padding-top: 60px;
  @media (max-width: 1400px) {
    padding-top: 30px;
  }
}

.pb-120 {
  padding-bottom: 120px;
  @media (max-width: 1400px) {
    padding-bottom: 60px;
  }
}

.pb-60 {
  padding-bottom: 60px;
  @media (max-width: 1400px) {
    padding-bottom: 30px;
  }
}

/* ==========================================================================
   BUTTON
   Pill buttons. A light fill that swaps to the gas yellow on hover reads
   premium on the ink background without needing a gradient.
   ========================================================================== */

.button {
  width: fit-content;
  min-height: 56px;
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out-expo);
}

.button span {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.button:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.button i {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.3s var(--ease-out-expo);
}

.button:hover i.ri-arrow-right-up-line,
.button:hover i.ri-arrow-right-line {
  transform: translate(3px, -1px);
}

.button.btn-primary {
  background: var(--color-main-2);
  border-color: var(--color-main-2);
  color: var(--color-text-dark);
}

.button.btn-primary:hover {
  background: var(--color-gas);
  border-color: var(--color-gas);
  color: var(--color-text-dark);
}

.button.btn-whatsapp {
  background: var(--color-solar);
  border-color: var(--color-solar);
  color: var(--color-text-dark);
}

.button.btn-whatsapp:hover {
  background: var(--color-main-2);
  border-color: var(--color-main-2);
  color: var(--color-text-dark);
}

.button.btn-dark {
  background: var(--color-main-1);
  border-color: var(--color-main-1);
  color: var(--color-main-2);
}

.button.btn-dark:hover {
  background: var(--color-water);
  border-color: var(--color-water);
  color: var(--color-main-2);
}

/* Transparent + outlined, follows the section's text colour */
.button.btn-ghost {
  background: transparent;
  border-color: rgba(243, 241, 235, 0.22);
  color: inherit;
}

.button.btn-ghost:hover {
  border-color: var(--color-main-2);
}

.section-light .button.btn-ghost {
  border-color: var(--color-main-1);
}

.section-light .button.btn-ghost:hover {
  background: var(--color-main-1);
  border-color: var(--color-main-1);
  color: var(--color-main-2);
}

/* ==========================================================================
   STATUS DOT
   Live "online / offline" indicator (Mon-Fri 9-18, Europe/Madrid), toggled
   via .is-open by initWorkStatus() in main.js.
   ========================================================================== */

.status-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
}

.status-dot::before,
.status-dot::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.status-dot::before {
  inset: 0;
  background: var(--color-boiler);
}

.status-dot::after {
  inset: -4px;
  border: 2px solid rgba(224, 51, 59, 0.45);
}

.status-dot.is-open::before {
  background: #3BD16F;
  animation: status-pulse 1.8s ease-out infinite;
  box-shadow: 0 0 0 0 rgba(59, 209, 111, 0.6);
}

.status-dot.is-open::after {
  border-color: rgba(59, 209, 111, 0.6);
  animation: status-ring 1.8s ease-in-out infinite;
}

.btn-whatsapp .status-dot.is-open::before,
.btn-whatsapp .status-dot::before {
  outline: 1.5px solid rgba(15, 16, 13, 0.35);
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 209, 111, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(59, 209, 111, 0); }
}

@keyframes status-ring {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.35); opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot.is-open::before,
  .status-dot.is-open::after {
    animation: none;
  }
}

/* ==========================================================================
   LANGUAGE TOGGLE
   EN/ES pill with a sliding knob. html[lang="es"] moves the knob.
   ========================================================================== */

.lang-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 96px;
  padding: 3px;
  border: 1px solid rgba(243, 241, 235, 0.22);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  flex: none;
}

.lang-toggle::before {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 100px;
  background: var(--color-main-2);
  transition: transform 0.35s var(--ease-in-out);
}

.lang-toggle span {
  position: relative;
  padding: 6px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  transition: color 0.35s ease;
}

.lang-toggle .lang-en {
  color: var(--color-text-dark);
}

.lang-toggle .lang-es {
  color: var(--color-muted-2);
}

html[lang="es"] .lang-toggle::before {
  transform: translateX(100%);
}

html[lang="es"] .lang-toggle .lang-en {
  color: var(--color-muted-2);
}

html[lang="es"] .lang-toggle .lang-es {
  color: var(--color-text-dark);
}

/* Bilingual blocks (legal pages): only the active language is shown */
[data-lang-block="es"] {
  display: none;
}

html[lang="es"] [data-lang-block="es"] {
  display: block;
}

html[lang="es"] [data-lang-block="en"] {
  display: none;
}

/* ==========================================================================
   NAV TOGGLE
   ========================================================================== */

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(243, 241, 235, 0.22);
  border-radius: 50%;
  font-size: 20px;
  color: var(--color-text);
  cursor: pointer;
}

/* ==========================================================================
   SCROLL TO TOP
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-main-2);
  color: var(--color-text-dark);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 90;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--color-gas);
}

/* ==========================================================================
   LINK ARROW
   ========================================================================== */

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-arrow i {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: var(--color-muted);
  transform: translateX(0);
  transition: transform 0.3s var(--ease-out-expo), color 0.2s ease;
}

.link-arrow:hover {
  color: var(--color-gas);
}

.link-arrow:hover i {
  color: var(--color-gas);
  transform: translateX(4px);
}

/* ==========================================================================
   CONTACT ITEM
   ========================================================================== */

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item i {
  font-size: 18px;
  line-height: 1;
  color: var(--color-muted);
}

a.contact-item:hover {
  color: var(--color-gas);
}

/* ==========================================================================
   ACCORDION
   Single-open accordion (FAQ). Hairline rows, a round sign that rotates
   from + into x, ink-on-limestone when active. JS: initFaqAccordion().
   ========================================================================== */

.accordion-wrapper {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(243, 241, 235, 0.22);
}

.accordion-item {
  border-bottom: 1px solid rgba(243, 241, 235, 0.22);
}

.item-title-wrapper {
  display: grid;
  grid-template-columns: 1fr 36px;
  column-gap: 24px;
  align-items: center;
  padding: 24px 0;
  cursor: pointer;
}

.item-title-wrapper span {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  transition: color 0.25s ease;
  @media (max-width: 767px) {
    font-size: 18px;
  }
}

.item-title-wrapper i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(243, 241, 235, 0.4);
  border-radius: 50%;
  font-size: 18px;
  transition: transform 0.35s var(--ease-out-expo), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.item-title-wrapper:hover span {
  color: var(--color-gas);
}

.item-description-wrapper {
  display: none;
}

.item-content {
  padding: 0 60px 30px 0;
  @media (max-width: 767px) {
    padding-right: 0;
  }
}

.item-content p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-muted-2);
}

.accordion-item.active .item-title-wrapper i {
  background: var(--color-main-2);
  border-color: var(--color-main-2);
  color: var(--color-text-dark);
  transform: rotate(45deg);
}

/* ==========================================================================
   GRID (row / col)
   ========================================================================== */

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.row .col {
  flex: 1 1 240px;
}

.row .col-12 {
  flex: 1 1 100%;
}

/* ==========================================================================
   FORMS
   Underline fields on a light (limestone) section. Markup pattern and JS
   hooks: see forms/validate.js + CONVENTIONS §12.
   ========================================================================== */

.d-block {
  display: block !important;
}

.contact-form-box {
  width: 100%;
}

.form-clt {
  position: relative;
}

.access-input {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-text-dark);
  border-radius: 0;
  font-size: 20px;
  color: var(--color-text-dark);
  transition: border-color 0.2s ease;
}

.access-input::placeholder {
  color: #7A7B74;
}

.access-input:focus-visible {
  outline: none;
  border-bottom-color: var(--color-water);
  box-shadow: 0 1px 0 0 var(--color-water);
}

textarea.access-input {
  resize: none;
  line-height: 1.4;
}

.access-input.input-error {
  border-bottom-color: var(--color-error);
  box-shadow: 0 1px 0 0 var(--color-error);
}

.field-error {
  display: none;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-error);
}

.field-error.visible {
  display: block;
}

.loading,
.error-message,
.sent-message {
  display: none;
}

.form-loading {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-muted-dark);
}

.form-loading-spinner {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 2px solid var(--color-line-dark);
  border-top-color: var(--color-text-dark);
  border-radius: 50%;
  animation: form-spin 0.6s linear infinite;
}

@keyframes form-spin {
  to {
    transform: rotate(360deg);
  }
}

.form-error-msg {
  padding: 12px 18px;
  background: var(--color-background-error);
  color: var(--color-error);
  border-radius: 12px;
}

.form-error-msg i {
  display: inline-block;
  vertical-align: middle;
  margin-right: 12px;
}

.form-sent {
  padding: 0;
}

.form-sent-title {
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-text-dark);
  margin-bottom: 18px;
  @media (max-width: 767px) {
    font-size: 36px;
  }
}

.form-sent-title em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
}

.form-sent-sub {
  font-size: 17px;
  color: var(--color-muted-dark);
}

/* After a successful send only the success block stays visible */
.contact-form-box:has(.sent-message.d-block) .form-fields {
  display: none;
}

/* Honeypot - off-screen, never shown to people */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
