/* Kalnai Osca · landing corporativa */

@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Marca: antracita y verde salvia del logotipo */
  --anthracite: #4a4a4a;
  --sage: #8fa99b;
  --sage-deep: #566c60;
  --sage-mid: #6f8a7b;
  --ink: #2a2d2c;
  --white: #ffffff;
  --paper: #f5f7f6;
  --mist: #e8efeb;

  --font: "General Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.05rem + 0.75vw, 1.75rem);
  --step-head: clamp(2.125rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(2.875rem, 1rem + 6vw, 6.5rem);

  --margin: clamp(16px, 3vw, 32px);
  --header-h: 68px;
  --section-gap: clamp(80px, 11vw, 176px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --ground: var(--white);
  --text: var(--ink);
  --focus: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); scroll-padding-bottom: 72px; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a, button, input, summary { touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -80px; z-index: 100; padding: 12px 16px; background: var(--anthracite); color: var(--white); }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: var(--margin); }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico--lg { width: 36px; height: 36px; stroke-width: 1.6; }

/* Botones y enlaces */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font-weight: 700; font-size: var(--step-body); text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.btn--dark { position: relative; overflow: hidden; isolation: isolate; background: var(--anthracite); color: var(--white); }
.btn--dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sage-deep); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.btn--dark:hover::before { transform: scaleX(1); }
.btn:active { transform: translateY(1px); }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--white); color: var(--anthracite); transition: box-shadow 0.25s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 8px 28px rgba(42, 45, 44, 0.09); } /* taste-skill-ignore: elemento flotante */
.progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--sage-mid); transform: scaleX(var(--p, 0)); transform-origin: left; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 45px; height: auto; mix-blend-mode: multiply; }
.brand__name { font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.12em; text-transform: uppercase; }
.nav { display: none; }
.menu-btn { min-height: 44px; padding: 0 16px; background: transparent; border: 2px solid var(--anthracite); border-radius: 0; font-weight: 500; cursor: pointer; transition: background-color 0.2s var(--ease), color 0.2s var(--ease); }
.menu-btn:hover { background: var(--anthracite); color: var(--white); }
.bar__cta { display: none; min-height: 44px; }

.js .nav { position: absolute; left: 0; right: 0; top: var(--header-h); display: none; flex-direction: column; padding: 8px var(--margin) 24px; background: var(--white); box-shadow: 0 16px 28px rgba(42, 45, 44, 0.09); } /* taste-skill-ignore: elemento flotante */
.js .nav.is-open { display: flex; }
.nav a { display: block; padding: 14px 0; font-size: var(--step-lead); font-weight: 500; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
html:not(.js) .nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
html:not(.js) .menu-btn { display: none; }
html:not(.js) .site-header { height: auto; min-height: var(--header-h); }

.lead { font-size: var(--step-lead); line-height: 1.38; font-weight: 400; }

/* Inicio */
.hero { position: relative; overflow: hidden; background: var(--paper); padding-block: clamp(28px, 5vw, 72px) clamp(48px, 7vw, 112px); }
.hero__grid { position: relative; z-index: 1; display: grid; gap: 36px; align-items: center; }
.js .js .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.word > span { display: inline-block; transform: translateY(105%); animation: rise 0.9s var(--ease) forwards; animation-delay: calc(var(--w) * 110ms + 80ms); }
@keyframes rise { to { transform: none; } }
.js .hero__pic { will-change: transform; }
.js .hero__pic img { animation: zoomOut 1.8s var(--ease) both; }
@keyframes zoomOut { from { transform: scale(1.14); } to { transform: scale(1); } }

.hero h1 { font-size: var(--step-display); font-weight: 700; line-height: 0.94; letter-spacing: -0.035em; color: var(--anthracite); }
.hero .lead { max-width: 30em; margin-top: clamp(20px, 2.4vw, 32px); }
.hero__contact { display: grid; gap: 8px; margin-top: clamp(24px, 3vw, 40px); max-width: 460px; }
.hero__contact a {
  display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 10px 20px;
  background: var(--white); font-weight: 700; font-size: var(--step-body); text-decoration: none; overflow-wrap: anywhere;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.hero__contact a:hover { background: var(--mist); transform: translateX(5px); }
.hero__contact .ico { color: var(--sage-deep); transition: transform 0.3s var(--ease); }
.hero__contact a:hover .ico { transform: scale(1.2); }
.hero__pic img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; clip-path: polygon(0 12%, 19% 12%, 19% 6%, 38% 6%, 38% 0, 100% 0, 100% 100%, 0 100%); }

/* Secciones */
.section { padding-block: var(--section-gap); background: var(--ground); color: var(--text); }
.section--white { --ground: var(--white); }
.section--paper { --ground: var(--paper); }
.section--mist { --ground: var(--mist); }
.section--sage { --ground: var(--sage); }
.section h2 { font-size: var(--step-head); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--anthracite); }
.section h3 { font-size: var(--step-lead); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; color: var(--anthracite); }

.section__head { display: grid; gap: 24px; margin-bottom: clamp(40px, 6vw, 88px); }
.section__head .lead { max-width: 34em; }

/* Servicios */
.svc { display: grid; gap: 32px; }
.svc__pic { order: -1; }
.svc__pic img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; clip-path: polygon(0 0, 62% 0, 62% 7%, 81% 7%, 81% 14%, 100% 14%, 100% 100%, 0 100%); }
.svc__list li { display: grid; gap: 8px; padding-block: 20px; padding-left: 28px; position: relative; }
.svc__list li::before { content: ""; position: absolute; left: 0; top: 27px; width: 14px; height: 14px; background: var(--sage-deep); clip-path: polygon(0 100%, 0 55%, 50% 55%, 50% 0, 100% 0, 100% 100%); }
.svc__list p { max-width: 46ch; }
.svc__list li { transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.svc__list li::before { transition: transform 0.4s var(--ease), background-color 0.4s var(--ease); transform-origin: bottom left; }
.js .svc__list li:not(.is-active) { opacity: 0.4; }
.svc__list li.is-active { transform: translateX(10px); }
.svc__list li.is-active::before { transform: scale(1.6); background: var(--sage-mid); }

/* Potencia */
.pot { display: grid; gap: 20px; }
.pot__chart { width: 100%; height: clamp(220px, 34vw, 460px); }
.pot__chart .col { fill: var(--sage-mid); }
.pot__chart .col--over { fill: var(--ink); }
.pot__chart .level { fill: var(--ink); }
.pot__axis { display: flex; justify-content: space-between; font-size: var(--step-small); font-variant-numeric: tabular-nums; }
.pot__controls { display: grid; gap: 20px; margin-top: 12px; }
.pot__slider { display: grid; gap: 8px; max-width: 560px; }
.pot__slider label { font-size: var(--step-lead); line-height: 1.2; }
.pot__slider strong { font-variant-numeric: tabular-nums; }
.pot__summary { font-size: var(--step-body); max-width: 40em; min-height: 3.1em; }
.pot__legend { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: var(--step-small); }
.pot__legend li { display: inline-flex; align-items: center; gap: 10px; }
.sw { width: 16px; height: 16px; display: inline-block; }
.sw--sage { background: var(--sage-mid); }
.sw--white { background: var(--ink); }
.pot__note { font-size: var(--step-small); max-width: 52em; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 14px; background: rgba(74, 74, 74, 0.22); }
input[type="range"]::-moz-range-track { height: 14px; background: rgba(74, 74, 74, 0.22); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 44px; margin-top: -15px; background: var(--anthracite); border: 0; border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 30px; height: 44px; background: var(--anthracite); border: 0; border-radius: 0; }

/* Método */
.steps { display: flex; flex-direction: column; }
.step { position: relative; --tone: var(--sage-deep); background: var(--tone); color: var(--ink); overflow: hidden; }
.step:nth-child(1) { --tone: var(--sage-deep); color: var(--white); }
.step:nth-child(2) { --tone: var(--sage); }
.step:nth-child(3) { --tone: #b4c6bc; }
.step:nth-child(4) { --tone: #cfdcd5; }
.step:nth-child(5) { --tone: #e3ebe7; }
.step h3 { font-size: var(--step-lead); color: inherit; }
.step::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: currentColor; opacity: 0.55; transform: scaleX(0); transform-origin: left; pointer-events: none; }
.step.is-timing::after { animation: timer var(--auto, 5s) linear forwards; }
@keyframes timer { to { transform: scaleX(1); } }
.step button { display: block; width: 100%; min-height: 64px; padding: 0 var(--margin); text-align: left; background: transparent; border: 0; border-radius: 0; font-weight: 700; cursor: pointer; }
.step:nth-child(1) button { --focus: var(--white); }
.step button:hover { text-decoration: underline; text-underline-offset: 6px; }
.step:not(.is-open) .step__body > p { visibility: hidden; }
.step__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.step__body > p { overflow: hidden; padding-inline: var(--margin); max-width: 36em; }
.step.is-open .step__body { grid-template-rows: 1fr; }
.step.is-open .step__body > p { padding-bottom: 28px; }
html:not(.js) .step__body { grid-template-rows: 1fr; }
html:not(.js) .step__body > p { padding-bottom: 28px; visibility: visible; }

/* Quiénes somos */
.about { display: grid; gap: 56px; }
.about__text { display: grid; gap: 28px; }
.about__lead { display: grid; gap: 22px; align-content: start; }
.about__more { display: grid; gap: 22px; align-content: start; }
.about__more p { max-width: 38em; }
.about .statement { font-size: var(--step-lead); line-height: 1.3; font-weight: 500; max-width: 24em; }
.about__values { display: grid; gap: 28px; }
.about__values li { display: grid; gap: 6px; padding-left: 28px; position: relative; }
.about__values li::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; background: var(--sage-deep); clip-path: polygon(0 100%, 0 55%, 50% 55%, 50% 0, 100% 0, 100% 100%); }
.about__values p { max-width: 30em; }

/* Contacto */
.contact { display: grid; gap: 40px; }
.contact__head { display: grid; gap: 24px; align-content: start; }
.contact__head h2 { color: var(--ink); }
.contact__head .lead { max-width: 24em; }
.contact__list { display: grid; gap: 10px; }
.contact__row {
  display: grid; grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 2px; align-items: center;
  padding: 22px 24px; background: var(--paper); color: var(--ink); text-decoration: none;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact__row:hover, .contact__row:focus-visible { background: var(--anthracite); color: var(--white); transform: translateX(10px); }
.contact__row .ico { grid-row: span 2; color: var(--sage-deep); transition: color 0.2s var(--ease), transform 0.3s var(--ease); }
.contact__row:hover .ico { color: var(--sage); transform: scale(1.15) rotate(-6deg); }
.contact__label { font-size: var(--step-small); font-weight: 500; color: inherit; }
.contact__value { font-size: var(--step-lead); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }

/* Pie */
.footer { background: var(--sage); color: var(--ink); }
.footer__steps { width: 100%; height: clamp(70px, 9vw, 150px); fill: var(--white); }
.footer__body { background: var(--white); margin-top: -1px; padding-block: clamp(32px, 5vw, 72px) 32px; }
.footer__top { display: grid; gap: 20px; align-items: center; margin-bottom: clamp(32px, 5vw, 64px); }
.footer__logo { width: min(260px, 70%); height: auto; }
.footer__about { max-width: 24em; font-size: var(--step-lead); line-height: 1.35; }
.footer__cols { display: grid; gap: 28px; }
.footer__links { display: grid; gap: 4px; align-content: start; }
.footer__links a { display: inline-block; padding-block: 6px; text-decoration: none; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__copy { margin-top: 40px; font-size: var(--step-small); }

/* Barra de contacto rápido (móvil) */
.quickbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); box-shadow: 0 -8px 28px rgba(42, 45, 44, 0.12); padding-bottom: env(safe-area-inset-bottom); transition: transform 0.3s var(--ease); } /* taste-skill-ignore: elemento flotante */
.quickbar.is-hidden { transform: translateY(100%); }
.quickbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; font-size: var(--step-small); font-weight: 500; color: var(--anthracite); text-decoration: none; }
.quickbar a:active { background: var(--mist); }
.quickbar .ico { color: var(--sage-deep); }

/* Entradas */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Tablet */
@media (min-width: 760px) {
  .contact__row { grid-template-columns: auto minmax(120px, 1fr) auto; }
  .contact__row .ico { grid-row: auto; }
  .contact__label { font-size: var(--step-body); }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
}

/* Escritorio */
@media (min-width: 1000px) {
  :root { --header-h: 76px; }
  body { padding-bottom: 0; }
  html { scroll-padding-bottom: 0; }
  .quickbar { display: none; }
  .menu-btn { display: none; }
  .nav, .js .nav { position: static; display: flex; flex-direction: row; align-items: center; gap: clamp(20px, 2.6vw, 44px); padding: 0; background: transparent; box-shadow: none; margin-left: auto; } /* taste-skill-ignore: elemento flotante */
  .nav a { padding: 8px 0; font-size: var(--step-body); }
  .nav a.nav__contact { display: none; }
  .bar__cta { display: inline-flex; }

  .hero__grid { grid-template-columns: 7fr 5fr; gap: 5vw; }
  .hero__pic img { aspect-ratio: 4 / 5; max-height: calc(100svh - var(--header-h) - 80px); }

  .section__head { grid-template-columns: 5fr 7fr; align-items: end; gap: 48px; }
  .section__head h2 { max-width: 8em; }

  .svc { grid-template-columns: 7fr 5fr; gap: 6vw; align-items: start; }
  .svc__pic { order: 0; position: sticky; top: calc(var(--header-h) + 24px); }
  .svc__pic img { aspect-ratio: 4 / 5; max-height: calc(100svh - var(--header-h) - 64px); clip-path: polygon(0 0, 62% 0, 62% 5%, 81% 5%, 81% 10%, 100% 10%, 100% 100%, 0 100%); }
  .svc__list li { padding-block: 28px; }
  .svc__list li::before { top: 35px; }

  .pot__controls { grid-template-columns: 6fr 6fr; gap: 48px; align-items: end; }

  .steps { flex-direction: row; height: clamp(380px, 38vw, 520px); }
  .step { position: relative; flex: 1 1 0; min-width: 0; transition: flex-grow 0.45s var(--ease); }
  .step.is-open { flex-grow: 7; }
  .step h3 { position: absolute; inset: 0; pointer-events: none; }
  .step button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 28px 24px; pointer-events: auto; writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; font-size: var(--step-lead); }
  .step.is-open button { writing-mode: horizontal-tb; transform: none; height: auto; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; padding: 28px 32px; }
  .step__body { position: absolute; left: 0; bottom: 0; width: min(34em, 100%); display: block; opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease); }
  .step.is-open .step__body { opacity: 1; visibility: visible; transition-delay: 0.2s; }
  .step__body > p { padding: 0 32px 32px; font-size: var(--step-lead); line-height: 1.3; }
  html:not(.js) .steps { flex-direction: column; height: auto; }
  html:not(.js) .step { flex: none; }
  html:not(.js) .step h3, html:not(.js) .step button, html:not(.js) .step__body { position: static; writing-mode: horizontal-tb; transform: none; opacity: 1; visibility: visible; }

  .about__text { grid-template-columns: 5fr 7fr; column-gap: 7vw; align-items: start; }
  .about__values { grid-template-columns: repeat(3, 1fr); gap: 6vw; }

  .contact { grid-template-columns: 5fr 7fr; column-gap: 6vw; align-items: start; }
  .contact__row { padding: 30px 36px; }

  .footer__top { grid-template-columns: auto 1fr; gap: 6vw; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 280px)); max-width: none; gap: 6vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .word > span { transform: none; }
  .js   .step::after { display: none; }
  .js .svc__list li:not(.is-active) { opacity: 1; }
}
